
:root {
  --bg:#0a0c12;--surface:#13161e;--surface-2:#1a1e2a;--surface-3:#222736;
  --border:#252b3b;--border-2:#2f3649;--text:#e8eaf0;--text-2:#9aa0b4;--text-3:#5c6478;
  --accent:#7c5cfc;--accent-dim:rgba(124,92,252,.15);--accent-border:rgba(124,92,252,.35);
  --accent-hover:#8f72fd;--green:#10b981;--green-dim:rgba(16,185,129,.15);
  --yellow:#f59e0b;--yellow-dim:rgba(245,158,11,.15);--red:#ef4444;--red-dim:rgba(239,68,68,.15);
  --cyan:#0ea5e9;--pink:#ec4899;--orange:#f97316;
  --font-d:'Outfit',sans-serif;--font-b:'DM Sans',sans-serif;
  --r:10px;--r-sm:6px;--r-lg:16px;--shadow:0 4px 20px rgba(0,0,0,.4);--shadow-lg:0 8px 40px rgba(0,0,0,.6);
  --sidebar-w:240px;--t:.2s ease;
  /* v106 Letterhead — display-mode amber band tokens. Dark mode uses bright amber #fbbf24
     so the band reads as warm against dark --surface. Edit mode keeps its own #ca8a04 +
     rgba(234,179,8,.15) accents (untouched) so the writing-surface identity stays distinct. */
  /* Banner prose on the purple What's next band. --accent at 82% on a purple-tinted
     background is too close in value to read comfortably. Light in dark mode, deep in
     light mode, full opacity in both. */
  --banner-text:#d6ccff;
  --letterhead-accent:#fbbf24;
  --letterhead-accent-border:rgba(245,158,11,.4);
  --letterhead-band-bg:rgba(245,158,11,.08);
  --letterhead-band-border:rgba(245,158,11,.22);
}
[data-theme="light"]{
  --bg:#f0f2f7;--surface:#fff;--surface-2:#f8f9fc;--surface-3:#eef0f6;
  --border:#e2e5ef;--border-2:#d5d9e8;--text:#0f1117;--text-2:#4b5368;--text-3:#8892a4;
  --shadow:0 2px 12px rgba(0,0,0,.08);--shadow-lg:0 8px 32px rgba(0,0,0,.12);
  /* v106 Letterhead — light-mode override. Deep amber-800 #92400e for accent because the
     band sits on white --surface and bright amber would wash out. Stronger band borders too. */
  --banner-text:#4834a6;
  --letterhead-accent:#92400e;
  --letterhead-accent-border:#d97706;
  --letterhead-band-bg:rgba(245,158,11,.10);
  --letterhead-band-border:rgba(245,158,11,.32);
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%;font-family:var(--font-b);background:var(--bg);color:var(--text);font-size:14px;line-height:1.5}
::-webkit-scrollbar{width:5px;height:5px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--border-2);border-radius:3px}

/* TYPOGRAPHY */
h1{font-family:var(--font-d);font-size:24px;font-weight:700}
h2{font-family:var(--font-d);font-size:18px;font-weight:700}
h3{font-family:var(--font-d);font-size:15px;font-weight:600}

/* BUTTONS */
.btn{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;border-radius:var(--r-sm);border:none;cursor:pointer;font-family:var(--font-b);font-size:13px;font-weight:500;transition:all var(--t);white-space:nowrap;text-decoration:none}
.btn-primary{background:var(--accent);color:#fff}
.btn-primary:hover{background:var(--accent-hover);transform:translateY(-1px)}
.btn-ghost{background:transparent;color:var(--text-2);border:1px solid var(--border)}
.btn-ghost:hover{background:var(--surface-2);color:var(--text)}
.btn-danger{background:var(--red-dim);color:var(--red);border:1px solid transparent}
.btn-danger:hover{background:var(--red);color:#fff}
.btn-sm{padding:5px 12px;font-size:12px}
/* v339: .btn is nowrap, which is right for toolbars and wrong inside a chat bubble -- an action
   button carrying a project name ran off the edge of the column with no way to read it. */
.btn-act{white-space:normal;text-align:left;max-width:100%;line-height:1.4;align-items:flex-start;padding-top:7px;padding-bottom:7px}
.btn-icon{padding:7px;border-radius:var(--r-sm);background:transparent;border:none;cursor:pointer;color:var(--text-2);transition:all var(--t);display:flex;align-items:center;justify-content:center}
.btn-icon:hover{background:var(--surface-2);color:var(--text)}
.btn:disabled{opacity:.5;cursor:not-allowed}

/* INPUTS */
input[type=text],input[type=email],input[type=url],input[type=date],input[type=number],textarea,select{background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);color:var(--text);font-family:var(--font-b);font-size:13px;padding:9px 12px;width:100%;outline:none;transition:border-color var(--t);resize:vertical}
input[type=text]:focus,input[type=date]:focus,input[type=number]:focus,textarea:focus,select:focus{border-color:var(--accent)}
input[type=date]::-webkit-calendar-picker-indicator{filter:invert(0.7) opacity(0.7);cursor:pointer}
input[type=date]::-webkit-calendar-picker-indicator:hover{filter:invert(0.9) opacity(1)}
label{font-size:12px;font-weight:500;color:var(--text-2);margin-bottom:4px;display:block}
.form-group{display:flex;flex-direction:column;gap:4px;margin-bottom:14px}

/* BADGES */
.badge{display:inline-flex;align-items:center;padding:2px 8px;border-radius:20px;font-size:11px;font-weight:600}
.badge-purple{background:var(--accent-dim);color:var(--accent)}
.badge-green{background:var(--green-dim);color:var(--green)}
.badge-yellow{background:var(--yellow-dim);color:var(--yellow)}
.badge-red{background:var(--red-dim);color:var(--red)}
.badge-cyan{background:rgba(14,165,233,.15);color:var(--cyan)}
.badge-gray{background:var(--surface-3);color:var(--text-2)}
/* v141: three-state visual hierarchy on plan task titles.
   - .plan-row-future: tasks 2+ days out, not done. Deep gray (--text-3) so they
     stay readable but visibly recede.
   - .plan-row-due-soon: overdue OR due today OR due tomorrow, not done. Orange
     so they pop — these are the ones the user should be thinking about right now.
   - Done tasks keep full-color strikethrough (handled by .strike class) — visible win. */
.plan-row-title.plan-row-future{color:var(--text-3)}
.plan-row-title.plan-row-due-soon{color:#f97316}
.badge-orange{background:rgba(249,115,22,.15);color:var(--orange)}

/* AVATAR */
.avatar{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;color:#fff;flex-shrink:0;font-family:var(--font-d)}
.avatar-sm{width:22px;height:22px;font-size:9px}
.avatar-lg{width:38px;height:38px;font-size:14px}

/* CARD */
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:20px}

/* LAYOUT */
#login-screen{min-height:100vh;display:flex;align-items:center;justify-content:center;background:var(--bg)}
#app-shell{display:grid;grid-template-columns:var(--sidebar-w) 1fr;height:100vh;overflow:hidden}
[hidden]{display:none!important}

/* SIDEBAR */
#sidebar{background:var(--surface);border-right:1px solid var(--border);display:flex;flex-direction:column;height:100vh;overflow:hidden}
.sidebar-header{padding:18px 14px 14px;border-bottom:1px solid var(--border);flex-shrink:0}
.sidebar-logo{font-family:var(--font-d);font-size:15px;font-weight:800;display:flex;align-items:center;gap:7px}
.sidebar-logo .dot{width:8px;height:8px;border-radius:50%;background:var(--accent)}
.sidebar-user{margin-top:12px;display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:var(--r-sm);background:var(--surface-2)}
.sidebar-user-info{flex:1;min-width:0}
.sidebar-user-name{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sidebar-user-score{font-size:11px;color:var(--text-3)}
.sidebar-user-sub{font-size:11px;color:var(--text-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.health-badge{width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;color:#fff;flex-shrink:0}
.health-badge.green{background:var(--green)}
.health-badge.yellow{background:var(--yellow)}
.health-badge.orange{background:var(--orange)}
.health-badge.red{background:var(--red)}

.sidebar-nav{flex:1;overflow-y:auto;padding:10px 8px}
.nav-section-label{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--text-3);padding:0 8px;margin:10px 0 4px}
.nav-item{display:flex;align-items:center;gap:9px;padding:9px 10px;border-radius:var(--r-sm);cursor:pointer;color:var(--text-2);font-size:13px;font-weight:500;transition:all var(--t);margin-bottom:2px;user-select:none}
.nav-item:hover{background:var(--surface-2);color:var(--text)}
.nav-item.active{background:var(--accent-dim);color:var(--accent)}
.nav-item svg{width:15px;height:15px;flex-shrink:0}
/* Breadcrumb nest: a small tree under the "Plan" nav-item showing the current project path.
   Indent is driven by depth (1=project/habit under Plan, 2=task under project). The left
   border acts as the tree trunk; the leaf connector is painted by :before on each row. */
.nav-item-nested{padding:6px 10px 6px 0;font-size:12px;font-weight:500;color:var(--text-2);display:flex;align-items:center;gap:7px;cursor:pointer;border-radius:var(--r-sm);transition:all var(--t);margin-bottom:1px;user-select:none;position:relative}
.nav-item-nested:hover{background:var(--surface-2);color:var(--text)}
.nav-item-nested.active{background:var(--accent-dim);color:var(--accent)}
.nav-item-nested .nest-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}
.nav-item-nested.depth-1{padding-left:22px}
.nav-item-nested.depth-2{padding-left:38px}
.nav-item-nested.depth-1:before{content:"";position:absolute;left:12px;top:0;bottom:50%;width:1px;background:var(--border-2)}
.nav-item-nested.depth-1:after{content:"";position:absolute;left:12px;top:50%;width:7px;height:1px;background:var(--border-2)}
.nav-item-nested.depth-1.first-nested:before{top:-2px}
.nav-item-nested.depth-1.has-siblings-below:before{bottom:-1px}
.nav-item-nested.depth-2:before{content:"";position:absolute;left:28px;top:0;bottom:50%;width:1px;background:var(--border-2)}
.nav-item-nested.depth-2:after{content:"";position:absolute;left:28px;top:50%;width:7px;height:1px;background:var(--border-2)}
.nav-item-nested.depth-2.has-siblings-below:before{bottom:-1px}
.nest-dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}
.nav-badge{margin-left:auto;background:var(--surface-3);color:var(--text-3);font-size:10px;font-weight:600;padding:1px 7px;border-radius:10px}
.nav-item.active .nav-badge{background:var(--accent-dim);color:var(--accent)}
.nav-item-new{animation:navItemPulse 1.8s ease-in-out 3;box-shadow:0 0 0 2px var(--accent-border)}
.nav-badge-new{background:var(--accent)!important;color:#fff!important;letter-spacing:.05em;animation:navBadgePulse 1.6s ease-in-out infinite}
@keyframes navItemPulse{0%,100%{box-shadow:0 0 0 2px var(--accent-border)}50%{box-shadow:0 0 0 3px var(--accent)}}
@keyframes navBadgePulse{0%,100%{opacity:1}50%{opacity:.6}}

/* v236: OneNote-style goal tree in the sidebar. The Goals folder lists every goal; the
   active (or last-opened) goal expands to reveal Your Situation / Plan / Notebook so the user
   can flip between goals without returning to the Goals overview page. */
.nav-folder{display:flex;align-items:center;gap:8px;padding:9px 10px 9px 6px;border-radius:var(--r-sm);cursor:pointer;color:var(--text-2);font-size:13px;font-weight:600;transition:all var(--t);margin-bottom:2px;user-select:none}
.nav-folder:hover{background:var(--surface-2);color:var(--text)}
.nav-folder.active{background:var(--accent-dim);color:var(--accent)}
.nav-folder .folder-icon{width:15px;height:15px;flex-shrink:0}
.nav-chevron{width:18px;height:18px;flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:4px;color:var(--text-3);transition:transform var(--t)}
.nav-chevron svg{width:11px;height:11px}
.nav-chevron.open{transform:rotate(90deg)}
.nav-folder .nav-chevron:hover{background:var(--surface-3);color:var(--text-2)}
.nav-goal{display:flex;align-items:center;gap:7px;padding:8px 10px 8px 8px;border-radius:var(--r-sm);cursor:pointer;color:var(--text-2);font-size:12.5px;font-weight:600;transition:all var(--t);margin-bottom:1px;user-select:none}
.nav-goal:hover{background:var(--surface-2);color:var(--text)}
.nav-goal.expanded{color:var(--text)}
.nav-goal .goal-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}
.nav-goal .goal-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}
.nav-goal-pages{margin:1px 0 8px 12px;padding-left:8px;border-left:1px solid var(--border-2)}
.nav-goal-pages .nav-item{font-size:12.5px}
.sidebar-bottom{padding:10px 8px;border-top:1px solid var(--border);flex-shrink:0;display:flex;flex-direction:column;gap:6px}
.coaching-btn{width:100%;justify-content:center;background:var(--accent);color:#fff}
.coaching-btn:hover{background:var(--accent-hover)}
.signout-btn{width:100%;justify-content:center;background:transparent;border:1px solid var(--border);color:var(--text-2)}
.signout-btn:hover{background:var(--surface-2);color:var(--text)}

/* PROJECT NAV */
.back-btn{display:flex;align-items:center;gap:6px;color:var(--text-3);cursor:pointer;font-size:12px;font-weight:500;padding:6px 8px;border-radius:var(--r-sm);transition:all var(--t);margin-bottom:8px}
.back-btn:hover{background:var(--surface-2);color:var(--text)}
.proj-sidebar-name{font-family:var(--font-d);font-size:13px;font-weight:700;padding:0 8px;margin-bottom:10px;color:var(--text);display:flex;align-items:center;gap:8px}
.sidebar-divider{height:1px;background:var(--border);margin:8px 0}

/* MAIN */
#main-content{overflow-y:auto;height:100vh;background:var(--bg)}
.main-view{padding:32px;max-width:1100px}
.view-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:28px;gap:16px;flex-wrap:wrap}
.plan-view .view-header,.view-header:has(.plan-page-sub){align-items:flex-start}
.view-title{font-family:var(--font-d);font-size:22px;font-weight:700}

/* GOAL TAB BAR (v361) — the four goal surfaces as sibling tabs on the goal page */
.goal-tabbar{position:sticky;top:0;z-index:20;background:color-mix(in srgb,var(--surface) 92%,transparent);border-bottom:1px solid var(--border);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.goal-tabbar-inner{display:flex;align-items:center;gap:8px 18px;padding:11px 32px;max-width:1100px;flex-wrap:wrap}
.gt-name{display:flex;align-items:center;gap:8px;background:transparent;border:none;cursor:pointer;padding:0;min-width:0;flex-shrink:0}
.gt-dot{width:9px;height:9px;border-radius:50%;flex-shrink:0}
.gt-name-txt{font-family:var(--font-d);font-weight:700;font-size:14px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:230px}
.gt-name:hover .gt-name-txt{color:var(--gc)}
.gt-tabs{display:flex;align-items:center;gap:4px;flex-wrap:wrap;margin-left:auto}
.gt-tab{background:transparent;border:none;border-radius:8px;padding:7px 13px;font-family:var(--font-b);font-size:13px;font-weight:600;color:var(--text-2);cursor:pointer;white-space:nowrap;transition:background .12s,color .12s}
.gt-tab:hover{background:var(--surface-2);color:var(--text)}
.gt-tab.on{background:color-mix(in srgb,var(--gc) 16%,transparent);color:var(--gc)}
.gt-tab:active{transform:scale(.95);transition:transform .06s}
.md-focus-go:active,.md-focus-check:active{transform:scale(.94);transition:transform .06s}
@media (prefers-reduced-motion: reduce){
  .mtab:active,.mtab-cap:active svg,.gt-tab:active,.md-focus-go:active,.md-focus-check:active{transform:none}
}

/* LOGIN */
#login-screen{min-height:100vh;display:flex;align-items:center;justify-content:center;background:var(--bg);background-image:radial-gradient(ellipse at 30% 20%,rgba(124,92,252,.08) 0%,transparent 60%),radial-gradient(ellipse at 70% 80%,rgba(14,165,233,.06) 0%,transparent 60%)}
.login-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);padding:48px 44px;width:420px;max-width:90vw;box-shadow:var(--shadow-lg)}
.login-logo{font-family:var(--font-d);font-size:28px;font-weight:800;margin-bottom:4px;display:flex;align-items:center;gap:10px}
.login-logo .dot{width:10px;height:10px;border-radius:50%;background:var(--accent)}
.login-logo .accent{color:var(--accent)}
.login-tagline{color:var(--text-3);font-size:12px;margin-bottom:36px}
.login-field-group{display:flex;flex-direction:column;gap:14px;margin-bottom:24px}
.login-field{position:relative}
.login-field label{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.07em;color:var(--text-3);margin-bottom:6px;display:block}
.login-field input{width:100%;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);color:var(--text);font-family:var(--font-b);font-size:14px;padding:11px 14px;outline:none;transition:border-color var(--t)}
.login-field input:focus{border-color:var(--accent)}
.login-btn{width:100%;padding:13px;background:var(--accent);color:#fff;border:none;border-radius:var(--r-sm);font-family:var(--font-d);font-size:15px;font-weight:700;cursor:pointer;transition:all var(--t);letter-spacing:.02em}
.login-btn:hover{background:var(--accent-hover);transform:translateY(-1px);box-shadow:0 4px 16px rgba(124,92,252,.4)}
.login-btn:active{transform:translateY(0)}
.login-divider{display:flex;align-items:center;gap:12px;margin:20px 0;color:var(--text-3);font-size:11px}
.login-divider::before,.login-divider::after{content:'';flex:1;height:1px;background:var(--border)}
.login-dev-note{background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);padding:12px 14px;font-size:11px;color:var(--text-3);line-height:1.6}
.login-dev-note strong{color:var(--text-2)}
.login-error{color:var(--red);font-size:12px;margin-top:8px;display:none}

/* ===================== FIRST-RUN ONBOARDING (v363) ===================== */
#onboarding-screen{position:fixed;inset:0;z-index:200;display:flex;align-items:center;justify-content:center;padding:24px;background:var(--bg);overflow-y:auto}
.ob-bg{position:fixed;inset:0;pointer-events:none;background-image:radial-gradient(ellipse at 25% 15%,rgba(124,92,252,.16) 0%,transparent 55%),radial-gradient(ellipse at 80% 85%,rgba(14,165,233,.10) 0%,transparent 55%)}
.ob-card{position:relative;width:560px;max-width:100%;padding:16px 8px}
.ob-brand{display:inline-flex;align-items:center;gap:9px;font-family:var(--font-d);font-weight:700;font-size:14px;color:var(--text-2);letter-spacing:.01em;margin-bottom:34px}
.ob-brand-dot{width:11px;height:11px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 22%,transparent)}
.ob-title{font-family:var(--font-d);font-size:clamp(34px,6vw,46px);font-weight:800;letter-spacing:-.025em;line-height:1.08;color:var(--text);margin:0 0 20px;text-wrap:balance}
.ob-title-accent{color:var(--accent)}
.ob-title-sm{font-size:clamp(26px,4.6vw,34px);margin-bottom:14px}
.ob-lede{font-family:var(--font-b);font-size:16px;line-height:1.62;color:var(--text-2);max-width:34em;margin:0 0 30px}
.ob-btn{display:inline-flex;align-items:center;justify-content:center;font-family:var(--font-d);font-weight:700;cursor:pointer;border:none;transition:transform .12s,background .14s,opacity .14s}
.ob-btn-primary{background:var(--accent);color:#fff;font-size:15.5px;padding:15px 26px;border-radius:13px;box-shadow:0 6px 22px color-mix(in srgb,var(--accent) 36%,transparent)}
.ob-btn-primary:hover{background:var(--accent-hover)}
.ob-btn-primary:active{transform:scale(.98)}
.ob-btn-primary:disabled{opacity:.4;cursor:default;box-shadow:none}
.ob-btn-ghost{background:transparent;color:var(--text-3);font-size:13.5px;font-weight:600;padding:12px 8px;margin-left:6px}
.ob-btn-ghost:hover{color:var(--text-2)}
.ob-input{display:block;width:100%;background:var(--surface);border:1.5px solid var(--border);border-radius:14px;padding:16px 18px;font-family:var(--font-b);font-size:16px;color:var(--text);resize:none;outline:none;line-height:1.5;min-height:56px;transition:border-color .14s}
.ob-input::placeholder{color:var(--text-3)}
.ob-input:focus{border-color:var(--accent)}
.ob-chips{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 28px}
.ob-chip{background:var(--surface-2);border:1px solid var(--border);border-radius:100px;padding:8px 15px;font-family:var(--font-b);font-size:13px;font-weight:500;color:var(--text-2);cursor:pointer;transition:border-color .14s,color .14s,background .14s}
.ob-chip:hover{border-color:var(--accent-border);color:var(--text);background:var(--surface-3)}
.ob-back{position:absolute;top:-2px;right:0;width:38px;height:38px;border-radius:10px;border:1px solid var(--border);background:transparent;color:var(--text-3);font-size:18px;cursor:pointer;transition:color .14s,border-color .14s}
.ob-back:hover{color:var(--text);border-color:var(--text-3)}
.ob-dots{display:flex;gap:7px;margin-top:34px}
.ob-dot{width:7px;height:7px;border-radius:50%;background:var(--border);transition:background .2s,width .2s}
.ob-dot.on{width:22px;background:var(--accent);border-radius:4px}
.ob-fade{animation:obFade .5s cubic-bezier(.2,.7,.2,1)}
@keyframes obFade{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion: reduce){ .ob-fade{animation:none} }
@media(max-width:560px){ .ob-card{padding:12px 4px} .ob-brand{margin-bottom:24px} .ob-btn-primary{width:100%} .ob-btn-ghost{width:100%;margin:8px 0 0} }

/* v117: .ob-typing and .ob-claude-* retained — typing-indicator dots and Claude-styled chat
   bubbles are reused by the tour (goals-intro, availability stops) and elsewhere. The "ob-"
   prefix is a historical artifact from when these lived inside the now-removed onboarding overlay. */
.ob-claude-msg{display:flex;gap:12px;align-items:flex-start}
.ob-claude-avatar{
  width:36px;height:36px;border-radius:50%;flex-shrink:0;
  background:linear-gradient(135deg,#7c5cfc,#a78bfa);
  display:flex;align-items:center;justify-content:center;
  font-family:var(--font-d);font-weight:700;color:#fff;font-size:12px;
}
.ob-claude-text{
  background:var(--accent-dim);border:1px solid var(--accent-border);
  border-radius:12px;border-top-left-radius:3px;
  padding:13px 17px;font-size:15px;line-height:1.6;color:var(--text);
  flex:1;
}
.ob-claude-stack{display:flex;flex-direction:column;gap:8px;flex:1}
.ob-typing{display:inline-flex;gap:3px;padding:2px 0}
.ob-typing span{width:5px;height:5px;border-radius:50%;background:var(--text-3);animation:obTyping 1.2s infinite ease-in-out}
.ob-typing span:nth-child(2){animation-delay:.15s}
.ob-typing span:nth-child(3){animation-delay:.3s}
@keyframes obTyping{0%,60%,100%{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}

/* TOUR — Goals-page first-goal stop. Lives inline on the Goals page (not an overlay) so
   the user sees the real app shell around it. Replaces the empty-state block and the
   "+ New Goal" header button while active. */
.tour-panel{
  max-width:640px;margin:0 auto;background:var(--surface);border:1px solid var(--border);
  border-radius:var(--r);padding:26px 26px 22px 26px;display:flex;flex-direction:column;gap:16px;
}
.tour-intro-block{display:flex;flex-direction:column;gap:10px}
.tour-intro-line{font-size:14px;line-height:1.6;color:var(--text)}
.tour-question{font-family:var(--font-d);font-size:16px;font-weight:600;line-height:1.5;color:var(--text)}
.tour-chat{display:flex;flex-direction:column;gap:10px;max-height:280px;overflow-y:auto;padding:2px}
.tour-input-row{display:flex;gap:8px;align-items:flex-end}
.tour-input{
  flex:1;background:var(--surface-2);border:1px solid var(--border);
  border-radius:var(--r-sm);color:var(--text);font-family:var(--font-b);
  font-size:13px;padding:10px 13px;outline:none;resize:none;line-height:1.5;min-height:40px;max-height:120px;
}
.tour-input:focus{border-color:var(--accent)}
.tour-send{
  background:var(--accent);color:#fff;border:none;border-radius:var(--r-sm);
  padding:10px 16px;font-family:var(--font-d);font-weight:700;font-size:13px;
  cursor:pointer;transition:all var(--t);
}
.tour-send:hover{background:var(--accent-hover)}
.tour-send:disabled{opacity:.4;cursor:not-allowed}
/* Stub-message bubble shown at tour transitions — e.g. between Goals creation and the
   availability step, and as the final closing message on Sticking Points. Dismissible. */
.tour-stub{
  max-width:640px;margin:0 auto 18px auto;background:var(--accent-dim);
  border:1px solid var(--accent-border);border-radius:var(--r);
  padding:12px 16px;display:flex;align-items:flex-start;gap:12px;
  font-size:13px;line-height:1.55;color:var(--text);
}
.tour-stub-x{
  background:transparent;border:none;color:var(--text-3);cursor:pointer;
  font-size:18px;line-height:1;padding:0 4px;flex-shrink:0;
}
.tour-stub-x:hover{color:var(--text)}

/* Rich stub variant (v79) — used for the 'goal-created' bridge bubble. Avatar on the left,
   main message + hint + action buttons on the right. Two buttons: primary "Keep going" and
   secondary "I'll do it later". Wider than the basic stub to breathe with more content. */
.tour-stub-rich{
  max-width:680px;padding:14px 18px 16px 14px;
}
.tour-stub-avatar{
  width:28px;height:28px;border-radius:50%;background:var(--accent);color:#fff;
  font-family:var(--font-d);font-size:11px;font-weight:700;
  display:flex;align-items:center;justify-content:center;flex-shrink:0;
  letter-spacing:.02em;margin-top:2px;
}
.tour-stub-body{flex:1;display:flex;flex-direction:column;gap:10px;min-width:0}
.tour-stub-main{font-size:13.5px;line-height:1.55;color:var(--text)}
.tour-stub-hint{font-size:12.5px;color:var(--text-2);line-height:1.5}
.tour-stub-hint b{color:var(--text);font-weight:600}
.tour-stub-actions{display:flex;gap:10px;margin-top:4px;flex-wrap:wrap}
.tour-stub-primary{
  background:var(--accent);color:#fff;border:none;border-radius:var(--r-sm);
  padding:9px 18px;font-family:var(--font-d);font-weight:700;font-size:13px;
  cursor:pointer;transition:all var(--t);
}
.tour-stub-primary:hover{background:var(--accent-hover)}
.tour-stub-secondary{
  background:transparent;color:var(--text-2);border:1px solid var(--border);
  border-radius:var(--r-sm);padding:9px 16px;font-family:var(--font-b);
  font-weight:500;font-size:13px;cursor:pointer;transition:all var(--t);
}
.tour-stub-secondary:hover{color:var(--text);border-color:var(--text-3);background:var(--surface-2)}

/* Tour banner — the one-line narrator bar rendered at the top of Vision/Plan/WorkSession/
   MyDay/StickingPoints pages while the matching tour stop is active. Collapsible locally
   (does NOT advance the tour). Banner disappears automatically when the real action
   advances the tour stop. */
.tour-banner{
  max-width:640px;margin:0 auto 16px auto;
  background:var(--accent-dim);border:1px solid var(--accent-border);
  border-radius:var(--r);padding:12px 14px;
  display:flex;align-items:flex-start;gap:12px;
  font-size:13px;line-height:1.5;color:var(--text);
  transition:padding var(--t), max-height var(--t);
}
.tour-banner-avatar{
  width:28px;height:28px;border-radius:50%;background:var(--accent);color:#fff;
  font-family:var(--font-d);font-size:11px;font-weight:700;
  display:flex;align-items:center;justify-content:center;flex-shrink:0;
  letter-spacing:.02em;
}
.tour-banner-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.tour-banner-purpose{font-weight:600;color:var(--text)}
.tour-banner-instruction{color:var(--text-2);font-size:12.5px}
.tour-banner-toggle{
  background:transparent;border:none;color:var(--text-3);cursor:pointer;
  font-size:14px;line-height:1;padding:2px 6px;flex-shrink:0;border-radius:4px;
  transition:color var(--t),background var(--t);
}
.tour-banner-toggle:hover{color:var(--text);background:var(--surface-2)}
.tour-banner-collapsed{
  padding:7px 12px;
}
.tour-banner-collapsed .tour-banner-body{flex-direction:row;align-items:center;gap:8px}
.tour-banner-collapsed .tour-banner-instruction{display:none}
.tour-banner-collapsed .tour-banner-purpose{font-weight:500;font-size:12.5px;color:var(--text-2)}

/* Expanded first-visit tour card (v82) — shows on initial visit to a tour stop that has
   `expanded` copy defined. Larger than the slim banner, scannable with bullets, single
   primary CTA that dismisses. Once dismissed (per-stop, persisted to user) the slim banner
   takes over for the rest of the stop's lifetime. */
.tour-card{
  max-width:680px;margin:0 auto 20px auto;
  background:var(--accent-dim);border:1px solid var(--accent-border);
  border-radius:var(--r);padding:18px 22px 18px 22px;
  color:var(--text);
}
.tour-card-header{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.tour-card-avatar{
  width:32px;height:32px;border-radius:50%;background:var(--accent);color:#fff;
  font-family:var(--font-d);font-size:12px;font-weight:700;
  display:flex;align-items:center;justify-content:center;flex-shrink:0;letter-spacing:.02em;
}
.tour-card-title{font-family:var(--font-d);font-size:16px;font-weight:700;color:var(--text)}
.tour-card-body{display:flex;flex-direction:column;gap:10px}
.tour-card-p{font-size:13.5px;line-height:1.55;color:var(--text);margin:0}
.tour-card-p-closing{color:var(--text);margin-top:4px}
.tour-card-bullets{
  list-style:none;padding:0;margin:4px 0 0 0;
  display:flex;flex-direction:column;gap:8px;
}
.tour-card-bullet{
  padding:10px 12px;background:var(--surface-2);border-radius:var(--r-sm);
  border-left:3px solid var(--accent);
}
.tour-card-bullet-heading{
  font-family:var(--font-d);font-weight:700;font-size:13px;color:var(--text);margin-bottom:2px;
}
.tour-card-bullet-body{font-size:12.5px;line-height:1.5;color:var(--text-2)}
.tour-card-actions{display:flex;justify-content:flex-end;margin-top:14px}
.tour-card-cta{
  background:var(--accent);color:#fff;border:none;border-radius:var(--r-sm);
  padding:10px 22px;font-family:var(--font-d);font-weight:700;font-size:13.5px;
  cursor:pointer;transition:all var(--t);
}
.tour-card-cta:hover{background:var(--accent-hover);transform:translateY(-1px)}
.tour-card-cta:active{transform:translateY(0)}

/* Mobile: tour card full-bleed inside its parent padding, bullets stay readable */
@media (max-width: 640px){
  .tour-card{padding:14px 14px 14px 14px}
  .tour-card-title{font-size:15px}
  .tour-card-actions{justify-content:stretch}
  .tour-card-cta{width:100%}
}

/* Availability chips — multi-select within the tour chat for bestTimeOfDay.
   'variable' is exclusive (clears others; any other clears it). */
.tour-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
.tour-chip{
  padding:7px 14px;border-radius:999px;border:1px solid var(--border);
  background:var(--surface-2);color:var(--text);font-size:12.5px;font-family:var(--font-b);
  cursor:pointer;transition:all var(--t);user-select:none;
}
.tour-chip:hover{border-color:var(--accent);color:var(--text)}
.tour-chip.active{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:600}
.tour-chips-confirm{
  margin-top:10px;align-self:flex-start;
  background:var(--accent);color:#fff;border:none;border-radius:var(--r-sm);
  padding:9px 16px;font-family:var(--font-d);font-weight:700;font-size:13px;
  cursor:pointer;transition:all var(--t);
}
.tour-chips-confirm:hover{background:var(--accent-hover)}
.tour-chips-confirm:disabled{opacity:.4;cursor:not-allowed}

/* Sidebar "take the tour again" link — subtle bottom-left entry point, shown once the user
   has completed the tour at least once (user.tourClosingSeen === true). */
.sidebar-tour-link{
  background:transparent;border:none;color:var(--text-3);cursor:pointer;
  font-size:11.5px;font-family:var(--font-b);padding:4px 6px;text-align:left;
  margin-top:2px;border-radius:4px;transition:color var(--t);
}
.sidebar-tour-link:hover{color:var(--text-2);text-decoration:underline}

/* DASHBOARD */
.greeting-title{font-family:var(--font-d);font-size:26px;font-weight:800;margin-bottom:4px}
.greeting-date{color:var(--text-2);font-size:13px;margin-bottom:28px}
.dash-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:20px}
.health-card{grid-column:1/-1;display:flex;align-items:flex-start;gap:28px}
.health-ring-wrap{flex-shrink:0;position:relative;width:120px;height:120px}
.health-ring-wrap svg{transform:rotate(-90deg)}
.health-ring-center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.health-ring-score{font-family:var(--font-d);font-size:30px;font-weight:800}
.health-ring-lbl{font-size:10px;color:var(--text-3);margin-top:1px}
.health-details{flex:1}
.health-status-lbl{font-size:15px;font-weight:600;margin-bottom:14px}
.health-bar-row{margin-bottom:11px}
.health-bar-labels{display:flex;justify-content:space-between;margin-bottom:5px;font-size:12px;color:var(--text-2)}
.health-bar{height:6px;background:var(--surface-3);border-radius:3px;overflow:hidden}
.health-bar-fill{height:100%;border-radius:3px;transition:width .6s ease}

.section-heading{font-family:var(--font-d);font-size:13px;font-weight:600;color:var(--text-2);margin-bottom:12px;display:flex;align-items:center;gap:8px}
.task-item{display:flex;align-items:flex-start;gap:10px;padding:11px 14px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-sm);cursor:pointer;transition:all var(--t);margin-bottom:8px}
.task-item:hover{border-color:var(--accent)}
.task-item.overdue{border-left:3px solid var(--red)}
.task-item.blocked{border-left:3px solid var(--yellow)}
.task-item-title{font-size:13px;font-weight:500}
.task-item-sub{display:flex;align-items:center;gap:8px;margin-top:3px;flex-wrap:wrap}
.task-item-proj{font-size:11px;color:var(--text-3)}
.routine-quick-item{display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-sm);margin-bottom:8px;cursor:pointer;transition:all var(--t)}
.routine-quick-item:hover{border-color:var(--border-2)}
.routine-quick-item.done{opacity:.6}
.rq-check{width:18px;height:18px;border:2px solid var(--border-2);border-radius:4px;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:all var(--t)}
.routine-quick-item.done .rq-check{background:var(--green);border-color:var(--green)}
.rq-title{font-size:13px;font-weight:500;flex:1}
.rq-streak{font-size:11px;color:var(--text-3)}

/* PROJECT CARDS */
.projects-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}
.proj-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);cursor:pointer;transition:all var(--t);overflow:hidden}
.proj-card:hover{border-color:var(--accent);transform:translateY(-2px);box-shadow:var(--shadow)}
.proj-card-bar{height:3px;width:100%}
.proj-card-body{padding:18px 18px 14px}
.proj-card-title{font-family:var(--font-d);font-size:15px;font-weight:700;margin-bottom:5px}
.proj-card-desc{font-size:12px;color:var(--text-2);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-bottom:10px}
.proj-card-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.proj-card-footer{padding:11px 18px;border-top:1px solid var(--border);background:var(--surface-2);display:flex;align-items:center;justify-content:space-between}
.team-stack{display:flex;align-items:center}
.team-stack .avatar{margin-left:-6px;border:2px solid var(--surface)}
.team-stack .avatar:first-child{margin-left:0}

/* CONVERSATIONS */
.conv-area{display:flex;flex-direction:column;gap:12px;margin-bottom:16px;min-height:60px}
.plan-draft-collapsed{margin-top:10px}
.plan-draft-collapsed>summary{cursor:pointer;font-size:12px;color:var(--text-3);list-style:none;user-select:none;padding:4px 0}
.plan-draft-collapsed>summary::-webkit-details-marker{display:none}
.plan-draft-collapsed>summary:hover{color:var(--text-2)}
.plan-draft-collapsed[open]>summary{margin-bottom:6px}
/* v195: situation page mimics an LLM — full-height flex column, ONE scroll area (the messages), composer pinned at the bottom. */
.vision-page{height:100%;display:flex;flex-direction:column;padding:18px 32px 0;max-width:1100px;margin:0 auto;width:100%;box-sizing:border-box}
.vision-page-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px;flex:none}
.vision-conv{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:12px;padding:6px 2px 12px}
.vision-composer{flex:none;padding:8px 0 18px;background:var(--bg)}
.vision-composer .textarea{resize:none;overflow-y:auto}
.msg{display:flex;gap:9px;max-width:83%;min-width:0}
/* iMessage group model: side is by identity, not role. My own messages sit on the right; everyone
   else — other people AND Grace — sits on the left, each labeled and in their own color. */
.msg-team{align-self:flex-start}
.msg-claude{align-self:flex-start}
.msg-mine{align-self:flex-end;flex-direction:row-reverse}
.msg-bubble{padding:11px 14px;border-radius:12px;font-size:13px;line-height:1.65;overflow-wrap:anywhere;max-width:100%}
.msg > div:not(.claude-avatar):not(.avatar){min-width:0;max-width:100%}

/* v115b._3: Markdown rendering inside chat bubbles. Headings/lists/paragraphs need
   tighter margins than browser defaults — bubbles are small, default h1 etc. spacing
   blows them out vertically. Code spans use a dim background so they pop without a
   distracting border. The :first-child / :last-child rules trim outer whitespace so
   content doesn't sag away from the bubble's padding edges. */
.msg-bubble .md-h1,.msg-bubble .md-h2,.msg-bubble .md-h3,
.msg-bubble .md-h4,.msg-bubble .md-h5,.msg-bubble .md-h6{margin:10px 0 4px;font-weight:600;line-height:1.3}
.msg-bubble .md-h1{font-size:16px}
.msg-bubble .md-h2{font-size:14.5px}
.msg-bubble .md-h3{font-size:13.5px}
.msg-bubble .md-h4,.msg-bubble .md-h5,.msg-bubble .md-h6{font-size:13px}
.msg-bubble .md-h1:first-child,.msg-bubble .md-h2:first-child,.msg-bubble .md-h3:first-child,
.msg-bubble .md-h4:first-child,.msg-bubble .md-h5:first-child,.msg-bubble .md-h6:first-child{margin-top:0}
.msg-bubble .md-p{margin:0 0 8px}
.msg-bubble .md-p:last-child,.msg-bubble .md-ul:last-child,.msg-bubble .md-ol:last-child{margin-bottom:0}
.msg-bubble .md-ul,.msg-bubble .md-ol{margin:4px 0 8px;padding-left:22px}
.msg-bubble .md-ul li,.msg-bubble .md-ol li{margin:2px 0}
.msg-bubble .md-pre{background:rgba(0,0,0,0.25);padding:8px 10px;border-radius:6px;margin:6px 0;overflow-x:auto;font-size:12px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}
.msg-bubble .md-pre code{background:transparent;padding:0;font-family:inherit;font-size:inherit}
.msg-bubble .md-code{background:rgba(0,0,0,0.25);padding:1px 5px;border-radius:3px;font-size:12px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}
.msg-bubble a{color:var(--accent);text-decoration:underline}
.msg-team .msg-bubble{background:var(--surface-2);border:1px solid var(--border);border-bottom-left-radius:3px}
.msg-claude .msg-bubble{background:var(--accent-dim);border:1px solid var(--accent-border);border-bottom-left-radius:3px}
/* my own bubble: a solid blue (iMessage-style) so it never blends with Grace's purple, and the
   "tail" flips to the right. Other people keep their tinted, dark bubbles on the left. */
.msg-mine .msg-bubble{background:#0b84ff;border-color:#0b84ff;color:#fff;border-bottom-left-radius:12px;border-bottom-right-radius:3px}
.msg-mine .msg-bubble a{color:#fff;text-decoration:underline}
.msg-meta{font-size:11px;color:var(--text-3);margin-top:4px;text-align:left}
.msg-mine .msg-meta{text-align:right}
.claude-avatar{width:28px;height:28px;border-radius:50%;background:linear-gradient(135deg,#7c5cfc,#a78bfa);display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;color:#fff;flex-shrink:0;font-family:var(--font-d)}

.comment-box{background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r);padding:14px}
.comment-box textarea{background:transparent;border:none;width:100%;font-family:var(--font-b);font-size:13px;color:var(--text);resize:none;outline:none;min-height:60px;line-height:1.6}
.comment-footer{display:flex;align-items:center;justify-content:space-between;margin-top:10px;flex-wrap:wrap;gap:8px}
.comment-opts{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.cb-label{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--text-2);cursor:pointer;user-select:none}
.cb-label input{accent-color:var(--accent)}

/* TWO COL */
.two-col{display:grid;grid-template-columns:1fr 360px;gap:24px}
.two-col-left{min-width:0}
.two-col-right{min-width:0}

/* VISION */
.vision-text{font-size:14px;line-height:1.75;color:var(--text);white-space:pre-wrap}
.plan-cta-bar{background:var(--accent-dim);border:1px solid var(--accent-border);border-radius:var(--r);padding:13px 18px;display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}
.plan-cta-text{font-size:13px;color:var(--accent);font-weight:500}
.plan-exists-bar{background:var(--green-dim);border:1px solid rgba(16,185,129,.3);border-radius:var(--r);padding:10px 16px;display:flex;align-items:center;gap:8px;font-size:13px;color:var(--green);margin-bottom:16px}

/* PLAN */
.subproj-list{display:flex;flex-direction:column;gap:8px;margin-bottom:18px}
.subproj-item{display:flex;align-items:center;gap:12px;padding:12px 14px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-sm);cursor:pointer;transition:all var(--t)}
.subproj-item:hover{border-color:var(--accent)}
.subproj-item.active{border-color:var(--accent);background:var(--accent-dim)}
.subproj-icon{width:30px;height:30px;border-radius:var(--r-sm);background:var(--accent-dim);display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--accent);font-size:13px}
.subproj-info{flex:1;min-width:0}
.subproj-name{font-size:13px;font-weight:600}
.subproj-tasks{font-size:11px;color:var(--text-3);margin-top:2px}
.plan-summary-text{font-size:13px;line-height:1.75;color:var(--text)}

/* KANBAN */
.kanban-board{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;min-height:400px}
.kanban-col{background:var(--surface-2);border-radius:var(--r);padding:14px;min-height:350px}
.kanban-col-hdr{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.kanban-col-title{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.07em;color:var(--text-2)}
.kanban-col-count{font-size:10px;background:var(--surface-3);color:var(--text-3);padding:1px 7px;border-radius:10px}
.kanban-tasks{display:flex;flex-direction:column;gap:9px}
.task-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-sm);padding:12px;cursor:pointer;transition:all var(--t)}
.task-card:hover{border-color:var(--accent);transform:translateY(-1px);box-shadow:var(--shadow)}
.task-card.overdue{border-left:3px solid var(--red)}
.task-card-title{font-size:13px;font-weight:500;margin-bottom:8px;line-height:1.4}
.task-card-meta{display:flex;align-items:center;justify-content:space-between;gap:6px;flex-wrap:wrap}
.task-card-tags{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.add-task-btn{width:100%;margin-top:10px;display:flex;align-items:center;justify-content:center;gap:6px;padding:8px;border-radius:var(--r-sm);border:1px dashed var(--border);background:transparent;color:var(--text-3);cursor:pointer;font-size:12px;font-family:var(--font-b);transition:all var(--t)}
.add-task-btn:hover{border-color:var(--accent);color:var(--accent)}

/* TASK PAGE */
.task-cards-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:22px}
.task-full-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:18px}
.task-full-card h3{margin-bottom:13px;display:flex;align-items:center;gap:7px;font-size:14px}
.step-list{display:flex;flex-direction:column;gap:9px}
.step-row{display:flex;gap:9px;align-items:flex-start}
.step-num{width:21px;height:21px;border-radius:50%;background:var(--accent-dim);color:var(--accent);font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:1px}
.step-txt{font-size:13px;color:var(--text-2);line-height:1.55}
.step-owner{font-size:11px;font-weight:600;color:var(--text-3);white-space:nowrap}
.task-anchor-desc{font-size:15px;color:var(--text);line-height:1.65;margin-bottom:16px}
.task-details-toggle>summary{cursor:pointer;list-style:none;font-family:var(--font-d);font-size:12px;font-weight:700;color:var(--text-2);text-transform:uppercase;letter-spacing:.06em;padding:10px 14px;border:1px solid var(--border);border-radius:var(--r);background:var(--surface);user-select:none;display:flex;align-items:center;gap:8px}
.task-details-toggle>summary::-webkit-details-marker{display:none}
.task-details-toggle>summary::before{content:"\25B8";font-size:10px;transition:transform .15s}
.task-details-toggle[open]>summary::before{transform:rotate(90deg)}
.timeline-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.timeline-grid .form-group{margin-bottom:0}
.assets-list{display:flex;flex-direction:column;gap:7px}
.asset-row{display:flex;align-items:center;gap:8px;padding:8px;background:var(--surface-2);border-radius:var(--r-sm)}
.asset-row a{color:var(--accent);font-size:12px;flex:1;text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.asset-row a:hover{text-decoration:underline}
.add-asset-row{display:flex;gap:8px;margin-top:8px}
.add-asset-row input{flex:1}
.task-complete-bar{display:flex;align-items:center;gap:12px;padding:13px 18px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r);margin-bottom:22px}
.task-done-check{width:22px;height:22px;border:2px solid var(--border-2);border-radius:5px;display:flex;align-items:center;justify-content:center;flex-shrink:0;cursor:pointer;transition:all var(--t)}
.task-done-check.done{background:var(--green);border-color:var(--green)}

/* PLAN LIST — Basecamp-style unified plan view */
.plan-list-layout{display:grid;grid-template-columns:1.15fr 1fr;gap:20px;align-items:start}
.pp-task-list{display:flex;flex-direction:column;gap:7px}
.pp-task-row{display:flex;align-items:flex-start;gap:11px;padding:14px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r);cursor:pointer;transition:all var(--t)}
.pp-task-titlerow{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.pp-task-desc{font-size:12px;color:var(--text-3);line-height:1.55;margin-top:4px;display:block}
.pp-task-row:hover{border-color:var(--accent-border);background:var(--surface-2);transform:translateX(2px)}
.pp-task-row.done{opacity:.55}
.pp-task-row.done .pp-task-title{text-decoration:line-through}
.pp-chip{font-family:var(--font-d);font-size:11px;font-weight:700;padding:2px 8px;border-radius:999px;white-space:nowrap;flex-shrink:0}
.pp-chip-top{background:var(--accent);color:#fff}
.pp-chip-rank{background:var(--surface-3);color:var(--text-2)}
.pp-chip-wait{background:rgba(240,200,80,.14);color:var(--yellow);font-weight:600}
.pp-task-stale{font-size:12px;color:var(--text-3);padding:2px 0 8px}
.cal-icon{font-size:14px;flex-shrink:0;width:18px;text-align:center}
.cal-row-missed .plan-row-title{color:var(--text-3);text-decoration:line-through}
.cal-sub{font-size:11px;color:var(--text-3);margin-top:2px}
.cal-when{font-size:11px;color:var(--text-3);white-space:nowrap;font-weight:600}
.cal-when-now{font-size:11px;color:#f97316;white-space:nowrap;font-weight:700}
.cal-when-missed{font-size:11px;color:var(--red);white-space:nowrap;font-weight:700}
.cal-badge{font-family:var(--font-d);font-size:10px;font-weight:700;padding:2px 7px;border-radius:999px;white-space:nowrap}
.cal-badge-tight{background:rgba(239,68,68,.15);color:var(--red)}
.cal-badge-term{background:var(--accent-dim);color:var(--accent)}
.rq-advance{background:var(--accent-dim);border-radius:var(--r);padding:14px 16px}
.rq-advance-cur{font-size:13px;color:var(--text);line-height:1.5;margin-bottom:10px}
.rq-advance-note{font-size:11px;color:var(--text-3);margin-top:8px;line-height:1.45}
.rq-list{display:flex;flex-direction:column;gap:2px}
.rq-item{display:flex;align-items:center;gap:10px;padding:9px 8px;border-radius:8px;transition:background var(--t)}
.rq-item.current{background:var(--accent-dim)}
.rq-item.done{opacity:.5}
.rq-check{width:18px;height:18px;border-radius:5px;border:2px solid var(--border-2);flex-shrink:0;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all var(--t)}
.rq-item.done .rq-check{background:var(--accent);border-color:var(--accent)}
.rq-title{flex:1;font-size:13px;color:var(--text);line-height:1.4}
.rq-item.done .rq-title{text-decoration:line-through;color:var(--text-3)}
.rq-now{font-family:var(--font-d);font-size:9px;font-weight:800;letter-spacing:.06em;color:#fff;background:var(--accent);padding:2px 6px;border-radius:999px;vertical-align:middle;margin-right:4px}
.rq-controls{display:flex;gap:2px;flex-shrink:0;opacity:.4;transition:opacity var(--t)}
.rq-item:hover .rq-controls{opacity:1}
.rq-move{background:transparent;border:none;color:var(--text-3);cursor:pointer;font-size:13px;padding:2px 5px;border-radius:4px}
.rq-move:hover{background:var(--surface-3);color:var(--text)}
.rq-del:hover{color:var(--red)}
.cal-badge-link{background:rgba(240,200,80,.14);color:var(--yellow);border:none;cursor:pointer;font-family:var(--font-d);font-size:10px;font-weight:700;padding:2px 7px;border-radius:999px;white-space:nowrap}
.cal-badge-link:hover{background:rgba(240,200,80,.26)}
.pp-task-ring{width:14px;height:14px;border-radius:50%;border:2px solid var(--border-2);flex-shrink:0;margin-top:3px}
.pp-task-ring.done{background:var(--accent);border-color:var(--accent)}
.pp-task-titlewrap{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:0}
.pp-task-title{flex:0 1 auto;min-width:0;font-size:13.5px;font-weight:600;color:var(--text);line-height:1.45}
.pp-task-meta{display:flex;align-items:center;gap:7px;flex-shrink:0;margin-top:2px}
.pp-task-generating{display:flex;flex-direction:column;align-items:center;gap:14px;padding:48px 20px;text-align:center}
.pp-gen-label{font-size:13px;color:var(--text-2)}
@media (max-width: 900px){ .plan-list-layout{grid-template-columns:1fr} }
.plan-list-col{min-width:0}
/* The list column is a grid item (a new block-formatting context), so the last card's 16px
   margin-bottom is trapped inside the column box instead of collapsing away. That padded the
   column 16px below the last card — the page scrolled past it and the sticky chat column's
   bottom sat 16px low. Drop the trailing margin so the column ends exactly at the last card. */
.plan-list-col > :last-child{margin-bottom:0}
.wn-chip{font-family:var(--font-d);font-size:11px;font-weight:700;padding:2px 8px;border-radius:20px}
.wn-chip-due{background:rgba(240,200,80,.16);color:var(--yellow)}
.wn-chip-done{background:rgba(90,200,120,.14);color:var(--green)}
.wn-chip-off{background:var(--surface-2);color:var(--text-3)}
.wn-banner{background:rgba(124,92,252,.12);border:1px solid rgba(124,92,252,.28);border-radius:12px;padding:14px 18px;margin-bottom:18px}
.wn-clear{display:flex;align-items:center;gap:14px;background:var(--green-dim);border:1px solid color-mix(in srgb,var(--green) 30%,transparent);border-left:4px solid var(--green);border-radius:12px;padding:15px 18px;margin-bottom:16px}
.wn-clear-ico{flex-shrink:0;width:34px;height:34px;border-radius:50%;background:color-mix(in srgb,var(--green) 22%,transparent);color:var(--green);display:flex;align-items:center;justify-content:center;font-size:17px;font-weight:700}
.wn-clear-main{min-width:0}
.wn-clear-ttl{font-family:var(--font-d);font-size:16px;font-weight:700;color:var(--text)}
.wn-clear-sub{font-size:12.5px;color:var(--text-2);margin-top:3px;line-height:1.45}
.wn-banner-top{display:flex;align-items:center;gap:9px}
.wn-banner-ico{font-size:14px;color:var(--accent)}
.wn-banner-title{font-family:var(--font-d);font-size:20px;font-weight:800;color:var(--banner-text);letter-spacing:-.01em}
.wn-banner-date{margin-left:auto;font-size:12px;font-weight:600;color:var(--banner-text);background:var(--surface-2);border-radius:20px;padding:3px 11px}
.wn-banner-plan{flex:none}
.wn-banner-sub{font-size:13.5px;color:var(--banner-text);margin-top:6px;line-height:1.6}
/* Issue #11 follow-up: the full plan needs a way in from the top of the page, not just the
   bottom. Inline in the description so it reads as part of the explanation. Vertical padding
   is there for the touch target, not the look. */
.wn-banner-link{display:inline-block;font-weight:800;color:var(--banner-text);text-decoration:underline;text-underline-offset:3px;cursor:pointer;padding:6px 0}
/* The Plan page header carries a paragraph now, so it aligns to the top rather than the
   middle of the button row. Capped so the prose does not run the width of a wide screen. */
.plan-page-sub{font-size:13px;color:var(--text-2);line-height:1.6;margin-top:6px;max-width:620px}
.plan-page-link{font-weight:700;color:var(--accent);text-decoration:underline;text-underline-offset:3px;cursor:pointer;display:inline-block;padding:5px 0}
.plan-page-link:hover{color:var(--accent-hover)}
/* Plan left the sidebar, so every page below it needs its own way back up. */
.plan-nextdue-waiting{color:var(--yellow);font-weight:700}
/* v334: the removed/restore shelf. Deliberately quiet -- it is a safety net, not a feature
   competing for attention with the live plan above it. */
.plan-archived-bar{font-size:12px;font-weight:600;color:var(--text-3);cursor:pointer;padding:12px 4px;text-align:center;border-top:1px dashed var(--border);margin-top:8px}
.plan-archived-bar:hover{color:var(--text-2)}
.plan-archived-hide{font-size:11.5px;font-weight:600;color:var(--text-3);cursor:pointer;padding:6px 0}
.plan-arch-note{font-size:11.5px;color:var(--text-3);line-height:1.5;padding:0 2px 10px}
.plan-arch-row{display:flex;align-items:center;gap:10px;padding:9px 2px;border-top:1px solid var(--border)}
.plan-arch-main{flex:1;min-width:0}
.plan-arch-name{font-size:13px;color:var(--text-2);line-height:1.35}
.plan-arch-meta{font-size:11px;color:var(--text-3);margin-top:2px;text-transform:capitalize}
.engine-startafter-note{font-size:11.5px;font-weight:600;color:var(--yellow);background:var(--yellow-dim);border-radius:6px;padding:7px 10px;line-height:1.45}
.pp-backlink{font-size:12.5px;font-weight:600;color:var(--text-2);cursor:pointer;padding:6px 0}
.pp-backlink:hover{color:var(--accent)}
.wn-fullplan-cta{display:flex;flex-direction:column;align-items:center;gap:7px;margin-top:24px;padding-top:22px;border-top:1px solid var(--border)}
.wn-fullplan-btn{font-family:var(--font-d);font-weight:700;font-size:14px;color:var(--accent);background:rgba(124,92,252,.10);border:1px solid rgba(124,92,252,.30);border-radius:10px;padding:11px 24px;cursor:pointer;transition:background .15s ease,transform .15s ease}
.wn-fullplan-btn:hover{background:rgba(124,92,252,.18);transform:translateY(-1px)}
.wn-fullplan-hint{font-size:12px;color:var(--text-2);opacity:.8}
.wn-view .plan-section.wn-sec-time{border-left:4px solid var(--yellow);border-top-left-radius:0;border-bottom-left-radius:0}
.wn-view .plan-section.wn-sec-forward{border-left:4px solid var(--accent);border-top-left-radius:0;border-bottom-left-radius:0}
.wn-view .plan-section.wn-sec-keep{border-left:4px solid var(--green);border-top-left-radius:0;border-bottom-left-radius:0}
.wn-sec-time .plan-section-title{color:var(--yellow)}
.wn-sec-forward .plan-section-title{color:var(--accent)}
.wn-sec-keep .plan-section-title{color:var(--green)}
.wn-view .plan-section{background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r);overflow:hidden;margin-bottom:16px}
.wn-view .plan-section-hdr{background:transparent;border-bottom:none;padding:13px 16px 7px}
.wn-view .plan-section-title{font-size:13px}
.wn-view .plan-section-body{padding:0 4px 6px}
.wn-view .plan-row{border-bottom:1px solid var(--border);padding:9px 12px}
.wn-view .plan-section-body > .plan-row:last-child{border-bottom:none}
.wn-view .plan-empty{padding:12px 14px}
.wn-view .plan-add-inline{border-top:1px solid var(--border)}
.md1-layout{display:grid;grid-template-columns:.92fr 1fr;gap:20px;align-items:start;margin-top:6px}
@media (max-width:900px){ .md1-layout{grid-template-columns:1fr} }
.md1-chat{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);overflow:hidden;display:flex;flex-direction:column;position:sticky;top:16px;max-height:calc(100vh - 32px)}
@media (max-width:900px){ .md1-chat{position:static;max-height:none} }
.md1-conv{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;min-height:220px}
.md1-chat-input{padding:11px 13px;border-top:1px solid var(--border);background:var(--surface-2)}
.md1-timeline{min-width:0}
.md-tl{position:relative;padding:2px 0}
.md-tl-row{display:grid;grid-template-columns:62px 26px 1fr;gap:8px;align-items:start}
.md-tl-time{text-align:right;font-size:12px;font-weight:500;color:var(--text-2);padding-top:12px;line-height:1.25}
.md-tl-time.penciled{color:var(--text-3);font-weight:400}
.md-tl-node{position:relative;display:flex;justify-content:center;padding-top:13px}
.md-tl-node::before{content:'';position:absolute;top:0;bottom:-14px;left:50%;width:2px;background:var(--border);transform:translateX(-50%)}
.md-tl-row:last-child .md-tl-node::before{display:none}
.md-tl-dot{width:13px;height:13px;border-radius:50%;background:var(--dot,var(--accent));border:2px solid var(--surface);box-shadow:0 0 0 3px var(--surface);z-index:1}
.md-tl-bubble{background:var(--surface-2);border:1px solid var(--border);border-radius:12px;padding:10px 13px;margin:0 0 12px;cursor:pointer;transition:border-color var(--t)}
.md-tl-bubble:hover{border-color:var(--dot,var(--accent))}
.md-tl-bubble.locked{cursor:default}
.md-tl-bubble.locked:hover{border-color:var(--border)}
.md-tl-bubble.done .md-tl-title{color:var(--text-3);text-decoration:line-through}
.md-tl-title{font-size:14px;font-weight:500;color:var(--text);line-height:1.35}
.md-tl-meta{font-size:11px;color:var(--text-3);margin-top:3px}
.md-tl-tag{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.03em}
.md-tl-empty{padding:26px 16px;text-align:center;color:var(--text-3);font-size:13px;line-height:1.5;border:1px dashed var(--border);border-radius:12px}
.md-any{margin-top:18px;border-top:1px solid var(--border);padding-top:14px}
.md-any-hdr{display:flex;align-items:center;justify-content:space-between;font-family:var(--font-d);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--text-3);margin:0 0 8px}
.md-any-add{background:transparent;border:none;color:var(--accent);font-family:var(--font-d);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;cursor:pointer;padding:2px 4px}
.md-any-add:hover{text-decoration:underline}
.md-any-empty{font-size:12.5px;color:var(--text-3);padding:4px 2px}
.md-any-row{display:flex;align-items:center;gap:10px;padding:8px 4px;cursor:pointer;border-radius:6px}
.md-any-row:hover{background:var(--surface-2)}
.md-any-row.done .md-any-title{color:var(--text-3);text-decoration:line-through}
.md-any-dot{width:9px;height:9px;border-radius:50%;background:var(--dot,var(--accent));flex:none}
.md-any-title{font-size:13px;color:var(--text);flex:1}
.md-any-tag{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.03em}
.md-tl-bubble{display:flex;align-items:flex-start;gap:8px}
.md-tl-bubble-main{flex:1;min-width:0}
.md-tl-edit,.md-any-edit{background:transparent;border:none;color:var(--text-3);cursor:pointer;padding:2px;flex:none;opacity:.6;transition:opacity var(--t),color var(--t)}
.md-tl-row:hover .md-tl-edit,.md-any-row:hover .md-any-edit{opacity:1}
.md-tl-edit:hover,.md-any-edit:hover{color:var(--accent)}
.md-any-row .md-tl-edit{margin-left:2px}
.md-add-event-btn{background:transparent;border:1px solid var(--border);border-radius:var(--r);color:var(--text-2);font-family:var(--font-b);font-size:12px;font-weight:600;padding:5px 12px;cursor:pointer}
.md-add-event-btn:hover{border-color:var(--accent);color:var(--accent)}
.plan-proj-hdr-click{cursor:pointer;transition:all var(--t)}
.plan-proj-hdr-click:hover{background:var(--surface-2)}
.plan-chat-col{min-width:0;position:sticky;top:20px;max-height:calc(100vh - 40px);display:flex;flex-direction:column}
@media (max-width: 900px){ .plan-chat-col{position:static;max-height:none} }
.plan-section{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:0;margin-bottom:16px;overflow:hidden}
.plan-keypoints{padding:10px 14px 12px;border-top:1px solid var(--border);background:var(--surface-2);display:flex;flex-direction:column;gap:6px}
.plan-keypoint{display:flex;align-items:flex-start;gap:8px;font-size:12.5px;line-height:1.5;color:var(--text-2)}
.plan-keypoint-dot{color:var(--accent);flex:0 0 auto;line-height:1.5;font-size:12px}
.plan-section-hdr{display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid var(--border);background:var(--surface-2)}
.plan-section-title{font-family:var(--font-d);font-size:13px;font-weight:700;color:var(--text);display:flex;align-items:center;gap:8px}
.plan-section-count{font-size:11px;color:var(--text-3);font-weight:600}
/* v366: Day-to-Day is read-only on What's Next — make the doorway to its workspace obvious. */
.wn-dtd-link{cursor:pointer}
.wn-dtd-link:hover{color:var(--accent);text-decoration:underline;text-underline-offset:2px}
.wn-dtd-manage{margin-left:auto;font-size:11.5px;font-weight:700;color:var(--accent);cursor:pointer;white-space:nowrap}
.wn-dtd-manage:hover{text-decoration:underline;text-underline-offset:2px}
.wn-dtd-cta{display:block;margin-top:8px;font-size:12.5px;font-weight:600;color:var(--accent);cursor:pointer}
.wn-dtd-cta:hover{text-decoration:underline;text-underline-offset:2px}
/* Rename / delete on a What's Next Day-to-Day row — always visible (no hover-only, so touch works). */
.wn-dtd-edit,.wn-dtd-del{flex-shrink:0;padding:5px;color:var(--text-3)}
.wn-dtd-edit:hover{color:var(--accent)}
.wn-dtd-del:hover{color:#f87171}
.wn-dtd-editing{display:flex;align-items:center;gap:8px}
.wn-dtd-edit-input{flex:1;min-width:0;background:var(--surface-2);border:1px solid var(--accent-border);border-radius:var(--r-sm);color:var(--text);font-size:13px;padding:7px 10px;outline:none}
.plan-section-body{padding:4px 0}
.plan-row{display:flex;align-items:center;gap:8px;padding:8px 14px;border-bottom:1px solid var(--border);min-height:42px;position:relative;transition:background var(--t)}
.plan-row:last-child{border-bottom:none}
.plan-row:hover{background:var(--surface-2)}
.plan-row.row-done{opacity:.55}
.plan-row.row-dragging{opacity:.35;background:var(--accent-dim)}
.plan-row.row-drop-above{box-shadow:inset 0 2px 0 var(--accent)}
.plan-row.row-drop-below{box-shadow:inset 0 -2px 0 var(--accent)}
.plan-drag{color:var(--text-3);font-size:13px;cursor:grab;flex-shrink:0;padding:0 2px;line-height:1;user-select:none;touch-action:none}
.plan-drag:active{cursor:grabbing}
.plan-check{width:17px;height:17px;border:1.5px solid var(--border-2);border-radius:4px;display:flex;align-items:center;justify-content:center;flex-shrink:0;cursor:pointer;transition:all var(--t)}
.plan-check:hover{border-color:var(--accent)}
.plan-check.checked{background:var(--green);border-color:var(--green)}
.plan-row-body{flex:1 1 auto;min-width:140px;display:flex;flex-direction:column;gap:2px}
.plan-row-title{font-size:13px;font-weight:500;color:var(--text);cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.35}
.plan-row-title:hover{color:var(--accent);text-decoration:underline}
.plan-row-title.strike{text-decoration:line-through;color:var(--text-3)}
.plan-row-sub{font-size:11px;color:var(--text-3);display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.plan-row-right{display:flex;align-items:center;gap:6px;flex-shrink:1;flex-wrap:wrap;justify-content:flex-end;margin-left:auto}
.plan-avatar-stack{display:flex;align-items:center}
.plan-avatar-stack .avatar{border:2px solid var(--surface);margin-left:-5px}
.plan-avatar-stack .avatar:first-child{margin-left:0}
.plan-badge{font-size:10px;padding:2px 7px;border-radius:3px;font-weight:600;white-space:normal}
.plan-badge.pri-high{background:var(--red-dim);color:var(--red)}
.plan-badge.pri-med{background:var(--yellow-dim);color:var(--yellow)}
.plan-badge.pri-low{background:var(--green-dim);color:var(--green)}
.plan-badge.due{background:var(--surface-2);color:var(--text-3)}
.plan-badge.due.overdue{background:var(--red-dim);color:var(--red)}
.plan-badge.hrs{background:var(--accent-dim);color:var(--accent)}
.plan-badge.freq-daily{background:var(--cyan-dim,rgba(14,165,233,.12));color:var(--cyan,#0ea5e9)}
.plan-badge.freq-weekly{background:var(--purple-dim,rgba(168,85,247,.12));color:var(--purple,#a855f7)}
.plan-badge.freq-monthly{background:var(--accent-dim);color:var(--accent)}
/* v336: a dormant engine used to render on the Plan page with no marker at all -- it looked
   exactly like a live routine and simply never came due. This is the marker AND the switch. */
.plan-badge.plan-badge-start{background:var(--accent-dim);color:var(--accent);cursor:pointer;border:1px solid transparent}
.plan-badge.plan-badge-start:active{border-color:var(--accent)}
.plan-row.is-dormant .plan-row-title{color:var(--text-3)}
.plan-row-ibtn{background:transparent;border:none;padding:4px;cursor:pointer;color:var(--text-3);border-radius:4px;display:flex;align-items:center;justify-content:center;transition:all var(--t)}
.plan-row-ibtn:hover{background:var(--surface-3);color:var(--text)}
.plan-row-ibtn.danger:hover{color:var(--red);background:var(--red-dim)}
.plan-proj-hdr{display:flex;align-items:center;gap:10px;padding:12px 14px;background:transparent;border-bottom:1px solid var(--border);position:relative;cursor:default}
.plan-proj-hdr:last-child{border-bottom:none}
.plan-proj-hdr.row-dragging{opacity:.35;background:var(--accent-dim)}
.plan-proj-hdr.row-drop-above{box-shadow:inset 0 2px 0 var(--accent)}
.plan-proj-hdr.row-drop-below{box-shadow:inset 0 -2px 0 var(--accent)}
.plan-proj-name{font-family:var(--font-d);font-size:14px;font-weight:700;cursor:pointer;color:var(--text)}
.plan-proj-name:hover{color:var(--accent);text-decoration:underline}
.plan-proj-count{font-size:11px;color:var(--text-3);font-weight:500}
.plan-proj-ring{width:20px;height:20px;flex-shrink:0}
.plan-completed-toggle{display:block;padding:10px 14px;background:transparent;border:none;color:var(--text-3);font-size:11px;cursor:pointer;width:100%;text-align:left;border-top:1px dashed var(--border);text-decoration:underline;font-family:var(--font-b)}
.plan-completed-toggle:hover{color:var(--accent)}
.plan-add-inline{display:flex;align-items:center;gap:6px;padding:10px 14px;background:transparent;border:none;border-top:1px dashed var(--border);color:var(--text-3);font-size:12px;cursor:pointer;width:100%;text-align:left;transition:all var(--t);font-family:var(--font-b)}
.plan-add-inline:hover{color:var(--accent);background:var(--accent-dim)}
.plan-empty{padding:14px;color:var(--text-3);font-size:12px;font-style:italic;text-align:center}
.plan-chat-wrap{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);overflow:hidden;display:flex;flex-direction:column;min-height:0;height:100%}
.plan-chat-input{padding:13px 16px;border-bottom:1px solid var(--border);background:var(--surface-2);flex:0 0 auto}
.plan-chat-input.at-bottom{border-top:1px solid var(--border);border-bottom:none}
.plan-chat-conv{padding:16px;overflow-y:auto;overscroll-behavior:contain;flex:1;min-height:0;display:flex;flex-direction:column;gap:16px}

/* ATTACHMENTS */
.attachment-tiles{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.attachment-tile{display:flex;align-items:center;gap:8px;padding:6px 10px 6px 6px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);max-width:280px;min-width:180px;transition:all var(--t)}
.attachment-tile:hover{border-color:var(--accent)}

/* PROCESSES */
.process-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);margin-bottom:12px;overflow:hidden}
.process-card-hdr{display:flex;align-items:center;gap:10px;padding:13px 16px;cursor:pointer;transition:background var(--t)}
.process-card-hdr:hover{background:var(--surface-2)}
.process-card-hdr.open{border-bottom:1px solid var(--border)}
.process-chevron{transition:transform var(--t);color:var(--text-3);flex-shrink:0}
.process-chevron.open{transform:rotate(90deg)}
.process-info{flex:1;min-width:0}
.process-name{font-size:13px;font-weight:600}
.process-meta{font-size:11px;color:var(--text-3);margin-top:2px;display:flex;gap:10px}
.process-body{padding:14px 16px;display:none}
.process-body.open{display:block}
.process-steps{display:flex;flex-direction:column;gap:7px;margin-bottom:12px}
.process-step{display:flex;align-items:center;gap:10px;padding:8px 10px;background:var(--surface-2);border-radius:var(--r-sm);cursor:pointer;transition:all var(--t)}
.process-step:hover{background:var(--surface-3)}
.process-step.done .ps-title{text-decoration:line-through;color:var(--text-3)}
.ps-check{width:18px;height:18px;border:2px solid var(--border-2);border-radius:4px;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:all var(--t)}
.process-step.done .ps-check{background:var(--green);border-color:var(--green)}
.ps-title{font-size:13px;flex:1}
.process-step-add{display:flex;gap:8px;margin-top:4px}
.process-step-add input{flex:1}
.process-progress{display:flex;align-items:center;gap:8px;margin-left:auto}
.process-progress-bar{width:60px;height:4px;background:var(--surface-3);border-radius:2px;overflow:hidden}
.process-progress-fill{height:100%;background:var(--green);border-radius:2px;transition:width .3s ease}

/* DATE DIVIDER */
.date-divider{display:flex;align-items:center;gap:10px;margin:14px 0 8px;color:var(--text-3);font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em}
.date-divider::before,.date-divider::after{content:'';flex:1;height:1px;background:var(--border)}

/* ROUTINES */
.routine-cat-section{margin-bottom:20px}
.routine-cat-title{font-family:var(--font-d);font-size:12px;font-weight:600;color:var(--text-3);text-transform:uppercase;letter-spacing:.07em;margin-bottom:10px;display:flex;align-items:center;gap:8px}
.routine-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-sm);padding:13px 16px;display:flex;align-items:center;gap:12px;margin-bottom:8px;transition:all var(--t)}
.routine-card.done{opacity:.65}
.routine-circle{width:22px;height:22px;border:2px solid var(--border-2);border-radius:50%;flex-shrink:0;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all var(--t)}
.routine-circle.done{background:var(--green);border-color:var(--green)}
.routine-info{flex:1;min-width:0}
.routine-name{font-size:13px;font-weight:500}
.routine-meta{display:flex;align-items:center;gap:10px;margin-top:3px;flex-wrap:wrap}
.routine-freq{font-size:11px;color:var(--text-3)}
.routine-streak{font-size:11px;color:var(--text-3);display:flex;align-items:center;gap:3px}
.routine-actions{display:flex;gap:3px}

/* SETTINGS */
.settings-section{margin-bottom:28px}
.settings-section-title{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--text-3);margin-bottom:14px}
.toggle-group{display:flex;gap:7px;flex-wrap:wrap}
.toggle-btn{padding:6px 16px;border-radius:var(--r-sm);border:1px solid var(--border);background:transparent;color:var(--text-2);font-family:var(--font-b);font-size:13px;cursor:pointer;transition:all var(--t)}
.toggle-btn.active{background:var(--accent-dim);border-color:var(--accent);color:var(--accent)}
.toggle-btn:hover:not(.active){background:var(--surface-2);color:var(--text)}
.focus-pills{display:flex;gap:7px;flex-wrap:wrap}
.focus-pill{padding:5px 14px;border-radius:20px;border:1px solid var(--border);background:transparent;color:var(--text-2);font-family:var(--font-b);font-size:12px;cursor:pointer;transition:all var(--t)}
.focus-pill.active{background:var(--accent-dim);border-color:var(--accent);color:var(--accent)}
.theme-row{display:flex;align-items:center;justify-content:space-between;padding:14px 0;border-bottom:1px solid var(--border)}
.theme-row-label{font-size:13px;font-weight:500}
.switch{position:relative;display:inline-block;width:44px;height:24px}
.switch input{opacity:0;width:0;height:0}
.slider{position:absolute;cursor:pointer;inset:0;background:var(--surface-3);border-radius:12px;transition:.3s}
.slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;top:3px;background:#fff;border-radius:50%;transition:.3s}
input:checked+.slider{background:var(--accent)}
input:checked+.slider:before{transform:translateX(20px)}

/* HABITS */
.habits-col{display:flex;flex-direction:column;gap:10px}
.habit-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);overflow:hidden}
.habit-card-hdr{display:flex;align-items:center;gap:10px;padding:13px 16px;cursor:pointer;transition:background var(--t)}
.habit-card-hdr:hover{background:var(--surface-2)}
.habit-card-hdr.open{border-bottom:1px solid var(--border);background:var(--surface-2)}
.habit-chevron{transition:transform var(--t);color:var(--text-3);flex-shrink:0}
.habit-chevron.open{transform:rotate(90deg)}
.habit-info{flex:1;min-width:0}
.habit-name{font-size:13px;font-weight:600}
.habit-desc{font-size:11px;color:var(--text-3);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.habit-freq-badge{font-size:10px;font-weight:600;padding:2px 8px;border-radius:10px;flex-shrink:0}
.habit-freq-daily{background:rgba(14,165,233,.15);color:var(--cyan)}
.habit-freq-weekly{background:var(--green-dim);color:var(--green)}
.habit-freq-monthly{background:var(--yellow-dim);color:var(--yellow)}
.habit-body{padding:12px 16px;display:none}
.habit-body.open{display:block}
.habit-step{display:flex;align-items:center;gap:9px;padding:7px 9px;background:var(--surface-2);border-radius:var(--r-sm);margin-bottom:6px;cursor:pointer;transition:all var(--t)}
.habit-step:hover{background:var(--surface-3)}
.habit-step.done .hs-title{text-decoration:line-through;color:var(--text-3)}
.hs-check{width:17px;height:17px;border:2px solid var(--border-2);border-radius:4px;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:all var(--t)}
.habit-step.done .hs-check{background:var(--green);border-color:var(--green)}
.hs-title{font-size:12px;flex:1}
.habit-step-add{display:flex;gap:6px;margin-top:6px}
.habit-step-add input{flex:1;font-size:12px}
.habit-actions{display:flex;gap:4px;margin-left:auto;flex-shrink:0}

/* PLAN PAGE LAYOUT */
.plan-two-col{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:24px}
.plan-col-title{font-family:var(--font-d);font-size:13px;font-weight:700;color:var(--text-2);text-transform:uppercase;letter-spacing:.06em;margin-bottom:12px;display:flex;align-items:center;justify-content:space-between}
.cal-stub{text-align:center;padding:80px 20px}
.cal-stub-icon{font-size:60px;margin-bottom:20px}
.cal-stub-title{font-family:var(--font-d);font-size:24px;font-weight:700;margin-bottom:10px}
.cal-stub-desc{font-size:14px;color:var(--text-2);max-width:400px;margin:0 auto 24px}
.feat-chips{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
.feat-chip{padding:7px 18px;border-radius:20px;background:var(--surface);border:1px solid var(--border);font-size:12px;color:var(--text-2)}

/* MODAL */
.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.72);backdrop-filter:blur(4px);z-index:200;display:flex;align-items:center;justify-content:center;opacity:0;pointer-events:none;transition:opacity var(--t)}
.modal-overlay.show{opacity:1;pointer-events:all}
.modal{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);padding:28px;width:520px;max-width:92vw;max-height:88vh;overflow-y:auto;transform:scale(.95);transition:transform var(--t);box-shadow:var(--shadow-lg)}
.modal-overlay.show .modal{transform:scale(1)}
.modal-hdr{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}
.modal-title{font-family:var(--font-d);font-size:18px;font-weight:700}
.modal-close{width:30px;height:30px;border-radius:50%;background:var(--surface-2);border:none;cursor:pointer;color:var(--text-2);display:flex;align-items:center;justify-content:center;font-size:18px;transition:all var(--t)}
.modal-close:hover{background:var(--surface-3);color:var(--text)}
.modal-footer{display:flex;gap:10px;justify-content:flex-end;margin-top:22px}

/* COLOR PICKER */
.color-swatch-row{display:flex;gap:8px;flex-wrap:wrap}
.color-swatch{width:28px;height:28px;border-radius:50%;cursor:pointer;border:3px solid transparent;transition:all var(--t)}
.color-swatch.selected{border-color:var(--text);transform:scale(1.2)}

/* MEMBER CHECKS */
.member-checks{display:flex;flex-direction:column;gap:6px}
.member-chk{display:flex;align-items:center;gap:10px;padding:8px;border-radius:var(--r-sm);cursor:pointer;transition:background var(--t)}
.member-chk:hover{background:var(--surface-2)}
.member-chk input{accent-color:var(--accent)}
.member-chk-name{font-size:13px;font-weight:500}

/* COACHING PANEL */
.coaching-panel{position:fixed;bottom:0;left:0;right:0;z-index:300;transform:translateY(100%);transition:transform .4s cubic-bezier(.25,.46,.45,.94)}
.coaching-panel.open{transform:translateY(0)}
.coaching-inner{background:var(--surface);border-top:1px solid var(--border);border-left:1px solid var(--border);border-right:1px solid var(--border);border-radius:var(--r-lg) var(--r-lg) 0 0;max-width:720px;margin:0 auto;padding:22px 24px;box-shadow:var(--shadow-lg);max-height:80vh;display:flex;flex-direction:column}
.coaching-hdr{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;flex-shrink:0}
.coaching-title{font-family:var(--font-d);font-size:15px;font-weight:700;display:flex;align-items:center;gap:8px}
.coaching-intro{flex-shrink:0;margin-bottom:14px;padding:14px;background:var(--accent-dim);border:1px solid var(--accent-border);border-radius:var(--r);font-size:13px;line-height:1.65}
.coaching-started .coaching-intro{display:none}
.coaching-msgs{flex:1;overflow-y:auto;margin-bottom:12px;display:flex;flex-direction:column;gap:12px;min-height:80px}
.coaching-input-row{flex-shrink:0;display:flex;gap:10px;align-items:flex-end}
.coaching-input-row textarea{flex:1;resize:none;min-height:44px;max-height:110px}
.coaching-cta-row{display:flex;gap:10px;flex-shrink:0;margin-top:6px}
.coaching-started .coaching-cta-row{display:none}

/* LOADING */
.loading-indicator{position:fixed;inset:0;background:rgba(0,0,0,.55);backdrop-filter:blur(3px);z-index:600;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;opacity:0;pointer-events:none;transition:opacity .2s ease}
.loading-indicator.show{opacity:1;pointer-events:all}
.loading-inner{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);padding:36px 48px;display:flex;flex-direction:column;align-items:center;gap:16px;box-shadow:var(--shadow-lg)}
.dots{display:flex;gap:8px}
.dots span{width:12px;height:12px;border-radius:50%;background:var(--accent);animation:bounce 1.2s ease-in-out infinite}
.dots span:nth-child(2){animation-delay:.2s}
.dots span:nth-child(3){animation-delay:.4s}
@keyframes bounce{0%,80%,100%{transform:scale(.5);opacity:.3}40%{transform:scale(1);opacity:1}}
.loading-text{font-family:var(--font-d);font-size:15px;font-weight:600;color:var(--text-2)}

/* HABIT PAGE */
.habit-page-grid{display:grid;grid-template-columns:380px 1fr;gap:24px;align-items:start}
.habit-schedule-col{display:flex;flex-direction:column;gap:16px}
.habit-page-title{font-family:var(--font-d);font-size:20px;font-weight:700;margin-bottom:4px}
.habit-page-desc{font-size:13px;color:var(--text-2);line-height:1.6;margin-bottom:16px}
.habit-steps-section{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:16px}
.habit-steps-section h3{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--text-3);margin-bottom:12px}
.habit-sched-section{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:16px}
.habit-sched-section h3{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--text-3);margin-bottom:12px}
.habit-days-row{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:16px}
.habit-day-btn{width:38px;height:38px;border-radius:50%;border:1.5px solid var(--border);background:transparent;color:var(--text-2);font-family:var(--font-d);font-size:11px;font-weight:700;cursor:pointer;transition:all var(--t);display:flex;align-items:center;justify-content:center}
.habit-day-btn.active{background:var(--accent);border-color:var(--accent);color:#fff}
.habit-day-btn:hover:not(.active){border-color:var(--accent);color:var(--accent)}
.habit-time-list{display:flex;flex-direction:column;gap:4px;max-height:420px;overflow-y:auto}
.habit-time-slot{display:flex;align-items:center;gap:10px;padding:7px 10px;border-radius:var(--r-sm);border:1.5px solid var(--border);background:transparent;cursor:pointer;transition:all var(--t);color:var(--text-2);font-size:12px;font-weight:500;user-select:none}
.habit-time-slot:hover{border-color:var(--accent);color:var(--text)}
.habit-time-slot.active{background:var(--accent-dim);border-color:var(--accent);color:var(--accent)}
.habit-time-dot{width:8px;height:8px;border-radius:50%;border:2px solid currentColor;flex-shrink:0;transition:all var(--t)}
.habit-time-slot.active .habit-time-dot{background:currentColor}
.habit-time-none{font-style:italic;color:var(--text-3)}
.habit-time-slot.active .habit-time-none{color:var(--accent);font-style:normal}


/* ANIMATIONS */
@keyframes fadeIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
.fade-in{animation:fadeIn .25s ease forwards}

/* MISC */
.flex{display:flex}.flex-center{display:flex;align-items:center}
.gap-6{gap:6px}.gap-8{gap:8px}.gap-12{gap:12px}
.mt-4{margin-top:4px}.mt-8{margin-top:8px}.mt-12{margin-top:12px}.mt-16{margin-top:16px}
.mb-8{margin-bottom:8px}.mb-16{margin-bottom:16px}
.ml-auto{margin-left:auto}
.text-sm{font-size:12px}.text-xs{font-size:11px}
.text-muted{color:var(--text-2)}.text-dim{color:var(--text-3)}
.text-accent{color:var(--accent)}.text-green{color:var(--green)}.text-red{color:var(--red)}.text-yellow{color:var(--yellow)}
.font-d{font-family:var(--font-d)}.font-bold{font-weight:700}.font-medium{font-weight:500}
.w-100{width:100%}
.empty-state{text-align:center;padding:40px 20px;color:var(--text-3)}
.empty-icon{font-size:36px;margin-bottom:12px}
.empty-text{font-size:13px}
.priority-high{background:var(--red-dim);color:var(--red)}
.priority-medium{background:var(--yellow-dim);color:var(--yellow)}
.priority-low{background:var(--green-dim);color:var(--green)}

/* MY DAY / MY WEEK */
.myday-tabs{display:flex;gap:4px;background:var(--surface-2);border-radius:var(--r-sm);padding:3px}
.myday-tab{padding:5px 18px;border-radius:5px;border:none;background:transparent;color:var(--text-2);font-family:var(--font-b);font-size:13px;font-weight:500;cursor:pointer;transition:all var(--t)}
.myday-tab.active{background:var(--surface);color:var(--text);box-shadow:0 1px 4px rgba(0,0,0,.2)}
.myday-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px;gap:12px;flex-wrap:wrap}
.myday-date-lbl{font-size:12px;color:var(--text-3);margin-top:3px}
.myday-layout{display:grid;grid-template-columns:360px 1fr;gap:20px;align-items:start;margin-bottom:24px}
.myday-section-hdr{font-family:var(--font-d);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--text-3);margin-bottom:10px;display:flex;align-items:center;gap:6px}
.myday-list-col{display:flex;flex-direction:column;gap:18px}
.myday-item{display:flex;align-items:center;gap:9px;padding:9px 12px;background:var(--surface);border:1px solid var(--border);border-left:3px solid transparent;border-radius:var(--r-sm);transition:all var(--t);cursor:default}
.myday-item:hover{border-color:var(--border-2);border-left-color:inherit}
.myday-item.task-item-day{border-left-color:var(--accent);cursor:grab}
.myday-item.task-item-day:active{cursor:grabbing}
.myday-item.habit-item-day{border-left-color:var(--cyan)}
/* v91 (Grace): Time block items in My Day sidebar — orange to distinguish from tasks
   (purple) and habits (cyan). These represent standing unavailable time (classes,
   standing meetings, sleep hours). Not draggable — they're anchored to specific times.
   Click opens the edit modal. */
.myday-item.block-item-day{border-left-color:var(--orange);cursor:pointer}
.myday-item.block-item-day .myday-item-title{color:var(--orange)}
.myday-item.done-item{opacity:.5}
.myday-item.done-item .myday-item-title{text-decoration:line-through;color:var(--text-3)}
.myday-check{width:18px;height:18px;border:2px solid var(--border-2);border-radius:4px;display:flex;align-items:center;justify-content:center;flex-shrink:0;cursor:pointer;transition:all var(--t)}
.myday-check:hover{border-color:var(--accent)}
.myday-check.checked{background:var(--green);border-color:var(--green)}
/* v115e: brief pulse on habit-done transition. Adds dopamine-through-state-change feedback
   without leaning on streaks/badges. JS adds .just-checked for ~500ms, then removes it. */
.myday-check.just-checked,.done-circle.just-checked,.mdx-check.just-checked,.md-focus-check.just-checked{animation:mdCheckPulse .45s ease-out}
@keyframes mdCheckPulse{
  0%{transform:scale(1);box-shadow:0 0 0 0 var(--green)}
  40%{transform:scale(1.35);box-shadow:0 0 0 6px rgba(34,197,94,.35)}
  100%{transform:scale(1);box-shadow:0 0 0 0 rgba(34,197,94,0)}
}
@media (prefers-reduced-motion: reduce){ .just-checked{animation:none} }
.myday-item-body{flex:1;min-width:0}
.myday-item-title{font-size:12px;font-weight:500;color:var(--accent);cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.myday-item-title:hover{text-decoration:underline}
.myday-item-sub{font-size:10px;color:var(--text-3);margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.myday-item-right{display:flex;align-items:center;gap:6px;flex-shrink:0}
.myday-avatar{width:20px;height:20px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:9px;font-weight:700;color:#fff;flex-shrink:0;font-family:var(--font-d)}
.myday-type-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0}
/* v91: Block edit modal — simple form grid for label/times/days */
.block-edit-form{display:flex;flex-direction:column;gap:12px;padding:4px 2px}
.block-edit-row{display:flex;flex-direction:column;gap:5px}
.block-edit-row label{font-size:11px;color:var(--text-2);font-family:var(--font-d);font-weight:600;text-transform:uppercase;letter-spacing:.05em}
.block-edit-row input[type=text],.block-edit-row input[type=time]{background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);padding:8px 10px;color:var(--text);font-family:var(--font-b);font-size:13px;outline:none}
.block-edit-row input:focus{border-color:var(--orange)}
.block-edit-times{display:flex;gap:10px;align-items:center}
.block-edit-times input[type=time]{flex:1}
.block-edit-times .sep{font-size:13px;color:var(--text-3)}
.block-edit-days{display:flex;gap:6px;flex-wrap:wrap}
.block-edit-daypill{background:var(--surface-2);border:1px solid var(--border);border-radius:14px;padding:5px 11px;font-size:11px;color:var(--text-2);cursor:pointer;font-family:var(--font-b);font-weight:500;user-select:none;transition:all var(--t)}
.block-edit-daypill.active{background:rgba(249,115,22,.15);border-color:var(--orange);color:var(--orange)}
.block-edit-daypill:hover{border-color:var(--orange)}
/* TIME STRIP */
.myday-cal-col{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);overflow:hidden}
.myday-cal-hdr{padding:12px 16px;border-bottom:1px solid var(--border);background:var(--surface-2);font-family:var(--font-d);font-size:12px;font-weight:700;color:var(--text-2);text-transform:uppercase;letter-spacing:.07em;display:flex;align-items:center;justify-content:space-between}
.myday-strip{display:flex;flex-direction:column;position:relative}
.myday-hour-strip{max-height:620px;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin}
.myday-hour-strip::-webkit-scrollbar{width:10px}
.myday-hour-strip::-webkit-scrollbar-track{background:var(--surface-2)}
.myday-hour-strip::-webkit-scrollbar-thumb{background:var(--border-2);border-radius:5px}
.myday-hour-strip::-webkit-scrollbar-thumb:hover{background:var(--text-3)}
.myday-unscheduled-row{display:grid;grid-template-columns:52px 1fr;border-bottom:1px solid var(--border);min-height:38px;background:rgba(245,158,11,.04)}
.myday-unscheduled-label{padding:9px 8px 0 12px;font-size:10px;font-weight:600;color:var(--yellow);line-height:1;flex-shrink:0;white-space:nowrap}
.myday-entry-remove{font-size:13px;color:var(--text-3);cursor:pointer;flex-shrink:0;padding:0 2px;margin-left:2px;line-height:1;border-radius:3px;opacity:.6}
.myday-entry-remove:hover{color:var(--red);background:var(--red-dim);opacity:1}
.myday-hour-row{display:grid;grid-template-columns:52px 1fr 24px;border-bottom:1px dashed var(--border);min-height:30px;position:relative;overflow:visible}
.myday-hour-row.half-row{border-bottom:1px solid var(--border);opacity:.9}
.myday-hour-row.half-row .myday-hour-add{opacity:.25}
.myday-hour-row.span-row{height:auto;min-height:54px}
.myday-hour-label{padding:9px 8px 0 12px;font-size:10px;font-weight:600;color:var(--text-3);line-height:1;flex-shrink:0;white-space:nowrap}
.myday-hour-entries{padding:4px 8px;display:flex;flex-direction:column;gap:3px;justify-content:center;position:relative}
.myday-hour-add{display:flex;align-items:center;justify-content:center;opacity:.45;transition:opacity var(--t);cursor:pointer;color:var(--text-3);font-size:16px;font-weight:300;line-height:1;padding:0 4px;align-self:center}
.myday-hour-add:hover{opacity:1;color:var(--accent)}
.myday-entry{display:flex;align-items:flex-start;gap:7px;padding:5px 6px;border-radius:4px;font-size:11px;position:relative;cursor:pointer;min-width:0}
.myday-entry.type-task{background:var(--accent-dim);border-left:2px solid var(--accent)}
.myday-entry.type-habit{background:rgba(14,165,233,.1);border-left:2px solid var(--cyan)}
.myday-entry.type-manual{background:rgba(245,158,11,.12);border-left:2px solid var(--yellow)}
.myday-entry.entry-done{opacity:.45}
.myday-entry.entry-multihr{position:absolute;left:8px;right:28px;top:4px;z-index:6;overflow:hidden;align-items:flex-start;padding-top:6px}
.myday-entry:hover{filter:brightness(1.12)}
.myday-entry-grip{font-size:12px;color:var(--text-3);flex-shrink:0;cursor:grab;line-height:1;padding:0 1px}
.myday-entry-grip:active{cursor:grabbing}
.myday-entry-check{width:14px;height:14px;border:1.5px solid var(--border-2);border-radius:3px;display:flex;align-items:center;justify-content:center;flex-shrink:0;cursor:pointer;transition:all var(--t)}
.myday-entry-check:hover{border-color:var(--accent)}
.myday-entry-check.checked{background:var(--green);border-color:var(--green)}
.myday-entry-link{color:var(--text);font-weight:500;cursor:pointer;flex:1;min-width:0;word-break:break-word;overflow-wrap:anywhere;line-height:1.3}
.myday-entry-link:hover{color:var(--accent);text-decoration:underline}
.myday-entry-av{width:16px;height:16px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:8px;font-weight:700;color:#fff;flex-shrink:0;font-family:var(--font-d)}
.myday-entry-icon{font-size:10px;flex-shrink:0}
.myday-entry-dur{font-size:9px;color:var(--text-3);flex-shrink:0;margin-left:2px}
.myday-entry-pct{font-size:10px;font-weight:700;color:var(--accent);flex-shrink:0;margin-left:2px;background:var(--accent-dim);padding:1px 5px;border-radius:3px;cursor:pointer;border:1px solid var(--accent-border)}
.myday-entry-pct:hover{background:var(--accent);color:#fff}
.myday-entry-resize{font-size:10px;color:var(--text-3);cursor:pointer;flex-shrink:0;padding:2px 3px;border-radius:3px;font-weight:600}
.myday-entry-resize:hover{color:var(--accent);background:var(--surface-3)}
/* DRAG GHOST */
.drag-ghost{position:fixed;pointer-events:none;z-index:9999;opacity:.85;background:var(--accent-dim);border:1.5px solid var(--accent);border-radius:6px;padding:4px 10px;font-size:12px;font-weight:500;color:var(--accent);white-space:nowrap;box-shadow:var(--shadow-lg);transform:rotate(1deg)}
/* DROP TARGET */
.drop-target-active{background:var(--accent-dim)!important;outline:2px dashed var(--accent);outline-offset:-2px}
/* HELP STRIP */
.myday-help-strip{background:linear-gradient(135deg,var(--accent-dim),rgba(14,165,233,.08));border:1px solid var(--accent-border);border-radius:var(--r);padding:14px 18px;margin-bottom:18px;display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.myday-help-text{flex:1;min-width:200px}
.myday-help-inspiration{font-size:13px;font-weight:600;color:var(--text);margin-bottom:4px}
.myday-help-sub{font-size:11px;color:var(--text-2);line-height:1.5}
.myday-help-actions{display:flex;gap:8px;flex-shrink:0;flex-wrap:wrap}
/* % DONE BAR */
.pct-done-bar-wrap{margin-top:8px}
.pct-done-bar{height:5px;background:var(--surface-3);border-radius:3px;overflow:hidden;margin-top:4px}
.pct-done-fill{height:100%;border-radius:3px;background:var(--accent);transition:width .4s ease}
/* WEEK VIEW */
.week-day-section{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);margin-bottom:12px;overflow:hidden}
.week-day-section.week-day-today{border-color:var(--accent)}
.week-day-section.week-drop-active{border-color:var(--green);background:var(--green-dim)}
.week-day-section.week-drop-active .week-day-body{background:var(--green-dim)}
.week-day-hdr{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;background:var(--surface-2);cursor:pointer;transition:background var(--t);gap:12px}
.week-day-hdr:hover{background:var(--surface-3)}
.week-day-section.week-day-today .week-day-hdr{background:var(--accent-dim)}
.week-day-hdr-left{display:flex;align-items:center;gap:10px}
.week-day-name{font-family:var(--font-d);font-size:13px;font-weight:700;color:var(--text)}
.week-day-section.week-day-today .week-day-name{color:var(--accent)}
.week-day-date{font-size:11px;color:var(--text-3)}
.week-day-hdr-count{display:flex;align-items:center;gap:6px;flex-shrink:0}
.week-day-body{padding:10px 16px 12px}
/* INTRO POPUP */
.myday-intro-bubble{background:var(--accent-dim);border:1px solid var(--accent-border);border-radius:var(--r);padding:14px 16px;font-size:13px;line-height:1.65;margin-bottom:16px}
.blocked-hours-row{display:flex;gap:10px;align-items:center}
.blocked-hours-row select{width:auto;flex:1}
/* WORKING SESSION */
.ws-start-btn{background:#dc2626;color:#fff;border:none;border-radius:8px;padding:12px 20px;font-size:14px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:8px;transition:all var(--t);box-shadow:0 2px 8px rgba(220,38,38,.25)}
.ws-start-btn:hover{background:#b91c1c;transform:translateY(-1px);box-shadow:0 4px 12px rgba(220,38,38,.35)}
.ws-start-btn svg{width:14px;height:14px}
.ws-past-link{display:inline-block;margin-left:12px;font-size:12px;color:var(--text-3);text-decoration:none;cursor:pointer}
.ws-past-link:hover{color:var(--accent);text-decoration:underline}
.ws-page{display:grid;grid-template-columns:1fr;gap:14px;padding:16px 20px 40px;min-height:calc(100vh - 60px)}
@media (min-width:1100px){ .ws-page{grid-template-columns:2fr 1fr} }
.ws-task-desc{font-size:13px;color:var(--text-2);line-height:1.6;margin-top:6px;max-width:760px}
.ws-task-bar{display:flex;align-items:center;gap:10px;margin-top:12px}
.ws-task-bar-label{font-size:13px;font-weight:500;color:var(--text-2);cursor:pointer}
.ws-del-btn{background:transparent;border:1px solid var(--border);color:var(--text-3);width:28px;height:28px;border-radius:6px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all var(--t)}
.ws-del-btn:hover{border-color:var(--red);color:var(--red)}
.ws-header{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:14px;padding-bottom:12px;border-bottom:1px solid var(--border);flex-wrap:wrap}
.ws-header-left{display:flex;align-items:center;gap:14px;min-width:0;flex:1}
.ws-back{color:var(--text-3);text-decoration:none;font-size:13px;cursor:pointer}
.ws-back:hover{color:var(--accent)}
/* v89: Back button — more prominent than the old gray text link. Paul's feedback: the
   previous breadcrumb was too easy to miss. */
.ws-back-btn{background:var(--surface-2);border:1px solid var(--border);color:var(--text-2);padding:7px 14px;border-radius:var(--r);font-size:13px;font-family:var(--font-b);font-weight:500;cursor:pointer;transition:all var(--t);display:inline-flex;align-items:center;gap:4px}
.ws-back-btn:hover{background:var(--surface-3);color:var(--text);border-color:var(--accent)}
/* v89: Prominent task title slot — full-width row between the header bar and the
   two-column body. Lives in the `title` grid-template-area on desktop. Mobile uses
   the natural source order and the title shows just below the header. */
.ws-task-title-slot{grid-column:1/-1;padding:4px 0 6px}
.ws-task-title-slot h1{font-family:var(--font-d);font-size:24px;font-weight:700;color:var(--text);margin:0;line-height:1.25;letter-spacing:-0.01em}
/* v317: THE DONE CIRCLE. Until now the only way to close anything was to drill into a Work
   Session, and routines and habits had no equivalent surface at all -- nothing in the codebase
   ever wrote a completion for a goal's routine or habit, so the hit-rate donuts could never
   move off zero. Every row that represents a doable thing now carries this control on the left.
   Tap the circle to close it, tap the row to open it. 30px hit target, mobile-first. */
.done-circle {
  flex: 0 0 auto; width: 22px; height: 22px; margin-right: 10px; border-radius: 50%;
  border: 2px solid var(--border); background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: transparent; font-size: 13px; line-height: 1; padding: 0;
  transition: border-color .12s, background .12s, color .12s;
}
.done-circle:active { transform: scale(.92); }
.done-circle.is-done { border-color: var(--green, #51cf66); background: var(--green, #51cf66); color: #0b0b0f; }
.done-circle.is-locked { opacity: .35; cursor: not-allowed; }
.done-circle-pad { display: inline-flex; align-items: center; padding: 4px; margin: -4px 0 -4px -4px; }
/* v324: the gate is now an icon. Same colour language, a fraction of the width. */
.plan-badge-gate { background: rgba(240,200,80,.14); color: var(--yellow); cursor: help; }
/* v324: next scheduled date, small and quiet, immediately left of the row's delete control. */
.plan-nextdue {
  font-family: var(--font-b); font-size: 11px; color: var(--text-3);
  white-space: nowrap; margin-left: 2px; cursor: help;
}
/* v324: any row title that runs out of room clips with an ellipsis and carries its full text in
   the tooltip. Without the min-width:0 the flex child refuses to shrink and the row overflows
   instead of truncating. */
.plan-row-body { min-width: 0; }
.plan-row-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
/* v327: the group selector on My Day. Right-aligned and quiet -- it narrows the view, it is not
   a control the user has to engage with to read the day. */
.md-view-bar { display: flex; justify-content: flex-end; margin: 14px 0 2px; }
.md-view-filter { width: auto; min-width: 190px; font-size: 12px; }
/* v318: the calendar chip is too small for the full control, so its dot becomes the target. */
.cal-ad-check { cursor: pointer; box-shadow: 0 0 0 3px transparent; border-radius: 50%; }
.cal-ad-check:hover, .cal-ad-check:active { box-shadow: 0 0 0 3px rgba(255,255,255,.14); }
.cal-ad-check.is-done { background: var(--green, #51cf66) !important; }

/* v89: Helper text below the What's Next panel — reminds the user they can ask
   questions in the chat about any micro-step. Paul's v88 feedback. */
.ws-msteps-helper{padding:10px 14px 12px;font-size:12px;color:var(--text-3);font-style:italic;border-top:1px solid var(--border);background:var(--surface-2);line-height:1.5}
/* v147: direction-line element — sits under OUR NEXT STEPS panel, shows "Coming up → <text>".
   Soft, low-commitment styling. Visible when task.directionLine is set AND panel has steps. */
.ws-msteps-direction{padding:12px 14px;font-size:13px;color:var(--text-2);line-height:1.5;border-top:1px solid var(--border);background:var(--surface-2)}
.ws-msteps-direction-label{color:var(--accent-3,#7c6cff);font-weight:600;margin-right:6px}
/* v114.1: Momentum message — appears under the panel after the user's first checkoff
   in a session. Soft accent purple (not red — that reads as alarm), bold to differentiate
   from the helper text below it. Acts as a positive change indicator: "you just moved
   the needle, and here's how close you are." */
.ws-msteps-momentum{padding:10px 14px;font-size:12px;color:var(--accent);font-weight:600;border-top:1px solid var(--border);background:var(--accent-dim);line-height:1.5;text-align:center}
.ws-title{font-size:17px;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ws-timer{font-size:13px;color:var(--text-2);font-variant-numeric:tabular-nums;background:var(--accent-dim);padding:4px 10px;border-radius:6px;border:1px solid var(--accent-border)}
.ws-timer.idle{background:rgba(245,158,11,.1);border-color:rgba(245,158,11,.3);color:var(--yellow)}
.ws-end-btn{background:#dc2626;color:#fff;border:none;border-radius:6px;padding:8px 14px;font-size:13px;font-weight:600;cursor:pointer}
.ws-end-btn:hover{background:#b91c1c}
/* v85 WORK SESSION LAYOUT
   Narrow (default): single column, source order is What's Next → Today → Chat → Past.
   Desktop (≥1100px): two columns — LEFT keeps today notepad + past notepads, RIGHT keeps
   micro-steps panel + chat stacked under it. Uses grid-template-areas so sections stay
   semantically labeled and rearranging is just a CSS edit, not DOM restructuring.

   Banner/header span both columns. Past-notepads section is hidden when empty (no row
   created on mobile, no extra padding on desktop). */
.ws-msteps-section,
.ws-today-section,
.ws-chat-section,
.ws-past-section,
.ws-tour-slot { min-width: 0; }
.ws-past-section:empty { display: none; }
.ws-today-section{display:flex;flex-direction:column;gap:12px}
.ws-past-section{display:flex;flex-direction:column;gap:12px}
.ws-chat-section{display:flex;flex-direction:column;gap:8px}
.ws-chat-card{display:flex;flex-direction:column;min-height:0;flex:1 1 auto}
.ws-chat-conv-fill{overflow-y:auto;overscroll-behavior:contain;max-height:55vh}
@media (min-width:1100px){
  /* v144: layout flipped — chat is now the primary surface (wide left column).
     msteps + notes (today) + past stack in the narrow right column. Reason:
     with v143 AI/user-split tasks, much of the actual work output now lives
     in the chat (AI research summaries, drafts, etc.), so chat needs the
     room. Notes editor becomes a sidecar/asset-storage surface. */
  .ws-page{
    grid-template-columns:2fr 1fr;
    grid-template-areas:
      "banner banner"
      "header header"
      "title  title"
      "chat   msteps"
      "chat   today"
      "chat   past";
  }
  .ws-tour-slot{grid-area:banner}
  .ws-header{grid-area:header}
  .ws-task-title-slot{grid-area:title}
  .ws-today-section{grid-area:today}
  .ws-msteps-section{grid-area:msteps}
  /* Chat is no longer sticky — it is the wide primary column, scrolls naturally. */
  .ws-chat-section{grid-area:chat;position:sticky;top:20px;align-self:start}
  .ws-chat-conv-fill{flex:1 1 auto;min-height:0;max-height:none}
  .ws-past-section{grid-area:past}
}

/* v364b — "Take a note" POPUP (desktop + mobile). A scrim overlay + centered card; the mobile
   media query above flattens the card into a full-screen sheet. Tap the scrim to cancel. */
.ws-note-modal{position:fixed;inset:0;z-index:130;background:rgba(0,0,0,.55);display:flex;align-items:center;justify-content:center;padding:24px}
.ws-note-modal .ws-note-edit{display:flex;flex-direction:column;width:620px;max-width:100%;max-height:82vh;margin:0;background:var(--surface);border:1px solid var(--border);border-radius:16px;box-shadow:0 24px 60px rgba(0,0,0,.5);padding:18px 20px}
.ws-note-modal .ws-day-hdr{flex-shrink:0;margin-bottom:12px}
.ws-note-modal .ws-editor{flex:1 1 auto;min-height:200px;overflow-y:auto;background:#fff;border-radius:12px}

/* v364 — CHAT-FIRST work session on phones. The desktop 2-column layout stacks badly on mobile
   (chat gets buried under the steps). Here the page becomes a fixed-height flex column: a slim
   header + title, the steps capped to a scrollable strip, and the chat filling the rest with its
   composer naturally pinned at the bottom. Scoped to .ws-worksession so the routine/habit pages
   (which reuse .ws-page + .engine-page) are untouched. */
@media(max-width:768px){
  .ws-worksession{display:flex;flex-direction:column;gap:8px;height:100%;min-height:0;padding:10px 14px 0;overflow:hidden}
  /* Note popup becomes a full-screen sheet on phones (base modal styling is below, outside the
     media query so it applies on desktop too). */
  .ws-note-modal{padding:0;background:var(--bg)}
  .ws-note-modal .ws-note-edit{width:100%;max-width:100%;height:100%;max-height:none;border:none;border-radius:0;padding:14px 16px calc(16px + env(safe-area-inset-bottom,0px))}
  .ws-worksession .ws-header{padding-bottom:8px;flex-shrink:0;flex-wrap:nowrap;gap:8px;border-bottom:1px solid var(--border)}
  .ws-worksession .ws-header-left{flex:1;min-width:0}
  .ws-worksession .ws-back-btn{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:6px 11px;font-size:12px}
  .ws-worksession .ws-timer{font-size:11.5px;padding:3px 8px}
  .ws-worksession .ws-end-btn{padding:7px 11px;font-size:12px}
  .ws-worksession .ws-task-title-slot{flex-shrink:0;padding:0}
  .ws-worksession .ws-task-title-slot h1{font-size:18px;line-height:1.22}
  .ws-worksession .ws-task-desc{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:12px;margin-top:4px}
  /* #1/#2 short labels so nothing wraps on a phone */
  .ws-worksession .ws-back-full{display:none}
  .ws-worksession .ws-back-short{display:inline}
  .ws-worksession .ws-tasklabel-full{display:none}
  .ws-worksession .ws-tasklabel-short{display:inline}
  /* #3 the pinned "current step" bar: drop the verbose "just answer in chat" filler, keep it a
     tiny progress line + any real action button (Have Grace do it / check off) */
  .ws-worksession .ws-stepbar-tell{display:none}
  .ws-worksession .ws-pinned-step .ws-step-label{font-size:11px;margin:0 0 2px}
  /* #4 Steps is a FLIP, not a squish — chat OR steps, never both crammed. */
  .ws-worksession .ws-steps-bar{display:flex;align-items:center;gap:9px;width:100%;flex-shrink:0;background:var(--surface-2);border:1px solid var(--border);border-radius:11px;padding:11px 14px;font-family:var(--font-d);font-weight:700;font-size:13px;color:var(--text);cursor:pointer}
  .ws-worksession .ws-steps-n{margin-left:auto;font-size:12px;font-weight:600;color:var(--text-3)}
  .ws-worksession .ws-steps-chev{width:16px;height:16px;flex-shrink:0;transition:transform .2s}
  .ws-worksession .ws-steps-lbl-open{display:none}
  .ws-worksession.ws-steps-open .ws-steps-lbl-closed{display:none}
  .ws-worksession.ws-steps-open .ws-steps-lbl-open{display:inline}
  .ws-worksession.ws-steps-open .ws-steps-n{display:none}
  .ws-worksession.ws-steps-open .ws-steps-chev{transform:rotate(180deg)}
  .ws-worksession:not(.ws-steps-open) .ws-msteps-section{display:none}
  .ws-worksession.ws-steps-open .ws-msteps-section{flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto;-webkit-overflow-scrolling:touch}
  .ws-worksession.ws-steps-open .ws-chat-section{display:none}
  .ws-worksession .ws-chat-section{flex:1 1 auto;min-height:0}
  .ws-worksession .ws-chat-card{flex:1 1 auto;min-height:0}
  .ws-worksession .ws-chat-conv-fill{max-height:none;flex:1 1 auto;min-height:0}
  /* Focused work session: hide the global bottom tab bar + reclaim its space */
  body.ws-focus #mobile-tabbar{display:none}
  body.ws-focus #main-content{padding-bottom:0}
}
/* Mobile-only chrome — never show on desktop (steps are always visible there, labels are full) */
.ws-steps-bar,.ws-back-short,.ws-tasklabel-short{display:none}
/* v106 Letterhead — display-mode card uses standard surface tokens so it reads as part of
   the app shell (matches WHAT'S NEXT panel surface). Border-radius bumped 8→10 to match the
   app's --r token; the band header below uses 9px corners (10 minus 1px border) to nest cleanly.
   .ws-day.editing keeps its amber border + shadow — that accent is owned by edit mode now,
   while the inner editor (.ws-editor) provides the writing surface (cream/white per existing
   line ~1051 + line ~1089 rules, untouched). */
.ws-day{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:14px 20px;color:var(--text)}
.ws-day.past{opacity:.85}
.ws-day.readonly{background:var(--surface-2);border-color:var(--border-2);color:var(--text-2);opacity:1}
.ws-day.editing{background:var(--surface);border-color:#ca8a04;box-shadow:0 0 0 2px rgba(234,179,8,.15)}
/* v98: I-beam cursor (carried from v93) — applies to the inner .ql-editor that Quill renders.
   Black SVG I-beam with white outline so it stays visible on the near-white editing-state
   background. OS default I-beam can render too thin to see on pure white. Readonly notes
   keep cursor:default via the .ws-editor[contenteditable=false] rule below. */
.ws-day.editing .ws-editor,
.ws-day.editing .ws-editor.ql-container .ql-editor{background:#ffffff;cursor:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='20' viewBox='0 0 16 20'><path d='M5 1 H11 V3 H9 V17 H11 V19 H5 V17 H7 V3 H5 Z' fill='black' stroke='white' stroke-width='0.5'/></svg>") 8 10, text}
.ws-edit-toggle-btn{background:transparent;border:1px solid #ca8a04;color:#78350f;padding:5px 12px;font-size:12px;font-weight:600;border-radius:5px;cursor:pointer;display:inline-flex;align-items:center;gap:4px;transition:all var(--t)}
.ws-edit-toggle-btn:hover{background:rgba(234,179,8,.2)}
.ws-edit-toggle-btn.saving{background:#16a34a;color:#fff;border-color:#15803d}
.ws-edit-toggle-btn.saving:hover{background:#15803d}
/* v106 Letterhead — Edit button display-mode override. Scoped to .ws-day:not(.editing) so
   edit mode keeps its deep-amber-on-cream styling (where .ws-attach-btn shares the same look).
   :not(.saving) preserves the green Save state during the save transition. */
.ws-day:not(.editing) .ws-edit-toggle-btn:not(.saving){border-color:var(--letterhead-accent-border);color:var(--letterhead-accent)}
.ws-day:not(.editing) .ws-edit-toggle-btn:not(.saving):hover{background:rgba(245,158,11,.15)}
.ws-day-hdr{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px;flex-wrap:wrap}
/* v106 Letterhead — amber band header in display mode only. Negative margins eat into the
   day card's 14px/20px padding so the band touches the card's inner edges. Top corners are
   9px (card's 10px outer minus 1px border) so the band nests cleanly inside the rounded card.
   Scoped to :not(.editing):not(.readonly) so edit mode and readonly mode keep the original
   flat header. The body-side margin (14px) restores spacing between the band and the editor
   content below. */
.ws-day:not(.editing):not(.readonly) .ws-day-hdr{margin:-14px -20px 14px -20px;padding:13px 22px;background:var(--letterhead-band-bg);border-bottom:1px solid var(--letterhead-band-border);border-radius:9px 9px 0 0}
.ws-day-date{font-weight:700;font-size:14px;color:#78350f}
.ws-day:not(.editing):not(.readonly) .ws-day-date{color:var(--letterhead-accent)}
.ws-day.readonly .ws-day-date{color:var(--text)}
.ws-day-time{font-size:12px;font-weight:600;color:#92400e;background:rgba(234,179,8,.18);padding:3px 8px;border-radius:4px}
/* In Letterhead the time pill sits inside the amber band, so it needs a slightly more
   saturated background than the band tint to remain visually distinct. */
.ws-day:not(.editing):not(.readonly) .ws-day-time{color:var(--letterhead-accent);background:rgba(245,158,11,.2)}
.ws-day.readonly .ws-day-time{color:var(--text-2);background:var(--panel-2)}
/* v106: --text-3 instead of #a16207 — reads as standard app metadata across both themes
   and avoids illegibility against dark surface in dark-mode Letterhead. */
.ws-day-time-list{font-size:11px;color:var(--text-3);font-weight:500}
.ws-day.readonly .ws-day-time-list{color:var(--text-3)}
/* === v102: Bubble theme + inline Attach button. The Attach button now sits in the day
   header alongside the timer and Edit/Save button (Paul's v101 feedback — the standalone row
   above the editor was awkward). It's styled to visually match `.ws-edit-toggle-btn` so the
   header reads as a clean "actions" row. The bubble popover styles below are belt-and-suspenders
   mitigations for v101's "popover never appears" bug — see comments on `.ql-tooltip`. === */
.ws-attach-btn{background:transparent;border:1px solid #ca8a04;color:#78350f;padding:5px 12px;font-size:12px;font-weight:600;border-radius:5px;cursor:pointer;display:inline-flex;align-items:center;gap:4px;transition:all var(--t);font-family:inherit;line-height:1.2;touch-action:manipulation;-webkit-user-select:none;user-select:none}
.ws-attach-btn:hover,.ws-attach-btn:focus{background:rgba(234,179,8,.2);outline:none}
/* v102 popover safety net. The default Quill bubble setup self-locks the popover's width via
   `this.root.style.width = '${this.root.offsetWidth}px'` at selection time. If offsetWidth
   reads 0 (because the tooltip's containing block isn't laid out yet, or because something is
   clipping it, or because z-index puts it behind the editor), the popover gets locked to 0×0
   and is invisible forever. These rules guard against the most likely culprits:
     - z-index: ensure the popover paints above the editor body and any nearby UI
     - position: relative on .ws-editor (already true via Quill's .ql-container, but defensive)
     - overflow: visible on the day card so the popover, which extends above the selection,
       isn't clipped by the card's border-radius/padding
     - explicit visibility/opacity assertions for the visible state, in case any inherited rule
       or a stale ql-out-top class sneaks through */
.ws-day{overflow:visible}
.ws-editor{position:relative}
.ql-bubble .ql-tooltip{z-index:100}
.ql-bubble .ql-tooltip:not(.ql-hidden):not(.ql-out-top):not(.ql-out-bottom){visibility:visible;opacity:1}
/* Editor — keep our amber border + cream background. Cascade onto Quill's inner .ql-editor
   for padding, line-height, color. Quill's bubble theme adds .ql-container.ql-bubble to our
   .ws-editor; we override its default white background and gray border. */
.ws-editor{background:#fffef5;border:1px solid rgba(234,179,8,.4);border-radius:6px;padding:12px 14px;min-height:220px;font-size:14px;line-height:1.7;color:#1f2937;outline:none;overflow-wrap:anywhere}
.ws-editor:focus{border-color:#ca8a04;box-shadow:0 0 0 2px rgba(234,179,8,.15)}
/* v107: Bump readonly opacity from .5 → .85 so saved-note text pops in dark mode. With
   --surface #13161e behind, .5 mixes to ~#898a8e (medium gray, ~3.4 contrast vs the dark
   #1f2937 text — fails WCAG AA). .85 lifts to ~#dbdbdd (~9.5 contrast, AAA). Light mode
   is unaffected since the surface is already white. */
.ws-editor[contenteditable=false]{background:rgba(255,255,255,.85);cursor:default}
.ws-editor.ql-container.ql-bubble{border:1px solid rgba(234,179,8,.4);background:#fffef5;font-family:inherit;font-size:14px;padding:0;height:auto}
/* v105: override Quill's height:100% (set on .ql-container and .ql-editor in quill.bubble.css)
   with height:auto so the editor grows with its content and the day card grows with it.
   Quill's defaults assume a fixed-height editor with internal scrolling (height:100% +
   overflow-y:auto on .ql-editor). With our auto-height parent (.ws-day), height:100% has
   no definite parent height to resolve against, leading to layout edge cases where the
   inner .ql-editor's content height didn't propagate up to .ws-day — visible as the cream
   editor box extending below the amber day card border at the bottom. height:auto +
   overflow-y:visible gives clean content-driven growth at every level of the tree. */
.ws-editor.ql-container.ql-bubble .ql-editor{padding:12px 14px;min-height:220px;line-height:1.7;color:#1f2937;overflow-wrap:anywhere;font-family:inherit;font-size:14px;height:auto;overflow-y:visible}
.ws-editor.ql-container.ql-bubble .ql-editor.ql-blank::before{color:var(--text-3);font-style:italic;font-family:inherit;left:14px;right:14px;font-size:14px}
.ws-day.editing .ws-editor.ql-container.ql-bubble{border-color:#ca8a04;box-shadow:0 0 0 2px rgba(234,179,8,.15)}
/* v107: Bubble theme has no permanent toolbar — the format controls live in a popover that
   appears when you select text. New users (Paul v107 feedback) look for a toolbar and don't
   know to select first. This hint lives below the editor in edit mode only, scoped to
   .ws-day.editing so it disappears the moment Save is clicked and the day exits edit mode. */
.ws-day.editing::after{content:"Tip: select any text to format — bold, italic, lists, and links live in the popover.";display:block;margin-top:8px;font-size:11px;color:var(--text-3);font-style:italic;text-align:center;padding:6px 8px 0}
.ws-editor p{margin:0 0 8px}
.ws-editor ul,.ws-editor ol{margin:0 0 10px;padding-left:22px}
.ws-editor a{color:#2563eb;text-decoration:underline}
.ws-editor a:hover{color:#1e40af}
/* v177: notes live in the chat stream now, not the right pane. "Take a note" opens one
   in-stream Quill editor; saved notes render as cards inline with the chat. Colors split
   author: user notes keep the amber/cream notepad identity, PG findings (v178) are purple. */
.ws-notes-dock{padding:8px 16px;border-top:1px solid var(--border);background:var(--surface-2)}
.ws-takenote-link{color:var(--text-2);font-size:12px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:5px}
.ws-takenote-link:hover{color:var(--accent)}
.ws-note-trigger{margin-top:10px;padding-top:10px;border-top:1px dashed var(--border)}
.ws-note-edit{margin-top:10px;padding-top:10px;border-top:1px dashed var(--border)}
.ws-edit-toggle-btn{background:var(--surface);border:1px solid var(--border);color:var(--text-2);border-radius:var(--r-sm);padding:5px 10px;font-size:12px;font-weight:600;cursor:pointer}
.ws-edit-toggle-btn.saving{background:var(--accent);border-color:var(--accent);color:#fff}
.ws-note-card{border-radius:var(--r);padding:12px 14px;margin:2px 0}
.ws-note-card.user{background:#fffef5;border:1px solid rgba(234,179,8,.45)}
.ws-note-card.user .ws-note-hdr{color:#a16207}
.ws-note-card.user .ws-note-body{color:#1f2937}
.ws-note-card.ai{background:var(--accent-dim);border:1px solid var(--accent-border)}
.ws-note-card.ai .ws-note-hdr{color:var(--accent)}
.ws-note-card.ai .ws-note-body{color:var(--text)}
.ws-note-hdr{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;margin-bottom:7px;display:flex;align-items:center;gap:6px}
.ws-note-body{font-size:13px;line-height:1.65;overflow-wrap:anywhere}
.ws-note-body p{margin:0 0 7px}.ws-note-body p:last-child{margin-bottom:0}
.ws-note-body ul,.ws-note-body ol{margin:0 0 8px;padding-left:20px}
.ws-note-card.user .ws-note-body a{color:#2563eb;text-decoration:underline}
.ws-note-card.ai .ws-note-body a{color:var(--accent);text-decoration:underline}
.ws-note-del{margin-left:auto;background:none;border:none;color:inherit;opacity:.55;cursor:pointer;font-size:12px;padding:0 2px}
.ws-note-del:hover{opacity:1}
/* v245: OneNote/Evernote Notebook — engine navigator (left) + work surface (right). */
.nb-shell{display:flex;gap:20px;align-items:flex-start}
.nb-nav{width:270px;flex-shrink:0;border-right:1px solid var(--border);padding-right:16px}
.nb-content{flex:1;min-width:0}
.nb-sec-hdr{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--text-3);margin:16px 0 6px}
.nb-sec-hdr.first{margin-top:0}
.nb-row{display:flex;align-items:center;gap:6px;width:100%;text-align:left;background:none;border:1px solid transparent;cursor:pointer;padding:8px 9px;border-radius:var(--r-sm);margin-bottom:1px}
.nb-row:hover{background:var(--surface-2)}
.nb-row.active{background:var(--accent-dim);border-color:var(--accent-border)}
.nb-row-chev{flex-shrink:0;width:12px;color:var(--text-3);font-size:9px;transition:transform var(--t)}
.nb-row-chev.open{transform:rotate(90deg)}
.nb-row-main{flex:1;min-width:0}
.nb-row-title{font-size:13px;font-weight:600;color:var(--text);line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nb-row-meta{font-size:11px;color:var(--text-3);margin-top:1px}
.nb-parent .nb-row-title{font-size:13px;font-weight:700}
/* v246: task children read as a tree branch — indented, hairline rail, smaller/lighter text. */
.nb-children{position:relative;margin:1px 0 6px 16px;padding-left:14px;border-left:1px solid var(--border)}
.nb-row.child{position:relative;padding:5px 8px;margin-bottom:0}
.nb-row.child::before{content:'';position:absolute;left:-14px;top:15px;width:10px;height:1px;background:var(--border)}
.nb-row.child .nb-row-title{font-size:12px;font-weight:400;color:var(--text-2);white-space:normal;line-height:1.35}
.nb-row.child .nb-row-meta{font-size:10px}
.nb-row.child.active .nb-row-title{color:var(--text);font-weight:600}
.nb-empty-hint{font-size:11px;color:var(--text-3);padding:2px 10px 6px 0;font-style:italic}
.nb-addpage{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:600;color:var(--accent);cursor:pointer;background:none;border:none;padding:8px 9px;margin-top:2px}
.nb-addpage:hover{text-decoration:underline}
.nb-back{display:none;align-items:center;gap:5px;font-size:13px;font-weight:600;color:var(--accent);cursor:pointer;background:none;border:none;padding:4px 0;margin-bottom:8px}
.nb-content-hdr{display:flex;align-items:center;gap:10px;margin-bottom:16px;flex-wrap:wrap}
.nb-content-sub{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--text-3);margin-bottom:2px}
.nb-content-title{font-size:18px;font-weight:700;color:var(--text);line-height:1.25;min-width:0}
.nb-content-actions{display:flex;gap:6px;margin-left:auto;flex-wrap:wrap}
.nb-entry-ctl{margin-left:auto;display:inline-flex;gap:2px}
.nb-entry-ctl button{background:none;border:none;color:inherit;opacity:.55;cursor:pointer;font-size:12px;padding:0 3px}
.nb-entry-ctl button:hover{opacity:1}
.nb-empty{padding:30px 24px;text-align:center;color:var(--text-2);font-size:13px;line-height:1.6}
.nb-tb{display:flex;gap:2px;align-items:center;flex-wrap:wrap;padding:6px;border:1px solid rgba(234,179,8,.45);border-bottom:none;border-radius:var(--r-sm) var(--r-sm) 0 0;background:#fffdf2}
.nb-tb-btn{min-width:30px;height:28px;padding:0 7px;border:none;background:none;border-radius:4px;cursor:pointer;font-size:13px;color:#78350f;display:inline-flex;align-items:center;justify-content:center;line-height:1}
.nb-tb-btn:hover{background:rgba(234,179,8,.18)}
.nb-tb-btn > *{pointer-events:none}
.nb-editor-host{border:1px solid rgba(234,179,8,.45);border-radius:0 0 var(--r-sm) var(--r-sm);background:#fffef5;flex:1;min-height:260px}
.nb-editor-host .ql-container{border:none;font-size:15px;height:100%}
/* v246: force near-black ink. The dark-theme body color was winning the cascade and the note
   text rendered as pale gray while typing (it only looked right once saved onto the card). */
.nb-editor-host .ql-editor{height:100%;overflow-y:auto;padding:14px 16px;font-size:15px;line-height:1.7;color:#111827!important;-webkit-text-fill-color:#111827}
.nb-editor-host .ql-editor *{color:#111827!important;-webkit-text-fill-color:#111827}
.nb-editor-host .ql-editor a,.nb-editor-host .ql-editor a *{color:#1d4ed8!important;-webkit-text-fill-color:#1d4ed8}
.nb-editor-host .ql-editor.ql-blank::before{color:#b45309;-webkit-text-fill-color:#b45309;font-style:normal;opacity:.6;left:16px}
/* v247: the entry editor is its OWN overlay, not a showModal() modal. It has to survive the
   Attach popup opening on top of it — that popup reuses #modal-box, which would have wiped
   the editor DOM (and the in-progress note) out from under Quill. z-index sits below
   .modal-overlay (200) so Attach layers above. */
.nb-note-overlay{position:fixed;inset:0;background:rgba(0,0,0,.72);backdrop-filter:blur(4px);z-index:150;display:flex;align-items:center;justify-content:center;padding:20px}
.nb-note-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:var(--shadow-lg);width:960px;max-width:96vw;height:88vh;display:flex;flex-direction:column;padding:22px 24px}
.nb-edit-wrap{display:flex;flex-direction:column;flex:1;min-height:0;margin-top:14px}
.nb-tip{font-size:11px;color:var(--text-3);margin-top:6px;flex-shrink:0}
.nb-note-card .modal-footer{flex-shrink:0}
.nb-tb-sep{width:1px;height:18px;background:rgba(234,179,8,.45);margin:0 4px}
/* Saved notes are read-only — the card's remove X only belongs in the editor. */
.ws-note-body .ws-file-remove{display:none}
.nb-tb-btn.wide{min-width:auto;padding:0 10px;font-size:12px;font-weight:600;gap:5px}
@media(max-width:760px){
  .nb-note-overlay{padding:8px}
  .nb-note-card{width:100%;height:94vh;padding:16px}
  .nb-editor-host{min-height:0}
  .nb-shell{flex-direction:column;gap:0}
  .nb-nav{width:100%;border-right:none;padding-right:0}
  .nb-shell[data-view="page"] .nb-nav{display:none}
  .nb-shell[data-view="list"] .nb-content{display:none}
  .nb-back{display:inline-flex}
}
/* v182: admin / parent layer */
.admin-link{color:var(--accent)!important}
.admin-input{width:100%;box-sizing:border-box;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);color:var(--text);font-size:14px;font-family:inherit;padding:10px 12px;margin-bottom:4px}
.admin-input:focus{outline:none;border-color:var(--accent)}
.admin-field-label{display:block;font-size:12px;font-weight:700;color:var(--text-2);text-transform:uppercase;letter-spacing:.05em;margin:14px 0 6px}
.admin-field-hint{font-weight:500;text-transform:none;letter-spacing:0;color:var(--text-3)}
.admin-billing{font-size:13px;padding:10px 12px;border-radius:var(--r-sm);margin-bottom:6px}
.admin-billing.free{background:var(--accent-dim);color:var(--text);border:1px solid var(--accent-border)}
.admin-billing.paid{background:var(--surface-2);color:var(--text-2);border:1px solid var(--border)}
.admin-error{color:var(--red);font-size:13px;margin-top:10px}
.admin-note-fineprint{font-size:11px;color:var(--text-3);margin-top:14px;line-height:1.5}
.admin-card{display:flex;align-items:center;gap:14px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:14px 16px;margin-bottom:10px;cursor:pointer}
.admin-card:hover{border-color:var(--accent-border)}
.admin-card-avatar{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:16px;flex-shrink:0}
.admin-card-name{font-size:15px;font-weight:600;color:var(--text)}
.admin-card-sub{font-size:12px;color:var(--text-3)}
.admin-stat{text-align:center;min-width:70px}
.admin-stat-num{font-size:18px;font-weight:700;color:var(--text)}
.admin-stat-num.stuck{color:var(--red)}
.admin-stat-lbl{font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-3)}
.admin-viewas-btn{background:#3b1f5e;color:#d4b3ff;border:1px solid #5a2d8f;border-radius:var(--r-sm);font-size:11px;font-weight:600;padding:6px 10px;cursor:pointer;white-space:nowrap;flex-shrink:0}
.admin-viewas-btn:hover{background:#4a2870}
.dev-impersonate-banner{margin-top:8px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:#3b1f5e;color:#d4b3ff;border:1px solid #5a2d8f;border-radius:var(--r-sm);padding:7px 10px;font-size:12px}
.dev-impersonate-banner button{margin-left:auto;background:#d4b3ff;color:#2a1240;border:none;border-radius:var(--r-sm);font-size:11px;font-weight:700;padding:4px 9px;cursor:pointer}
.admin-profilenote{background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);padding:10px 14px;font-size:13px;color:var(--text-2);line-height:1.55;margin-bottom:16px}
.admin-profilenote-lbl{font-weight:700;color:var(--text-3);text-transform:uppercase;font-size:11px;letter-spacing:.05em}
.admin-goal-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:16px 18px;margin-bottom:12px}
.admin-goal-name{font-size:15px;font-weight:600;color:var(--text)}
.admin-goal-pct{font-size:15px;font-weight:700;color:var(--text-2)}
.admin-progress{height:7px;background:var(--surface-2);border-radius:99px;overflow:hidden;margin:10px 0 8px}
.admin-progress-fill{height:100%;border-radius:99px}
.admin-goal-meta{font-size:12px;color:var(--text-3)}
.admin-goal-card.clickable{cursor:pointer}
.admin-goal-card.clickable:hover{border-color:var(--accent-border)}
.admin-goal-cta{color:var(--accent);font-weight:600}
.admin-proj-block{margin-bottom:20px}
.admin-proj-name{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--text-3);margin-bottom:8px}
.admin-task-row{display:flex;align-items:center;gap:12px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:12px 14px;margin-bottom:8px;cursor:pointer}
.admin-task-row:hover{border-color:var(--accent-border)}
.admin-task-title{font-size:14px;font-weight:600;color:var(--text)}
.admin-task-meta{font-size:12px;color:var(--text-3);margin-top:3px}
.admin-task-meta .stuck{color:var(--red);font-weight:600}
.admin-task-arrow{color:var(--text-3);font-size:20px;flex-shrink:0}
.admin-empty-sub{font-size:13px;color:var(--text-3);padding:8px 2px}
.admin-badge{display:inline-block;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;padding:2px 7px;border-radius:99px}
.admin-badge.done{background:rgba(34,160,107,.16);color:#22a06b}
.admin-badge.prog{background:var(--accent-dim);color:var(--accent)}
.admin-badge.blk{background:rgba(225,29,72,.16);color:var(--red)}
.admin-badge.ns{background:var(--surface-3);color:var(--text-3)}
.admin-step-headline{font-size:14px;font-weight:700;color:var(--text);background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);padding:10px 14px;margin-bottom:16px}
.admin-step-headline.stuck{background:rgba(225,29,72,.1);border-color:rgba(225,29,72,.4);color:var(--red)}
.admin-step-headline.done{background:rgba(34,160,107,.12);border-color:rgba(34,160,107,.4);color:#22a06b}
.admin-step-list{display:flex;flex-direction:column;gap:2px}
.admin-step{display:flex;gap:10px;padding:8px 6px;border-radius:var(--r-sm);align-items:flex-start}
.admin-step.current{background:var(--accent-dim)}
.admin-step-mark{width:18px;text-align:center;color:var(--text-3);flex-shrink:0;font-size:13px}
.admin-step.done .admin-step-mark{color:#22a06b}
.admin-step.current .admin-step-mark{color:var(--accent)}
.admin-step-text{font-size:13px;line-height:1.5;color:var(--text)}
.admin-step.done .admin-step-text{color:var(--text-3);text-decoration:line-through}
.admin-step-cur{display:inline-block;font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--accent);background:var(--surface);border:1px solid var(--accent-border);border-radius:99px;padding:1px 6px;margin-left:8px;vertical-align:middle}
.ws-empty-day{background:rgba(0,0,0,.02);border:1px dashed var(--border-2);border-radius:8px;padding:18px;text-align:center;font-size:13px;color:var(--text-3)}
.ws-viewonly-banner{background:var(--panel-2);border:1px solid var(--border);border-radius:8px;padding:10px 14px;font-size:12px;color:var(--text-2);display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.ws-idle-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:9999;display:flex;align-items:center;justify-content:center}
/* v200 — code-owned current-step action bar */
.ws-step-divider{margin:26px 0 14px;padding:14px 16px;border-left:3px solid var(--accent);background:var(--accent-dim);border-radius:0 var(--r) var(--r) 0}
.ws-step-divider.done{border-left-color:var(--border-2);background:transparent;padding:10px 16px;opacity:.45}
.ws-step-divider-pill{font-family:var(--font-d);font-size:10.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--accent);margin-bottom:6px}
.ws-step-divider.done .ws-step-divider-pill{color:var(--text-3);margin-bottom:3px}
.ws-step-divider-text{font-size:16px;font-weight:600;color:var(--text);line-height:1.5}
.ws-step-divider.done .ws-step-divider-text{font-size:12.5px;font-weight:500;text-decoration:line-through;color:var(--text-3)}
.msg.ws-band-1{background:rgba(255,255,255,.022);border-radius:var(--r);padding:8px 10px;margin-left:-10px;margin-right:-10px}
.ws-pinned-step{padding:12px 16px 4px;background:var(--surface-2);border-bottom:1px solid var(--border)}
.ws-pinned-step .ws-stepbar{margin-top:0}
.ws-step-label{font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--text-3);margin-bottom:7px;font-family:var(--font-d)}
.ws-stepbar{margin-top:10px}
.ws-stepbar-btn{font-family:var(--font-b);font-size:13px;font-weight:600;border:none;border-radius:var(--r);padding:12px 20px;cursor:pointer;background:var(--accent);color:#fff;transition:filter var(--t);width:100%;max-width:430px;line-height:1.2}
.ws-stepbar-btn:hover{filter:brightness(1.08)}
.ws-stepbar-grace{background:#7c5cff}
.ws-stepbar-tell{font-size:12.5px;color:var(--text-3);line-height:1.5;padding:10px 0 2px}
.ws-mstep.upcoming{opacity:.6}
.ws-inert-btn{margin-top:8px;display:inline-block;font-size:12px;font-weight:600;color:var(--text-3);background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r);padding:7px 13px;opacity:.55;cursor:default}
/* v200 — task-complete fireworks popup */
.ws-complete-overlay{position:fixed;inset:0;background:rgba(0,0,0,.66);backdrop-filter:blur(4px);z-index:10000;display:flex;align-items:center;justify-content:center;animation:wsCompleteFade .25s ease}
.ws-complete-card{position:relative;background:var(--panel);border:1px solid var(--border);border-radius:18px;padding:40px 34px 30px;max-width:380px;width:calc(100% - 40px);text-align:center;box-shadow:0 24px 70px rgba(0,0,0,.55);animation:wsCompletePop .42s cubic-bezier(.2,.9,.3,1.3);overflow:hidden}
.ws-complete-emoji{font-size:54px;line-height:1;margin-bottom:10px;animation:wsCompleteBounce .6s ease}
.ws-complete-title{font-size:22px;font-weight:800;color:var(--text);margin-bottom:6px}
.ws-complete-note{font-size:12.5px;color:var(--text-2);background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r);padding:9px 12px;margin:14px 0 2px;line-height:1.5}
.ws-complete-sub{font-size:14px;color:var(--text-2);margin-bottom:14px;line-height:1.5}
.ws-complete-unlock{font-size:13px;font-weight:700;color:var(--green);background:var(--green-dim);border-radius:8px;padding:8px 13px;margin:0 0 20px;line-height:1.45}
.ws-complete-card .btn{width:100%}
.ws-fw{position:absolute;top:14px;left:0;right:0;height:0;pointer-events:none}
.ws-fw span{position:absolute;top:0;width:7px;height:7px;border-radius:50%;opacity:0;animation:wsFw 1.15s ease-out forwards}
@keyframes wsCompleteFade{from{opacity:0}to{opacity:1}}
@keyframes wsCompletePop{from{transform:scale(.82);opacity:0}to{transform:scale(1);opacity:1}}
@keyframes wsCompleteBounce{0%{transform:scale(.4)}60%{transform:scale(1.2)}100%{transform:scale(1)}}
@keyframes wsFw{0%{transform:translate(0,0) scale(1);opacity:1}100%{transform:translate(var(--dx,0),-100px) scale(.3);opacity:0}}
/* v204 — Summarize & save to Notebook: editable preview popup */
.ws-findings-overlay{position:fixed;inset:0;background:rgba(0,0,0,.6);backdrop-filter:blur(3px);z-index:10000;display:flex;align-items:center;justify-content:center;padding:20px;animation:wsCompleteFade .2s ease}
.ws-findings-card{background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:24px;max-width:760px;width:100%;box-shadow:0 24px 70px rgba(0,0,0,.55);animation:wsCompletePop .3s cubic-bezier(.2,.9,.3,1.3)}
.ws-findings-title{font-size:16px;font-weight:700;color:var(--text);margin-bottom:4px}
.ws-findings-sub{font-size:12px;color:var(--text-3);margin-bottom:14px;line-height:1.5}
.ws-findings-textarea{width:100%;min-height:360px;max-height:64vh;background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:16px 18px;font-family:var(--font-b);font-size:14px;line-height:1.7;color:var(--text);resize:vertical;outline:none;box-sizing:border-box}
.ws-findings-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:14px}
.ws-idle-modal{background:var(--panel);border:1px solid var(--border);border-radius:var(--r);padding:20px 22px;max-width:440px;width:calc(100% - 32px);box-shadow:0 20px 60px rgba(0,0,0,.5)}
.ws-idle-title{font-size:16px;font-weight:700;color:var(--text);margin-bottom:8px}
.ws-idle-body{font-size:13px;color:var(--text-2);line-height:1.6;margin-bottom:14px}
.ws-idle-countdown{font-weight:700;color:var(--yellow)}
.ws-idle-row{display:flex;gap:8px;align-items:center;margin:12px 0}
.ws-idle-row label{font-size:12px;color:var(--text-3)}
.ws-idle-row select{padding:6px 8px;font-size:12px}
.ws-idle-actions{display:flex;gap:8px;justify-content:flex-end}
.ws-toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:rgba(30,41,59,.95);color:#fff;padding:10px 16px;border-radius:6px;font-size:13px;z-index:10000;animation:wsToast .3s ease-out}

/* v15 MICRO-STEPS PANEL — pinned at top of chat column, above messages. Task-level list
   (task.microSteps) shared across all days. Checking a step REMOVES it from the list —
   no cross-out, no history. Forward-looking queue of "what's next". */
.ws-msteps{background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r);overflow:hidden;flex-shrink:0}
.ws-msteps-hdr{display:flex;align-items:center;gap:8px;padding:10px 14px;background:var(--surface-3);border-bottom:1px solid var(--border);cursor:pointer;user-select:none}
.ws-msteps-hdr-title{flex:1;font-size:12px;font-weight:700;color:var(--text);text-transform:uppercase;letter-spacing:.05em}
.ws-msteps-hdr-count{font-size:11px;color:var(--text-3);font-weight:500}
.ws-msteps-hdr-arrow{font-size:12px;color:var(--text-3)}
.ws-msteps-body{padding:10px 12px;display:flex;flex-direction:column;gap:6px}
/* v151: scroll affordance — panel cap at ~360px with vertical scroll. Default
   scroll position is the bottom (set via JS after render). User can scroll up
   to see prior done steps. */
.ws-msteps-scroll{max-height:70vh;overflow-y:auto;scroll-behavior:smooth}
.ws-msteps-scroll::-webkit-scrollbar{width:8px}
.ws-msteps-scroll::-webkit-scrollbar-track{background:transparent}
.ws-msteps-scroll::-webkit-scrollbar-thumb{background:var(--border-2);border-radius:4px}
.ws-msteps-scroll::-webkit-scrollbar-thumb:hover{background:var(--text-3)}
/* v151: done step state — greyed, struck through, not clickable, static green check */
.ws-mstep.done{opacity:.55;cursor:default;background:transparent;border-color:var(--border)}
.ws-mstep.done:hover{border-color:var(--border);background:transparent}
.ws-mstep.done .ws-mstep-text{text-decoration:line-through;color:var(--text-3)}
.ws-mstep-check.done{background:var(--green,#16a34a);border-color:var(--green,#16a34a);color:#fff}
/* v151: completion banner inside the scroll body when all steps done */
.ws-msteps-allcomplete{padding:14px 10px 6px;font-size:13px;color:var(--text-3);font-style:italic;text-align:center}
.ws-msteps.collapsed .ws-msteps-body{display:none}
.ws-mstep{display:flex;align-items:flex-start;gap:10px;padding:9px 10px;border-radius:var(--r-sm);background:var(--surface);border:1px solid var(--border);transition:all var(--t);cursor:pointer}
.ws-mstep:hover{border-color:var(--accent-border);background:var(--accent-dim)}
.ws-mstep-check{flex-shrink:0;width:18px;height:18px;border-radius:4px;border:1.5px solid var(--border-2);background:transparent;display:flex;align-items:center;justify-content:center;transition:all var(--t);margin-top:1px}
.ws-mstep:hover .ws-mstep-check{border-color:var(--accent)}
.ws-mstep.checking{opacity:.5;pointer-events:none}
/* v153: bottom-most pending step gets a subtle pulse on its checkbox as a
   discoverable manual escape valve. If PG never offers the complete_step button
   (e.g. she stalled after a mid-step redirect), the user can always tap the
   pulsing check to mark the step done themselves. Mobile-first: no hover
   dependency; 44px tap target via padding on the row; pulse uses border + box
   shadow only (no layout shift). prefers-reduced-motion users see the static
   accent-bordered check without animation. */
.ws-mstep.current{border-color:var(--accent-border);background:var(--accent-dim)}
.ws-mstep.current .ws-mstep-check{border-color:var(--accent);border-width:2px;animation:v153-mstep-pulse 2.2s ease-in-out infinite}
@keyframes v153-mstep-pulse{
  0%,100%{box-shadow:0 0 0 0 rgba(124,92,252,0);transform:scale(1)}
  50%{box-shadow:0 0 0 5px rgba(124,92,252,.15);transform:scale(1.08)}
}
@media (prefers-reduced-motion: reduce){
  .ws-mstep.current .ws-mstep-check{animation:none}
}
.ws-mstep.checking .ws-mstep-check{background:var(--accent);border-color:var(--accent);color:#fff}
/* v115a: challenged-step state. Step was checked but Claude couldn't find evidence in chat,
   so it's been restored to the panel with a visible flag. Muted accent border (warning, not
   alarm — red would feel adversarial). The user can either share the artifact (next checkoff
   re-evaluates fresh) or click ✓ Confirm offline to override. Tap-to-check is suppressed
   while challenged — the only paths off are share-and-recheck or explicit offline confirm. */
.ws-mstep.challenged{background:#fef3c7;border-color:#f59e0b;cursor:pointer}
[data-theme="light"] .ws-mstep.challenged{background:#fef3c7;border-color:#f59e0b}
.ws-mstep.challenged:hover{background:#fde68a;border-color:#d97706}
.ws-mstep.challenged .ws-mstep-check{display:none}
/* v115a.1: explicit dark text color on challenged steps. Without this, .ws-mstep-text
   inherits color: var(--text) which is light in dark theme — light text on cream amber
   was unreadable per Grace's QA on v115a. Amber is a warning color that should look the
   same in both themes, so the text should be dark in both themes. */
.ws-mstep.challenged .ws-mstep-text{color:#78350f;font-weight:500}
.ws-mstep-flag{flex-shrink:0;font-size:14px;line-height:1;margin-top:2px}
.ws-mstep-challenge-reason{font-size:11px;color:#92400e;margin-top:3px;font-style:italic;line-height:1.4}
[data-theme="light"] .ws-mstep-challenge-reason{color:#92400e}
.ws-mstep-actions{display:flex;gap:6px;margin-top:8px;flex-wrap:wrap}
.ws-mstep-confirm-offline{font-size:11px;padding:4px 9px;border-radius:4px;background:transparent;border:1px solid #f59e0b;color:#92400e;cursor:pointer;font-weight:500;transition:all var(--t)}
.ws-mstep-confirm-offline:hover{background:#f59e0b;color:#fff}
.ws-mstep-text{flex:1;font-size:13px;line-height:1.5;color:var(--text)}
.ws-msteps-empty{padding:14px;text-align:center;font-size:12px;color:var(--text-3);font-style:italic}
.ws-msteps-generating{padding:16px;display:flex;align-items:center;justify-content:center;gap:10px;color:var(--text-3);font-size:12px}
.ws-msteps-generating .ob-typing{display:inline-flex}

/* v15 SESSION CHAT — separate from Task chat. Uses same message bubble styles as the
   shared .msg-* classes. Typing indicator is local (no app-wide overlay). */
.ws-chat-typing{padding:8px 16px;display:flex;align-items:center;gap:8px;color:var(--text-3);font-size:12px}
.ws-chat-conv{padding:14px 16px;display:flex;flex-direction:column-reverse;gap:12px}

@media (max-width:680px){.plan-empty-grid{grid-template-columns:1fr !important}}
@keyframes wsToast{from{opacity:0;transform:translate(-50%,10px)} to{opacity:1;transform:translate(-50%,0)}}
.ws-file-card{display:inline-flex;align-items:center;gap:10px;padding:8px 12px;background:#fffef5;border:1px solid #ca8a04;border-radius:6px;margin:4px 2px;font-size:13px;color:#374151;max-width:100%;user-select:none;vertical-align:middle}
.ws-file-card.preview{background:#fef3c7;border-style:dashed}
.ws-file-card.link{background:#eff6ff;border:1px solid #3b82f6;border-style:solid}
.ws-file-card.link .ws-file-icon{color:#2563eb}
.ws-file-card.link .ws-file-name{color:#1e3a8a}
.ws-file-card.link .ws-file-size{color:#1d4ed8}
.ws-file-card.link:hover{background:#dbeafe}
.ws-file-card.link .ws-file-remove{color:#3b82f6}
.ws-file-card.link .ws-file-remove:hover{color:#dc2626}
.ws-file-card.link{background:#eff6ff;border:1px solid #3b82f6;border-style:solid}
.ws-file-card.link .ws-file-size{color:#1d4ed8}
.ws-file-card.link .ws-file-remove{color:#1d4ed8}
.ws-file-card.link .ws-file-remove:hover{color:#dc2626}
.ws-file-icon{font-size:22px;line-height:1;flex-shrink:0}
.ws-file-meta{min-width:0;flex:1;display:flex;flex-direction:column;gap:1px}
.ws-file-name{font-weight:600;color:#1f2937;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:260px}
.ws-file-size{font-size:10px;color:#a16207;text-transform:uppercase;letter-spacing:.03em;font-weight:600}
.ws-file-remove{font-size:16px;color:#a16207;cursor:pointer;padding:0 6px;opacity:.6;font-weight:700}
.ws-file-remove:hover{opacity:1;color:#dc2626}
.ws-day.readonly .ws-file-remove{display:none}
/* ===================== STICKING POINTS ===================== */
.sp-view{max-width:1600px}
.sp-encouragement{font-size:14px;color:var(--text-2);line-height:1.6;margin:8px 0 24px;max-width:880px}
.sp-donuts.wn-donuts{margin:48px 0 8px}
.sp-donuts{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px;margin:0 0 20px;align-items:stretch}
.sp-donut-card{background:var(--surface-2);border-radius:10px;padding:14px 12px 12px;display:flex;flex-direction:column;align-items:center;gap:8px;cursor:pointer;transition:background .15s}
.sp-donut-card:active{background:var(--surface-3)}
.sp-donut-name{font-size:12.5px;font-weight:600;text-align:center;line-height:1.3;min-height:32px;display:flex;align-items:center;justify-content:center}
.sp-ring-row{margin-top:auto}
.sp-donut-when{margin-top:auto}
.sp-ring-row{display:flex;gap:10px;width:100%;justify-content:space-around}
.sp-ring{display:flex;flex-direction:column;align-items:center;gap:3px;min-width:0}
.sp-ring-wrap{position:relative;width:56px;height:56px;flex-shrink:0}
.sp-ring-pct{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-family:var(--font-d);font-size:13px;font-weight:700}
.sp-ring-label{font-size:11px;color:var(--text-2);font-weight:600}
.sp-ring-sub{font-size:10px;color:var(--text-3);text-align:center}
.sp-donut-when{font-size:11px;color:var(--text-3);text-align:center;margin-top:2px}
.sp-layout{display:grid;grid-template-columns:2fr 1fr;gap:20px;align-items:flex-start}
.sp-report-col{min-width:0}
.sp-chat-col{position:sticky;top:16px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r);display:flex;flex-direction:column;max-height:calc(100vh - 100px);min-height:400px}
.sp-chat-hdr{padding:14px 16px;border-bottom:1px solid var(--border);font-family:var(--font-d);font-size:12px;font-weight:700;color:var(--text);text-transform:uppercase;letter-spacing:.07em;display:flex;flex-direction:column;gap:3px}
.sp-chat-sub{font-size:10px;font-weight:500;color:var(--text-3);text-transform:none;letter-spacing:0}
.sp-chat-messages{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:12px}
.sp-chat-empty{font-size:12px;color:var(--text-3);text-align:center;padding:24px 8px;line-height:1.5}
/* v115c_3 (Step 4 B2): .sp-msg / .sp-msg-claude / .sp-msg-user / .sp-msg-body / .sp-msg-av
   removed — superseded by the standard .msg-* family once renderConversationReversed took
   over the chat pane in v115c_2. The .sp-chat-* layout primitives above remain because
   they're the right-rail column layout, no standard equivalent. */
.sp-chat-input-wrap{border-bottom:1px solid var(--border);padding:10px;display:flex;gap:8px;align-items:flex-end}
.sp-chat-input{flex:1;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);padding:8px 10px;color:var(--text);font-size:13px;font-family:inherit;resize:none;outline:none}
.sp-chat-input:focus{border-color:var(--accent)}
.sp-filter-bar{display:flex;flex-wrap:wrap;gap:12px;align-items:center;padding:10px 0;margin-bottom:12px;border-bottom:1px solid var(--border)}
.sp-filter-group{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.sp-filter-label{font-size:11px;color:var(--text-3);font-weight:600;text-transform:uppercase;letter-spacing:.05em;margin-right:4px}
.sp-chip{display:inline-block;padding:4px 10px;border-radius:12px;background:var(--surface-2);border:1px solid var(--border);font-size:11px;font-weight:500;color:var(--text-2);cursor:pointer;user-select:none;transition:all var(--t)}
.sp-chip:hover{border-color:var(--border-2);color:var(--text)}
.sp-chip.active{background:var(--accent-dim);border-color:var(--accent-border);color:var(--accent)}
.sp-goal-select{background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);padding:5px 8px;color:var(--text-2);font-size:11px;cursor:pointer;outline:none}
.sp-excluded-chip{display:inline-block;padding:4px 10px;border-radius:12px;background:var(--red-dim);border:1px solid rgba(239,68,68,.35);font-size:11px;font-weight:500;color:var(--red);cursor:pointer;user-select:none}
.sp-week-nav{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px;flex-wrap:wrap}
.sp-week-nav-left{display:flex;align-items:center;gap:12px}
.sp-status-toggle{display:inline-flex;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);padding:2px;gap:2px}
.sp-status-chip{background:transparent;border:none;color:var(--text-2);font-size:11px;font-weight:600;padding:5px 12px;cursor:pointer;border-radius:calc(var(--r-sm) - 2px);transition:all var(--t);font-family:inherit}
.sp-status-chip:hover{color:var(--text)}
.sp-status-chip.active{background:var(--accent);color:#fff}
.sp-week-label{font-size:14px;font-weight:600;color:var(--text);display:flex;align-items:center;gap:8px}
.sp-week-badge{background:var(--accent-dim);color:var(--accent);font-size:10px;font-weight:700;padding:2px 8px;border-radius:10px;text-transform:uppercase;letter-spacing:.05em}
.sp-section-title{font-family:var(--font-d);font-size:11px;font-weight:700;color:var(--text-2);text-transform:uppercase;letter-spacing:.08em;margin-bottom:10px}
.sp-goal-block{margin-bottom:28px;border:1px solid var(--border);border-radius:var(--r);overflow:hidden;background:var(--surface)}
.sp-goal-header{padding:12px 16px;background:var(--surface-2);border-left:3px solid var(--accent);display:flex;align-items:center;gap:10px;font-size:14px;font-weight:600;color:var(--text)}
.sp-goal-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}
.sp-project-block{padding:12px 16px;border-top:1px solid var(--border)}
.sp-project-block:first-of-type{border-top:none}
.sp-project-name{font-size:12px;font-weight:600;color:var(--text-2);margin-bottom:8px;text-transform:uppercase;letter-spacing:.05em}
.sp-table{width:100%;border-collapse:collapse;font-size:12px}
.sp-table th{text-align:left;padding:6px 8px;font-size:10px;font-weight:700;color:var(--text-3);text-transform:uppercase;letter-spacing:.05em;border-bottom:1px solid var(--border)}
.sp-table td{padding:8px;color:var(--text);border-bottom:1px solid var(--border)}
.sp-table tr:last-child td{border-bottom:none}
.sp-table tr:hover{background:var(--surface-2)}
.sp-cell-sm{font-size:11px;color:var(--text-2);white-space:nowrap}
.sp-cell-pushed{color:var(--yellow)}
.sp-cell-over{color:var(--red);font-weight:600}
.sp-cell-good{color:var(--green);font-weight:600}
.sp-cell-warn{color:var(--yellow);font-weight:600}
.sp-cell-bad{color:var(--red);font-weight:600}
.sp-link{color:var(--text);cursor:pointer;text-decoration:none}
.sp-goal-name{font-weight:600}
.sp-link:hover{text-decoration:underline}
.sp-done td{opacity:.5;text-decoration:line-through}
.sp-pushed{background:rgba(245,158,11,.04)}
.sp-empty{padding:24px;color:var(--text-3);text-align:center;font-size:13px;font-style:italic;background:var(--surface);border:1px dashed var(--border);border-radius:var(--r-sm)}
.sp-empty-sm{font-size:11px;color:var(--text-3);text-align:center;padding:8px}
.sp-sticking-table{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:4px}
.sp-recipient-row{display:flex;align-items:center;gap:10px;padding:8px;border:1px solid var(--border);border-radius:var(--r-sm);margin-bottom:6px;font-size:12px}
.sp-recipient-cadence{color:var(--text-3);font-size:11px;text-transform:uppercase;letter-spacing:.05em;margin-left:auto}
.btn-ghost-icon{background:transparent;border:none;color:var(--text-2);cursor:pointer;padding:4px 8px;font-size:16px;border-radius:var(--r-sm);transition:all var(--t)}
.btn-ghost-icon:hover:not([disabled]){background:var(--surface-2);color:var(--text)}
.btn-ghost-icon[disabled]{opacity:.3;cursor:not-allowed}
@media (max-width:900px){
  .sp-layout{grid-template-columns:1fr}
  .sp-chat-col{position:relative;max-height:500px;top:auto}
}

/* ===== v340 My Day redesign — tabbed Tiles / Columns ===== */
.mdx-top{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:14px}
.md-greeting{font-family:var(--font-d);font-size:27px;font-weight:800;letter-spacing:-.02em;color:var(--text);line-height:1.1;margin:0}
.md-reset-icon{flex-shrink:0;width:36px;height:36px;border-radius:10px;border:1px solid var(--border);background:transparent;color:var(--text-3);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background .12s,color .12s,border-color .12s}
.md-reset-icon svg{width:17px;height:17px}
.md-reset-icon:hover{background:var(--surface-2);color:var(--text);border-color:var(--text-3)}
.mdx-plan-cta{display:inline-flex;align-items:center;gap:9px;background:linear-gradient(120deg,var(--accent-dim),rgba(124,92,252,.05));border:1px solid var(--accent-border);border-radius:var(--r);padding:9px 13px;cursor:pointer;font-family:var(--font-b);font-size:13px;color:var(--text-2);font-weight:600}
.mdx-plan-cta:hover{border-color:var(--accent)}
.mdx-plan-ai{width:24px;height:24px;border-radius:7px;background:linear-gradient(135deg,var(--accent),#a78bfa);display:grid;place-items:center;font-family:var(--font-d);font-weight:800;font-size:10px;color:#fff}
.mdx-plan-go{color:var(--accent);font-size:16px}

.mdx-tabs{display:flex;gap:4px;background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:5px;margin-bottom:20px;overflow-x:auto}
.mdx-tab{flex:0 0 auto;border:0;background:transparent;color:var(--text-2);font-family:var(--font-d);font-weight:700;font-size:13.5px;padding:9px 16px;border-radius:8px;cursor:pointer;white-space:nowrap;transition:background var(--t),color var(--t)}
.mdx-tab:hover{color:var(--text)}
.mdx-tab.on{background:var(--accent);color:#fff}

.mdx-empty{color:var(--text-3);font-size:14px;padding:26px 4px}

/* shared item controls */
.mdx-check{width:22px;height:22px;border-radius:50%;border:2px solid var(--border-2);flex-shrink:0;display:grid;place-items:center;color:transparent;transition:all .16s;cursor:pointer}
.mdx-check:hover{border-color:var(--green)}
.mdx-check svg{width:12px;height:12px}
.mdx-item.done .mdx-check{background:var(--green);border-color:var(--green);color:#fff}
.mdx-sched{width:26px;height:26px;border-radius:7px;border:1px solid var(--border-2);background:var(--surface-3);color:var(--text-3);flex-shrink:0;display:grid;place-items:center;cursor:pointer;transition:all .15s;opacity:.75}
.mdx-sched:hover{color:var(--accent);border-color:var(--accent);opacity:1}
.mdx-sched svg{width:13px;height:13px}
.mdx-itxt{cursor:pointer}
.mdx-itxt:hover{color:var(--accent);text-decoration:underline;text-underline-offset:2px}

/* ONE THING NOW — focus hero (v361) */
.md-focus{background:color-mix(in srgb,var(--gc,var(--accent)) 10%,var(--surface));border:1px solid color-mix(in srgb,var(--gc,var(--accent)) 34%,transparent);border-left:4px solid var(--gc,var(--accent));border-radius:var(--r-lg);padding:18px 20px;margin-bottom:18px}
.md-focus-eyebrow{font-family:var(--font-d);font-size:11px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:color-mix(in srgb,var(--gc,var(--accent)) 62%,var(--text-3));margin-bottom:10px}
.md-focus-row{display:flex;align-items:flex-start;gap:13px}
.md-focus-check{flex-shrink:0;width:26px;height:26px;border-radius:50%;border:2px solid color-mix(in srgb,var(--gc,var(--accent)) 45%,var(--border));background:transparent;color:var(--gc,var(--accent));display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0;margin-top:2px;transition:background .12s,border-color .12s}
.md-focus-check svg{width:15px;height:15px;opacity:.35;transition:opacity .12s}
.md-focus-check:hover{border-color:var(--gc,var(--accent))}
.md-focus-check:hover svg{opacity:1}
.md-focus-main{min-width:0;flex:1}
.md-focus-title{font-family:var(--font-d);font-size:21px;font-weight:700;line-height:1.25;color:var(--text);cursor:pointer;text-wrap:balance}
.md-focus-title:hover{color:var(--gc,var(--accent))}
.md-focus-meta{display:flex;align-items:center;gap:12px;margin-top:7px;flex-wrap:wrap}
.md-focus-chip{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;color:var(--text-2);font-weight:600}
.md-focus-dot{width:8px;height:8px;border-radius:50%;background:var(--gc,var(--accent))}
.md-focus-kind{font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--text-3)}
.md-focus-acts{display:flex;align-items:center;gap:12px;margin-top:15px;padding-left:39px;flex-wrap:wrap}
.md-focus-go{background:var(--gc,var(--accent));color:#fff;border:none;border-radius:9px;padding:9px 18px;font-size:13.5px;font-weight:700;font-family:var(--font-d);cursor:pointer}
.md-focus-go:hover{filter:brightness(1.06)}
.md-focus-skip{background:transparent;border:none;color:var(--text-3);font-size:13px;font-weight:600;cursor:pointer;padding:6px 4px}
.md-focus-skip:hover{color:var(--text-2)}
.md-focus-count{font-size:12px;color:var(--text-3);margin-left:auto}
.md-focus-clear{display:flex;align-items:center;gap:16px;background:var(--green-dim);border:1px solid color-mix(in srgb,var(--green) 30%,transparent);border-left:4px solid var(--green)}
.md-focus-clear .md-focus-emoji{flex-shrink:0;width:40px;height:40px;border-radius:50%;background:color-mix(in srgb,var(--green) 22%,transparent);color:var(--green);display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:700}
.md-focus-clear-ttl{font-family:var(--font-d);font-size:17px;font-weight:700;color:var(--text)}
.md-focus-clear-sub{font-size:13px;color:var(--text-2);margin-top:3px;line-height:1.45}
.md-focus-reset{flex-shrink:0;background:transparent;border:1px solid var(--border);color:var(--text-2);border-radius:8px;padding:8px 13px;font-size:12.5px;font-weight:600;cursor:pointer}
.md-focus-reset:hover{border-color:var(--text-3);color:var(--text)}

/* Reminders strip on My Day — a light band between the focus hero and the goal tiles. */
.md-rem-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);padding:12px 16px;margin-bottom:18px}
.md-rem-hd{font-family:var(--font-d);font-size:12px;font-weight:700;color:var(--text-2);text-transform:uppercase;letter-spacing:.05em;margin-bottom:8px}
.md-rem-row{display:flex;align-items:center;gap:10px;padding:7px 0;border-top:1px solid var(--border)}
.md-rem-row:first-of-type{border-top:none}
.md-rem-check{flex-shrink:0;width:20px;height:20px;border-radius:50%;border:1.5px solid var(--border-2,var(--border));background:transparent;color:transparent;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;transition:all .12s}
.md-rem-check svg{width:12px;height:12px}
.md-rem-check:hover{border-color:var(--green);color:var(--green)}
.md-rem-txt{flex:1;min-width:0;font-size:13px;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.md-rem-when{flex-shrink:0;font-size:11px;font-weight:600;color:var(--text-3)}
.md-rem-when.due{color:var(--red)}
.md-rem-goal{flex-shrink:0;font-size:10px;font-weight:600;padding:2px 8px;border-radius:999px;cursor:pointer;color:var(--gc,var(--accent));background:color-mix(in srgb,var(--gc,var(--accent)) 15%,transparent);border:1px solid color-mix(in srgb,var(--gc,var(--accent)) 34%,transparent)}
.md-rem-row.is-due .md-rem-txt{font-weight:600}

/* TILES (JS masonry) */
.mdx-tile-grid{display:flex;align-items:flex-start;gap:16px}
.mdx-mcol{flex:1;min-width:0;display:flex;flex-direction:column;gap:16px}
.mdx-tile{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);overflow:hidden;position:relative}
.mdx-tile.mdx-dragging{opacity:.4}
.mdx-tile.mdx-dragover{outline:2px dashed var(--accent);outline-offset:2px}
.mdx-grip{cursor:grab;color:var(--text-3);font-size:15px;line-height:1;opacity:.55;flex-shrink:0;padding:2px}
.mdx-grip:hover{opacity:1;color:var(--text-2)}
.mdx-grip:active{cursor:grabbing}
.mdx-tile::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--gc)}
.mdx-tile-hd{display:flex;align-items:center;gap:10px;padding:15px 16px 11px}
.mdx-tile-icon{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;font-family:var(--font-d);font-weight:800;font-size:17px;color:var(--gc);background:color-mix(in srgb,var(--gc) 20%,transparent);flex-shrink:0}
.mdx-tile-name{font-family:var(--font-d);font-weight:700;font-size:15.5px;letter-spacing:-.01em;line-height:1.2;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mdx-tile-name:hover{color:var(--accent)}
.mdx-tile-sub{font-size:12px;color:var(--text-3);margin-top:2px}
.mdx-tile-body{padding:0 16px}
.mdx-sec{font-size:10.5px;font-weight:700;color:var(--text-3);text-transform:uppercase;letter-spacing:.08em;margin:13px 0 7px;display:flex;align-items:center;gap:7px}
.mdx-ln{height:1px;background:var(--border);flex:1}
.mdx-item{display:flex;align-items:center;gap:10px;padding:8px 9px;border-radius:var(--r-sm);background:var(--surface-2);margin-bottom:6px;transition:background .14s}
.mdx-item:hover{background:var(--surface-3)}
.mdx-hero{background:color-mix(in srgb,var(--gc) 12%,var(--surface-2));border:1px solid color-mix(in srgb,var(--gc) 30%,transparent)}
.mdx-hero .mdx-check{border-color:color-mix(in srgb,var(--gc) 55%,var(--border-2))}
.mdx-itxt{font-size:13.5px;flex:1;min-width:0}
.mdx-hero .mdx-itxt{font-weight:600}
.mdx-item.done .mdx-itxt{color:var(--text-3);text-decoration:line-through}
.mdx-allclear{display:flex;align-items:center;gap:9px;padding:10px;border-radius:var(--r-sm);background:var(--green-dim);color:var(--green);font-size:13px;font-weight:600;margin-bottom:6px}
.mdx-donuts{display:flex;gap:8px;padding:14px 16px 16px;margin-top:8px;border-top:1px solid var(--border)}
.mdx-donuts .sp-ring{flex:1}

/* CHAT tab */
.mdx-chat{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);display:flex;flex-direction:column;height:600px;max-width:820px;overflow:hidden}
.mdx-chat-hd{padding:13px 16px;border-bottom:1px solid var(--border);background:var(--surface-2);font-family:var(--font-d);font-size:12px;font-weight:700;color:var(--text-2);text-transform:uppercase;letter-spacing:.06em}
.mdx-chat-conv{flex:1;overflow-y:auto;padding:15px;display:flex;flex-direction:column;gap:16px}
.mdx-chat-input{padding:12px;border-top:1px solid var(--border);background:var(--surface-2)}


/* v346 — Team-only messages (Grace excluded): visually distinct + labeled */
.msg-teamonly .msg-bubble{border:1px dashed var(--border-2);background:var(--surface-2)}
.ws-teamonly-tag{color:var(--text-2);font-weight:700;white-space:nowrap}

/* v348 — Routine/Habit pages restyled to the Work Session layout (reuse .ws-page grid) */
.engine-streak-bar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r);padding:11px 16px;margin-top:14px}
.esb-item{font-size:13px;color:var(--text-2)}
.esb-item b{font-family:var(--font-d);font-weight:800;color:var(--text);font-size:15px}
.esb-streak b{font-size:20px}
.esb-fire{font-size:17px;margin-right:3px}
.esb-miss{color:var(--yellow)}
.esb-sep{width:1px;height:20px;background:var(--border);flex-shrink:0}
.esb-due{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:var(--accent)}
.esb-due.off{color:var(--text-3);font-weight:500}
.esb-dot{width:7px;height:7px;border-radius:50%;border:1.5px solid var(--text-3);flex-shrink:0}
.esb-dot.on{background:var(--accent);border-color:var(--accent)}
.engine-side-card{padding:16px 18px;margin-bottom:14px}
.engine-side-card h3{margin:0 0 12px;font-size:14px}
.engine-side-card.engine-gated{opacity:.55}
.engine-add-row{display:flex;gap:6px;margin-top:12px}
.engine-add-row input{flex:1;font-size:12px;padding:7px 10px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-sm);color:var(--text)}
.engine-sub-lbl{font-size:11px;font-weight:600;color:var(--text-3);margin-bottom:8px;text-transform:uppercase;letter-spacing:.06em}
.engine-chat-card{display:flex;flex-direction:column;height:calc(100vh - 210px);min-height:460px;padding:0;overflow:hidden}
.engine-chat-hdr{padding:13px 16px;border-bottom:1px solid var(--border);background:var(--surface-2);font-family:var(--font-d);font-size:12px;font-weight:700;color:var(--text-2);text-transform:uppercase;letter-spacing:.06em;flex-shrink:0}
.engine-chat-conv{flex:1;overflow-y:auto;padding:14px 16px;min-height:0}
.engine-chat-input{padding:12px 16px;border-top:1px solid var(--border);background:var(--surface-2);flex-shrink:0}
.engine-composer-box{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:12px 14px}

/* ===================== DAY-TO-DAY LANE (v351) ===================== */
.dtd-page{max-width:760px;margin:0 auto;padding:24px 28px 60px}
.dtd-header{margin-bottom:14px}
.dtd-h1{font-family:var(--font-d);font-size:26px;font-weight:800;color:var(--text);margin:0 0 6px}
.dtd-sub{font-size:13px;color:var(--text-2);line-height:1.6;margin:0 0 20px;max-width:640px}
.dtd-add{display:flex;gap:10px;align-items:center;padding:12px 14px;margin-bottom:18px}
.dtd-add-title{flex:1 1 0;min-width:0;width:auto;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);padding:10px 12px;font-size:14px;color:var(--text);font-family:var(--font-b);outline:none}
.dtd-add-title:focus{border-color:var(--accent-border)}
.dtd-add-due{flex:0 0 150px;width:150px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);padding:9px 10px;font-size:13px;color:var(--text-2);font-family:var(--font-b);outline:none;color-scheme:dark}
.dtd-list{display:flex;flex-direction:column;gap:8px}
.dtd-row{display:flex;align-items:center;gap:12px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:12px 14px;transition:border-color .12s,background .12s}
.dtd-row:hover{border-color:var(--border-2)}
.dtd-body{flex:1;min-width:0;cursor:pointer;display:flex;align-items:center;gap:8px}
.dtd-title{font-size:14px;color:var(--text);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dtd-body:hover .dtd-title{color:var(--accent)}
.dtd-row.dtd-done{opacity:.55}
.dtd-row.dtd-done .dtd-title{text-decoration:line-through;color:var(--text-3)}
.dtd-due{font-size:11px;font-weight:700;padding:3px 9px;border-radius:999px;white-space:nowrap;flex-shrink:0;letter-spacing:.02em}
.dtd-due-over{background:rgba(239,68,68,.15);color:#f87171;border:1px solid rgba(239,68,68,.35)}
.dtd-due-today{background:rgba(245,158,11,.15);color:var(--yellow);border:1px solid rgba(245,158,11,.35)}
.dtd-due-soon{background:rgba(14,165,233,.12);color:var(--cyan);border:1px solid rgba(14,165,233,.3)}
.dtd-due-far{background:var(--surface-3);color:var(--text-3);border:1px solid var(--border)}
.dtd-del{flex-shrink:0;color:var(--text-3);opacity:.5;transition:opacity .12s,color .12s;padding:3px}
.dtd-row:hover .dtd-del{opacity:1}
.dtd-del:hover{color:#f87171}
.dtd-empty{font-size:13px;color:var(--text-3);line-height:1.6;padding:24px 18px;text-align:center;background:var(--surface);border:1px dashed var(--border);border-radius:var(--r)}
.dtd-done-hdr{font-size:11px;font-weight:700;color:var(--text-3);text-transform:uppercase;letter-spacing:.06em;margin:16px 0 4px;padding-left:2px}

/* ===================== MANUAL WORK-SESSION STEPS (v352) ===================== */
.ws-mstep.manual{align-items:center}
.ws-mstep.manual .ws-mstep-text{flex:1;min-width:0}
.ws-mstep-edit,.ws-mstep-del,.ws-mstep-save{flex-shrink:0;padding:3px;color:var(--text-3);opacity:0;transition:opacity .12s,color .12s}
.ws-mstep.manual:hover .ws-mstep-edit,.ws-mstep.manual:hover .ws-mstep-del{opacity:.75}
.ws-mstep.manual.editing .ws-mstep-save,.ws-mstep.manual.editing .ws-mstep-del{opacity:1}
.ws-mstep-edit:hover{color:var(--accent)}
.ws-mstep-del:hover{color:#f87171}
.ws-mstep-save{color:var(--green)!important;opacity:1}
.ws-mstep-edit-input{flex:1;min-width:0;background:var(--surface-3);border:1px solid var(--accent-border);border-radius:var(--r-sm);padding:5px 9px;font-size:13px;color:var(--text);font-family:var(--font-b);outline:none}
.ws-mstep-add{display:flex;gap:8px;align-items:center;margin-top:8px;padding-top:10px;border-top:1px dashed var(--border)}
.ws-mstep-add input{flex:1;min-width:0;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);padding:8px 10px;font-size:13px;color:var(--text);font-family:var(--font-b);outline:none}
.ws-mstep-add input:focus{border-color:var(--accent-border)}

/* ===================== WORKSPACE PROJECTS + TEMPLATES (v352) ===================== */
.dtd-section-hdr{display:flex;align-items:center;justify-content:space-between;margin:0 0 12px;font-family:var(--font-d);font-size:12px;font-weight:700;color:var(--text-2);text-transform:uppercase;letter-spacing:.06em}
.dtd-proj-list{display:flex;flex-direction:column;gap:8px;margin-bottom:8px}
.dtd-proj-card{display:flex;align-items:center;gap:12px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:14px 16px;cursor:pointer;transition:border-color .12s,background .12s}
.dtd-proj-card:hover{border-color:var(--accent-border);background:var(--surface-2)}
.dtd-proj-main{flex:1;min-width:0}
.dtd-proj-name{font-size:14px;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dtd-proj-meta{font-size:12px;color:var(--text-3);margin-top:2px}
.dtd-proj-tmpl,.dtd-proj-del{flex-shrink:0;color:var(--text-3);opacity:0;transition:opacity .12s,color .12s;padding:3px}
.dtd-proj-card:hover .dtd-proj-tmpl,.dtd-proj-card:hover .dtd-proj-del{opacity:.7}
.dtd-proj-tmpl:hover{color:var(--accent)}
.dtd-proj-del:hover{color:#f87171}
.dtd-proj-arrow{flex-shrink:0;color:var(--text-3)}
/* template picker (modal) */
.tmpl-pick-list{display:flex;flex-direction:column;gap:8px;margin:6px 0 4px;max-height:50vh;overflow-y:auto}
.tmpl-pick{display:flex;align-items:center;gap:12px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);padding:12px 14px;cursor:pointer;transition:border-color .12s,background .12s}
.tmpl-pick:hover{border-color:var(--accent-border);background:var(--surface-3)}
.tmpl-pick-main{flex:1;min-width:0}
.tmpl-pick-name{font-size:14px;font-weight:600;color:var(--text)}
.tmpl-pick-meta{font-size:12px;color:var(--text-3);margin-top:2px}
.tmpl-pick svg{flex-shrink:0;color:var(--text-3)}
/* templates page */
.tmpl-page .dtd-h1{margin-bottom:6px}
.tmpl-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}
.tmpl-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:16px 18px;display:flex;flex-direction:column}
.tmpl-card-hdr{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px}
.tmpl-card-name{font-family:var(--font-d);font-size:15px;font-weight:700;color:var(--text)}
.tmpl-card-meta{font-size:11px;color:var(--text-3);margin-top:3px;text-transform:uppercase;letter-spacing:.04em}
.tmpl-card-del{flex-shrink:0;color:var(--text-3);padding:3px}
.tmpl-card-del:hover{color:#f87171}
.tmpl-card-tasks{list-style:none;margin:0 0 14px;padding:0;display:flex;flex-direction:column;gap:5px;flex:1}
.tmpl-card-tasks li{font-size:13px;color:var(--text-2);line-height:1.4;padding-left:14px;position:relative}
.tmpl-card-tasks li::before{content:'';position:absolute;left:2px;top:8px;width:4px;height:4px;border-radius:50%;background:var(--accent)}
.tmpl-card-tasks li.tmpl-empty{color:var(--text-3)}.tmpl-card-tasks li.tmpl-empty::before{background:var(--text-3)}
.tmpl-steps{color:var(--text-3);font-size:11px}
.tmpl-card-use{display:flex;gap:8px;align-items:center;border-top:1px solid var(--border);padding-top:12px}
.tmpl-use-sel{flex:1;min-width:0;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);padding:7px 9px;font-size:12px;color:var(--text);font-family:var(--font-b);outline:none}
.tmpl-card-use-note{font-size:12px;color:var(--text-3);line-height:1.5;border-top:1px solid var(--border);padding-top:12px;display:block}

/* ===================== PROJECT (kanban) add-task affordance (v353) ===================== */
.pp-add-task{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;margin-top:8px;padding:11px 14px;background:transparent;border:1px dashed var(--border-2);border-radius:var(--r);color:var(--text-2);font-family:var(--font-b);font-size:13px;font-weight:600;cursor:pointer;transition:border-color .12s,color .12s,background .12s}
.pp-add-task:hover{border-color:var(--accent-border);color:var(--accent);background:var(--accent-dim)}
.pp-task-empty-cta{display:flex;flex-direction:column;align-items:center;gap:14px;text-align:center;padding:40px 24px;background:var(--surface);border:1px dashed var(--border);border-radius:var(--r)}
.pp-task-empty-txt{font-size:13px;color:var(--text-3);line-height:1.55;max-width:320px}

/* Day-to-Day "see more" link on My Day tiles (v353) */
.mdx-more{font-size:12px;font-weight:600;color:var(--accent);cursor:pointer;padding:6px 4px 2px;transition:opacity .12s}
.mdx-more:hover{opacity:.75;text-decoration:underline}

/* Day-to-Day drag-to-reorder (v354) */
.dtd-grip{flex-shrink:0;color:var(--text-3);cursor:grab;font-size:14px;line-height:1;opacity:0;transition:opacity .12s;user-select:none}
.dtd-row:hover .dtd-grip{opacity:.6}
.dtd-grip:active{cursor:grabbing}
.dtd-row.dtd-dragging{opacity:.4}
.dtd-row.dtd-dragover{border-color:var(--accent);box-shadow:inset 0 -3px 0 var(--accent)}
.dtd-row.dtd-dragover-top{border-color:var(--accent);box-shadow:inset 0 3px 0 var(--accent)}

/* Work Session chat 3-mode selector (v355) */
.ws-mode-seg{display:flex;gap:3px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-sm);padding:3px}
.ws-mode-btn{flex:1;padding:6px 6px;background:transparent;border:none;border-radius:var(--r-sm);font-family:var(--font-b);font-size:11px;font-weight:600;color:var(--text-3);cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:background .12s,color .12s}
.ws-mode-btn:hover{color:var(--text)}
.ws-mode-btn.active{background:var(--accent);color:#fff}
.ws-mode-hint{font-size:11px;color:var(--text-3);margin:6px 0 8px;padding-left:2px}

/* ===================== DAY-TO-DAY chat + 2-col layout (v356) ===================== */
.dtd-page-chat{max-width:1140px}
.dtd-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:24px;align-items:start;margin-top:8px}
.dtd-left{min-width:0}
.dtd-chat-col{display:flex;flex-direction:column;height:calc(100vh - 210px);min-height:440px;padding:0;overflow:hidden;position:sticky;top:16px}
.dtd-chat-hdr{font-family:var(--font-d);font-size:12px;font-weight:700;color:var(--text-2);text-transform:uppercase;letter-spacing:.06em;padding:14px 16px 8px;flex-shrink:0}
.dtd-chat-conv{flex:1;overflow-y:auto;padding:8px 16px 12px;min-height:0;display:flex;flex-direction:column;gap:16px}
.dtd-chat-empty{font-size:13px;color:var(--text-3);line-height:1.6;padding:20px 6px}
.dtd-chat-input{padding:12px 16px;border-top:1px solid var(--border);background:var(--surface-2);flex-shrink:0}
.dtd-composer{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:12px 14px}
.dtd-composer textarea{background:transparent;border:none;width:100%;font-family:var(--font-b);font-size:13px;color:var(--text);resize:none;outline:none;min-height:24px;max-height:200px;line-height:1.6}
@media (max-width:900px){.dtd-layout{grid-template-columns:1fr}.dtd-chat-col{height:auto;min-height:0;position:static}.dtd-chat-conv{max-height:420px}}

/* ===================== Templates page — step editor + how-to (v357) ===================== */
.tmpl-step-list{display:flex;flex-direction:column;gap:5px;margin-bottom:8px}
.tmpl-step{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--text-2);line-height:1.4;padding:4px 2px;border-radius:var(--r-sm)}
.tmpl-step:hover{background:var(--surface-2)}
.tmpl-step-num{flex-shrink:0;width:18px;height:18px;border-radius:50%;background:var(--surface-3);color:var(--text-3);font-size:10px;font-weight:700;display:flex;align-items:center;justify-content:center}
.tmpl-step-text{flex:1;min-width:0}
.tmpl-step-howto-badge{flex-shrink:0;font-size:10px;font-weight:700;color:var(--accent);background:var(--accent-dim);border:1px solid var(--accent-border);border-radius:999px;padding:2px 7px;cursor:help}
.tmpl-step-edit,.tmpl-step-del{flex-shrink:0;color:var(--text-3);opacity:0;transition:opacity .12s,color .12s;padding:2px}
.tmpl-step:hover .tmpl-step-edit,.tmpl-step:hover .tmpl-step-del{opacity:.7}
.tmpl-step-edit:hover{color:var(--accent)}
.tmpl-step-del:hover{color:#f87171}
.tmpl-step.editing{flex-direction:column;align-items:stretch;gap:7px;background:var(--surface-2);border:1px solid var(--accent-border);padding:10px 12px}
.tmpl-step-input{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-sm);padding:7px 9px;font-size:13px;color:var(--text);font-family:var(--font-b);outline:none}
.tmpl-step-input:focus,.tmpl-step-howto-input:focus{border-color:var(--accent-border)}
.tmpl-step-lbl{font-size:11px;color:var(--text-3);line-height:1.4}
.tmpl-step-howto-input{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-sm);padding:8px 10px;font-size:13px;color:var(--text);font-family:var(--font-b);outline:none;resize:vertical;line-height:1.5}
.tmpl-step-edit-actions{display:flex;justify-content:flex-end;gap:8px}
.tmpl-add-step{display:inline-flex;align-items:center;gap:5px;background:transparent;border:1px dashed var(--border-2);border-radius:var(--r-sm);color:var(--text-3);font-family:var(--font-b);font-size:12px;font-weight:600;padding:6px 12px;cursor:pointer;margin-bottom:12px;transition:border-color .12s,color .12s}
.tmpl-add-step:hover{border-color:var(--accent-border);color:var(--accent)}

/* ===================== Work Session step editor + how-to (v358) ===================== */
.ws-mstep-howto-badge{flex-shrink:0;font-size:11px;cursor:help}
.ws-mstep.editing-block{flex-direction:column;align-items:stretch;gap:7px;background:var(--surface-3);border:1px solid var(--accent-border);border-radius:var(--r-sm);padding:10px 12px}
.ws-mstep.editing-block .ws-mstep-edit-input{width:100%;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-sm);padding:7px 9px;font-size:13px;color:var(--text);font-family:var(--font-b);outline:none}
.ws-mstep-howto-lbl{font-size:11px;color:var(--text-3);line-height:1.4}
.ws-mstep-howto-input{width:100%;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-sm);padding:8px 10px;font-size:13px;color:var(--text);font-family:var(--font-b);outline:none;resize:vertical;line-height:1.5}
.ws-mstep-edit-input:focus,.ws-mstep-howto-input:focus{border-color:var(--accent-border)}
.ws-mstep-edit-actions{display:flex;justify-content:flex-end;gap:8px}
/* Day-to-Day quick-task inline edit + project rename (v358) */
.dtd-row-edit{flex:1;display:flex;gap:8px;align-items:center}
.dtd-row-edit input{flex:1;min-width:0;background:var(--surface-3);border:1px solid var(--accent-border);border-radius:var(--r-sm);padding:5px 9px;font-size:14px;color:var(--text);font-family:var(--font-b);outline:none}
.dtd-edit,.dtd-proj-edit{flex-shrink:0;color:var(--text-3);opacity:.5;transition:opacity .12s,color .12s;padding:3px}
.dtd-row:hover .dtd-edit,.dtd-proj-card:hover .dtd-proj-edit{opacity:1}
.dtd-edit:hover,.dtd-proj-edit:hover{color:var(--accent)}
.dtd-hdr-link{font-size:12px;font-weight:600;color:var(--accent);cursor:pointer}
.dtd-hdr-link:hover{text-decoration:underline}
.pp-add-task-row{display:flex;gap:8px;margin-top:8px}
.pp-add-task-row .pp-add-task{margin-top:0}

/* ===================== NOTEBOOK — cross-goal feed (v359) ===================== */
.nb-feed-view{max-width:760px;margin:0 auto;padding:24px 28px 60px}
.nb-feed-hdr{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}
.nb-filters{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:12px}
.nb-filter-sel{background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);padding:8px 10px;font-size:13px;color:var(--text);font-family:var(--font-b);outline:none;cursor:pointer;max-width:220px}
.nb-filter-sel:focus{border-color:var(--accent-border)}
.nb-search-wrap{flex:1;min-width:180px;display:flex;align-items:center;gap:8px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);padding:0 10px;color:var(--text-3)}
.nb-search-wrap:focus-within{border-color:var(--accent-border)}
.nb-search{flex:1;min-width:0;background:transparent;border:none;padding:9px 0;font-size:13px;color:var(--text);font-family:var(--font-b);outline:none}
.nb-clear{background:transparent;border:none;color:var(--text-3);font-size:12px;font-weight:600;cursor:pointer;padding:6px 4px}
.nb-clear:hover{color:var(--text)}
.nb-tags{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:16px}
.nb-tags:empty{display:none}
.nb-tag{background:var(--surface-2);border:1px solid var(--border);border-radius:999px;color:var(--text-2);font-size:12px;font-weight:600;padding:3px 11px;cursor:pointer;transition:all .12s}
.nb-tag:hover{border-color:var(--accent-border);color:var(--text)}
.nb-tag.on{background:var(--accent);border-color:var(--accent);color:#fff}
.nb-day{margin-bottom:22px}
.nb-day-hdr{font-family:var(--font-d);font-size:12px;font-weight:700;color:var(--text-3);text-transform:uppercase;letter-spacing:.06em;margin-bottom:10px;position:sticky;top:0;background:var(--bg);padding:4px 0;z-index:1}
.nb-card{background:var(--surface);border:1px solid var(--border);border-left:3px solid var(--yellow);border-radius:var(--r);padding:12px 16px;margin-bottom:10px}
.nb-card.ai{border-left-color:var(--accent)}
.nb-card-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px;flex-wrap:wrap}
.nb-ctx{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:var(--text-2);cursor:pointer;min-width:0}
.nb-ctx:hover{color:var(--accent)}
.nb-ctx-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}
.nb-ctx-sep{color:var(--text-3);margin:0 1px}
.nb-ctx-kind{background:var(--surface-3);color:var(--text-3);font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;padding:1px 6px;border-radius:999px;margin-left:2px}
.nb-card-time{font-size:11px;color:var(--text-3);white-space:nowrap;flex-shrink:0}
.nb-card-body{font-size:13px;color:var(--text);line-height:1.6}
.nb-card-body p{margin:0 0 6px}.nb-card-body p:last-child{margin-bottom:0}
.nb-card-body ul,.nb-card-body ol{margin:4px 0;padding-left:20px}
.nb-card-actions{display:flex;gap:6px;margin-top:10px;padding-top:8px;border-top:1px solid var(--border);opacity:0;transition:opacity .12s}
.nb-card:hover .nb-card-actions{opacity:1}
.nb-card-btn{background:transparent;border:none;color:var(--text-3);font-size:12px;font-weight:600;cursor:pointer;padding:3px 8px;border-radius:var(--r-sm)}
.nb-card-btn:hover{background:var(--surface-2);color:var(--text)}
.nb-card-btn.danger:hover{color:#f87171}
.nb-feed-empty{font-size:13px;color:var(--text-3);line-height:1.6;padding:36px 18px;text-align:center;background:var(--surface);border:1px dashed var(--border);border-radius:var(--r)}

/* v359b: Notebook cards match the Work Session note cards — cream "paper" for user notes, purple for AI */
.nb-card{border-left-width:1px}
.nb-card.user{background:#fffef5;border-color:rgba(234,179,8,.45)}
.nb-card.ai{background:var(--accent-dim);border-color:var(--accent-border)}
.nb-card.user .nb-ctx{color:#a16207}
.nb-card.user .nb-ctx:hover{color:#854d0e}
.nb-card.user .nb-ctx-sep{color:#b45309}
.nb-card.user .nb-ctx-kind{background:rgba(234,179,8,.18);color:#a16207}
.nb-card.user .nb-card-time{color:#6b7280}
.nb-card.user .nb-card-body{color:#1f2937}
.nb-card.user .nb-card-body a{color:#2563eb}
.nb-card.user .nb-card-actions{border-top-color:rgba(234,179,8,.35)}
.nb-card.user .nb-card-btn{color:#78716c}
.nb-card.user .nb-card-btn:hover{background:rgba(234,179,8,.16);color:#1f2937}
.nb-card.user .nb-card-btn.danger:hover{color:#dc2626}
.nb-card.ai .nb-ctx{color:var(--accent)}
.nb-card.ai .nb-card-body{color:var(--text)}

/* ===================== Quick Capture + Inbox (v360) ===================== */
.nav-capture{display:flex;align-items:center;gap:9px;width:100%;background:var(--accent);border:none;border-radius:var(--r-sm);color:#fff;font-family:var(--font-b);font-size:14px;font-weight:700;padding:10px 14px;margin-bottom:8px;cursor:pointer;transition:filter .12s,transform .04s}
.nav-capture:hover{filter:brightness(1.08)}
.nav-capture:active{transform:translateY(1px)}
.nav-capture svg{width:17px;height:17px;flex-shrink:0}
.qc-input{width:100%;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);padding:11px 13px;font-size:15px;color:var(--text);font-family:var(--font-b);outline:none;resize:vertical;line-height:1.55}
.qc-input:focus{border-color:var(--accent-border)}

/* ===================== Global Search (v360) ===================== */
.srch-bar{display:flex;align-items:center;gap:10px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r);padding:0 14px;margin:8px 0 18px;color:var(--text-3)}
.srch-bar:focus-within{border-color:var(--accent-border)}
.srch-input{flex:1;background:transparent;border:none;padding:13px 0;font-size:15px;color:var(--text);font-family:var(--font-b);outline:none}
.srch-results{display:flex;flex-direction:column;gap:18px}
.srch-group-hdr{display:flex;align-items:center;gap:8px;font-family:var(--font-d);font-size:12px;font-weight:700;color:var(--text-3);text-transform:uppercase;letter-spacing:.06em;margin-bottom:6px}
.srch-count{background:var(--surface-3);color:var(--text-3);border-radius:999px;font-size:11px;padding:0 7px;font-weight:700}
.srch-row{display:flex;align-items:center;gap:10px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-sm);padding:10px 13px;margin-bottom:6px;cursor:pointer;transition:border-color .12s,background .12s}
.srch-row:hover{border-color:var(--accent-border);background:var(--surface-2)}
.srch-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}
.srch-title{flex:1;min-width:0;font-size:14px;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.srch-sub{font-size:12px;color:var(--text-3);white-space:nowrap;flex-shrink:0;max-width:45%;overflow:hidden;text-overflow:ellipsis}

/* ===================== GRACE (assistant hub, v365) ===================== */
.grace-page{max-width:1200px}
.grace-head{margin-bottom:16px}
.grace-sub{font-size:13px;color:var(--text-2);line-height:1.55;margin-top:5px;max-width:640px}
.grace-layout{display:grid;grid-template-columns:1fr 344px;gap:22px;align-items:start}
.grace-chat-col{display:flex;flex-direction:column;min-width:0}
.grace-conv{min-height:340px;max-height:calc(100vh - 300px);overflow-y:auto;overscroll-behavior:contain;padding:4px 2px}
.grace-composer{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:13px 15px;margin-top:10px}
.grace-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;min-height:320px;padding:24px;max-width:470px;margin:0 auto}
.grace-empty-mark{width:54px;height:54px;border-radius:50%;background:var(--accent-dim);color:var(--accent);display:flex;align-items:center;justify-content:center;margin-bottom:16px}
.grace-empty-mark svg{width:27px;height:27px}
.grace-empty-ttl{font-family:var(--font-d);font-size:23px;font-weight:800;color:var(--text);letter-spacing:-.02em;margin-bottom:9px;text-wrap:balance}
.grace-empty-sub{font-size:14px;color:var(--text-2);line-height:1.55}
.grace-stack{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);padding:16px;position:sticky;top:16px}
.grace-stack-hd{font-family:var(--font-d);font-weight:700;font-size:14px;color:var(--text);margin-bottom:12px;display:flex;align-items:center;gap:8px}
.grace-stack-n{background:var(--surface-3);color:var(--text-2);font-size:11px;font-weight:700;border-radius:20px;padding:1px 8px}
.grace-add{margin-top:14px;padding-top:13px;border-top:1px solid var(--border)}
.grace-add-input{width:100%;box-sizing:border-box;background:var(--surface-2);border:1px solid var(--border);border-radius:9px;padding:9px 11px;font-family:var(--font-b);font-size:13px;color:var(--text);outline:none}
.grace-add-input:focus{border-color:var(--accent)}
.grace-add-actions{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:8px}
.grace-add-lbl{font-size:11px;color:var(--text-3);font-weight:600;margin-right:1px}
.grace-add-btn{background:var(--surface-2);border:1px solid var(--border);border-radius:7px;padding:5px 10px;font-size:12px;font-weight:600;color:var(--text-2);cursor:pointer;transition:border-color .12s,color .12s}
.grace-add-btn:hover{border-color:var(--accent-border);color:var(--text)}
.grace-add-btn.rem{color:var(--text-2)}
.grace-add-btn.rem:hover{color:var(--accent);border-color:var(--accent-border)}
.grace-stack-list{display:flex;flex-direction:column;gap:8px}
.grace-item{background:var(--surface-2);border:1px solid var(--border);border-radius:10px;padding:10px 11px;display:flex;align-items:flex-start;gap:9px}
.grace-item.is-due{border-color:color-mix(in srgb,var(--red,#e5484d) 45%,transparent);background:color-mix(in srgb,var(--red,#e5484d) 9%,var(--surface-2))}
.grace-item-check{flex-shrink:0;width:21px;height:21px;border-radius:6px;border:1.5px solid var(--border);background:transparent;color:var(--green);display:flex;align-items:center;justify-content:center;cursor:pointer;margin-top:1px;padding:0}
.grace-item-check svg{width:12px;height:12px;opacity:0;transition:opacity .1s}
.grace-item-check:hover{border-color:var(--green)}
.grace-item-check:hover svg{opacity:1}
.grace-item-body{flex:1;min-width:0}
.grace-item-txt{font-size:13px;color:var(--text);line-height:1.42}
.grace-when{display:inline-block;font-size:11px;font-weight:700;color:var(--accent);margin-top:4px}
.grace-when.due{color:var(--red,#e5484d)}
.grace-item-acts{display:flex;align-items:center;gap:6px;margin-top:9px;flex-wrap:wrap}
.grace-item-goal{background:var(--surface);border:1px solid var(--border);border-radius:6px;padding:4px 6px;font-size:11px;color:var(--text-2);max-width:150px}
.grace-stack-empty{font-size:12.5px;color:var(--text-3);line-height:1.5;padding:8px 2px}
.nav-badge-due{background:var(--red,#e5484d);color:#fff}
.mtab-badge.due{background:var(--red,#e5484d)}

/* ===================== Mobile shell (v360) ===================== */
#mobile-topbar,#nav-scrim,#mobile-tabbar{display:none}
@media(max-width:768px){
  #app-shell{grid-template-columns:1fr}
  #mobile-topbar{display:flex;align-items:center;gap:12px;position:fixed;top:0;left:0;right:0;height:52px;z-index:50;background:var(--surface);border-bottom:1px solid var(--border);padding:0 14px}
  #nav-burger{background:transparent;border:none;color:var(--text);cursor:pointer;padding:4px;display:flex}
  .mtb-title{font-family:var(--font-d);font-weight:700;font-size:15px;flex:1;color:var(--text)}
  #sidebar{position:fixed;top:0;left:0;bottom:0;width:270px;max-width:82vw;z-index:70;transform:translateX(-100%);transition:transform .22s ease;box-shadow:2px 0 30px rgba(0,0,0,.55)}
  body.nav-open #sidebar{transform:translateX(0)}
  #nav-scrim{display:block;position:fixed;inset:0;background:rgba(0,0,0,.5);opacity:0;pointer-events:none;transition:opacity .22s;z-index:65}
  body.nav-open #nav-scrim{opacity:1;pointer-events:auto}
  #main-content{padding-top:52px;padding-bottom:calc(62px + env(safe-area-inset-bottom,0px))}
  /* Bottom tab bar — native-style quick nav */
  #mobile-tabbar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:60;height:calc(58px + env(safe-area-inset-bottom,0px));padding-bottom:env(safe-area-inset-bottom,0px);background:color-mix(in srgb,var(--surface) 94%,transparent);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-top:1px solid var(--border)}
  .mtab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;background:transparent;border:none;color:var(--text-3);cursor:pointer;font-family:var(--font-b);font-size:10.5px;font-weight:600;padding:6px 2px;position:relative;-webkit-tap-highlight-color:transparent}
  .mtab svg{width:22px;height:22px}
  .mtab.on{color:var(--accent)}
  .mtab-cap{color:var(--accent)}
  .mtab-cap svg{background:var(--accent);color:#fff;border-radius:11px;width:34px;height:34px;padding:6px;box-sizing:border-box;margin-bottom:-2px}
  .mtab-badge{position:absolute;top:3px;right:calc(50% - 20px);min-width:15px;height:15px;padding:0 3px;border-radius:8px;background:var(--red,#e5484d);color:#fff;font-size:9px;font-weight:700;display:flex;align-items:center;justify-content:center;line-height:1}
  /* Tactile press feedback — app-like tap response */
  .mtab:active{transform:scale(.9);transition:transform .06s}
  .mtab-cap:active svg{transform:scale(.9)}
  .plan-list-layout,.dtd-layout{grid-template-columns:1fr}
  .grace-layout{grid-template-columns:1fr;gap:16px}
  /* Chat leads on mobile — the conversation is the point, not the reminder rail */
  .grace-stack{position:static}
  /* On mobile the whole page scrolls; the chat must NOT be a trapped inner scroll box
     (max-height + overscroll:contain blocked page scrolling when the finger was over it). */
  .grace-conv{max-height:none;min-height:200px;overflow:visible;overscroll-behavior:auto}
  .dtd-chat-col{height:auto;min-height:420px;position:static}
  .main-view,.dtd-page,.nb-feed-view{padding-left:16px;padding-right:16px}
  /* v367: on phones there's no room to stack a goal name beside a task/calendar title — it wraps
     the title one word per line. The goal is already encoded by the row's color, so hide the name. */
  .meta-goal{display:none}
  /* v368 — MOBILE READABILITY PASS. The content text (task/event/chat) is what matters; give it the
     width and keep metadata/status compact. */
  /* Chat: hide sender avatars on phones (alignment + bubble color already say who's talking) and
     give the reclaimed width to the bubble. Keep a small max-width so the left/right offset — now
     the main sender cue — stays visible. */
  .msg > .claude-avatar, .msg > .avatar{display:none}
  .msg{max-width:88%;gap:0}
  /* Row titles: wrap to two lines instead of truncating behind a status chip; chips stay small and
     out of the way. */
  .plan-row{align-items:flex-start}
  .plan-row-body{min-width:0}
  .plan-row-title{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .plan-row-right{flex-wrap:nowrap;flex-shrink:0;padding-top:1px}
  .wn-chip{font-size:10px;padding:1px 7px;letter-spacing:0}
  /* Day-to-Day task rows: the title gets priority; date/controls compress. */
  .pp-task-title{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .dtd-row{align-items:flex-start;gap:9px}
  .dtd-grip{display:none}   /* drag-to-reorder is a desktop affordance */
  .dtd-body{flex:1 1 auto;min-width:0}
  .dtd-title{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  /* Touch has no hover, so the edit/delete icons (hover-only on desktop) must be shown outright here —
     otherwise there's no way to rename or remove a task on a phone. Bigger tap targets, and the due
     chip sits just left of them. */
  .dtd-edit,.dtd-del{display:flex;opacity:.7;padding:7px}
  .dtd-edit svg,.dtd-del svg{width:15px;height:15px}
  .dtd-due{font-size:10px;padding:2px 7px}
  .goal-tabbar-inner{flex-direction:column;align-items:stretch;gap:9px;padding:9px 16px}
  .gt-name{align-self:flex-start}
  .gt-name-txt{max-width:74vw}
  .gt-tabs{margin-left:0;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .gt-tabs::-webkit-scrollbar{display:none}
  .gt-tab{flex:0 0 auto}
  .ws-toast{bottom:calc(72px + env(safe-area-inset-bottom,0px))}   /* clear the bottom tab bar */
  .nb-feed-hdr{flex-direction:column;align-items:stretch;gap:10px}
  .mdx-top{align-items:center}
  .md-greeting{font-size:24px}
  .mdx-grip{display:none}   /* drag-to-reorder is a desktop affordance; dead clutter on touch */
}
