/* Workspace refinement: shared prototype colours, readable density, stable controls. */
:root{--cream:#f8fafc;--paper:#ffffff;--ink:#0f172a;--muted:#64748b;--line:#cbd5e1;--surface:#f1f5f9;--selected:#e2e8f0;--green-dark:#0f172a;--field-line:#94a3b8}
:root[data-theme=dark]{--cream:#111c20;--paper:#1c2a2f;--ink:#eef2ed;--muted:#b4c4c6;--line:#42585e;--surface:#26383d;--selected:#304437;--selected-line:#0284c7;--green:#0284c7;--green-dark:#0284c7;--field-line:#708a91}
body{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.app-shell .topbar{background:var(--paper)}
.desktop-nav{margin-left:0;align-items:center;background:#f8fafc;padding:4px 5px;border-radius:9999px;border:1px solid #cbd5e1;gap:4px}
.sidebar-group{display:none}
.sidebar-label{display:none}
.desktop-nav :is(a,button){width:auto;min-height:32px;padding:6px 14px;border:0;border-radius:9999px;background:transparent;color:var(--muted);font-size:.85rem;font-weight:600;text-align:center;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:6px;transition:all .15s ease}
.desktop-nav :is(a,button):hover{background:rgba(0,0,0,.04);color:var(--ink)}
.desktop-nav a.active,.desktop-nav a[aria-current=page]{background:var(--green-dark);color:#fff;border:0;box-shadow:0 1px 3px rgba(15,23,42,.25)}
.desktop-nav a.active:hover,.desktop-nav a[aria-current=page]:hover{background:#1e293b;color:#fff}
.resource-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:24px}
.resource-card{min-width:0;background:var(--paper);border:1px solid var(--line);border-radius:16px;padding:24px}
.resource-card h2{margin:0 0 8px;font-size:1.15rem}.resource-card>p{color:var(--muted);font-size:.9rem;margin:0 0 20px}
.resource-card .utility-menu{display:grid;gap:0}.resource-card .utility-menu :is(a,button){display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:4px;width:100%;min-height:52px;padding:12px 0;border:0;border-top:1px solid var(--line);border-radius:0;background:transparent;color:var(--ink);font-size:.9rem;text-align:left;text-decoration:none}
.resource-card .utility-menu span{color:var(--muted);font-size:.8rem}.resource-card .utility-menu :is(a,button):hover{color:var(--green-dark);background:transparent;text-decoration:underline}
/* Checklist icon menus retain their compact dimensions; the labelled job control does not. */
#taskDetail .detail-menu,#taskDetail .detail-menu[open]{width:132px;min-width:132px;margin:0;align-self:start}
#taskDetail .detail-menu>summary,#taskDetail .detail-menu[open]>summary{box-sizing:border-box;width:132px;min-width:132px;height:48px;min-height:48px;margin:0;padding:10px 12px;letter-spacing:0;font-size:.85rem;line-height:26px;white-space:nowrap;background:var(--paper);color:var(--ink);border:1px solid var(--line)}
#taskDetail .detail-menu[open]>summary{background:var(--selected);border-color:var(--green-dark)}
#taskDetail .detail-head{column-gap:12px}
:root[data-theme=dark] :is(.app-shell .topbar,.notebook-updates,.resource-card),:root[data-theme=dark] #detailDialog>.task-close-bar{background:var(--paper);color:var(--ink)}
:root[data-theme=dark] .app-shell .task-card{background:var(--sticker-paper,var(--paper));border-color:var(--line);border-left-color:var(--sticker-ink,var(--line))}
:root[data-theme=dark] .primary-button{background:var(--green);color:var(--accent-ink,#17271e)}
:root[data-theme=dark] .desktop-nav a.active{background:var(--selected);color:var(--green)}
@media(min-width:761px){
 .app-shell .topbar{position:sticky;top:0;z-index:40;width:100%;height:58px;padding:0 clamp(16px,3vw,36px);display:flex;align-items:center;justify-content:space-between;gap:16px;backdrop-filter:none;overflow:visible}
 .app-shell .topbar>.desktop-nav{display:inline-flex;align-items:center;margin:0 auto;overflow:visible;gap:4px}
 .desktop-nav>a,.sidebar-group{flex-shrink:0}
 .topbar .top-actions{margin-top:0;margin-left:0;display:flex;align-items:center;gap:14px}
 .topbar .logo{padding:0;font-size:22px;display:flex;align-items:center;gap:8px}.workspace-message{display:none}
 #main{margin-left:0;margin:0 auto;max-width:1400px;width:100%;padding:28px clamp(16px,3vw,40px) 64px}
 .app-shell .view:not(.notebook-view),.app-shell .view.notebook-view{max-width:1400px;width:100%}
 .view-head{align-items:center;margin-bottom:28px}.view-head h1{font-size:2rem;line-height:1.15}.view-head p{line-height:1.6}
 .notebook-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:28px;align-items:start}
 .notebook-layout.first-list-empty{display:block}
 .notebook-sidebar{display:grid;grid-template-columns:1fr;gap:20px}
 .notebook-updates{background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:22px}
 .notebook-sidebar .pinned-note{display:none}
 #app .notebook-paper .board-task-grid,#app .personal-task-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,370px),1fr));gap:18px}
 .app-shell .task-card{grid-template-columns:36px minmax(0,1fr);padding:22px;gap:14px;align-content:start}
 .app-shell .task-card .task-spark{width:36px;height:36px;align-self:start}
 .app-shell .task-card .task-card-main{grid-column:2;grid-row:1;padding:0}
 .app-shell .task-card .task-actions{grid-column:2;grid-row:2;justify-self:start}
 .board-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr))}
 body.task-page #detailDialog[open]{width:min(calc(100% - 32px),1280px);max-width:1280px;margin:32px auto 64px;padding:28px 36px}
 #detailDialog>#taskDetail{max-width:100%;padding:20px 0}
 #taskDetail .checklist-section{max-width:960px}
}
@media(min-width:1250px){.notebook-layout{grid-template-columns:minmax(0,1fr) 300px}.notebook-sidebar{position:sticky;top:28px}.board-hero h1{font-size:2.1rem}}
@media(min-width:1800px){body.task-page #detailDialog[open]{margin:32px auto 64px;width:1280px}}
@media(max-width:760px){
 .view-head{flex-direction:column;align-items:stretch;gap:20px}
 .view-head>div{min-width:0;width:100%}
 .view-head h1{line-height:1.2}
 .collection-actions,.collection-more{min-width:0;width:100%}
 .collection-more[open]{display:grid;gap:10px}
 .collection-more>button{width:100%;white-space:normal}
 .sidebar-group{display:none}.resource-grid{gap:16px}.resource-card{padding:20px}#taskDetail .detail-head{grid-template-columns:minmax(0,1fr) 132px}.resource-card .utility-menu :is(a,button){min-height:52px}}
@media print{.sidebar-group{display:none}.resource-grid{display:block}.notebook-sidebar{position:static}}

.job-settings-nav{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 24px}.job-settings-nav button{min-height:44px;padding:10px 14px;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink);font-size:.85rem}.job-settings-nav button[aria-pressed=true]{background:var(--selected);border-color:var(--green-dark)}

@media(min-width:761px){.topbar .workspace-message{display:none}.desktop-nav{gap:4px}.desktop-nav :is(a,button){min-height:44px}.sidebar-group{margin-top:10px;padding-top:10px}.sidebar-label{margin-bottom:4px}}
.app-shell .kicker{color:var(--muted)}
/* Keep the share icon beside Job options, never on a separate empty row. */
#taskDetail .detail-head:has(>.job-share-icon){grid-template-columns:minmax(0,1fr) 48px 132px;gap:10px 8px}
#taskDetail .detail-head>.job-share-icon{grid-column:2;grid-row:1;float:none;margin:0;align-self:center}
#taskDetail .detail-head:has(>.job-share-icon)>.detail-menu{grid-column:3;grid-row:1}
#taskDetail .detail-head>.task-parent-list{grid-column:1/-1;margin:6px 0}



/* The management action sits outside the link; keep card content aligned across a row. */
.board-card{min-width:0}
.board-card-link{display:flex;flex:1;flex-direction:column;min-width:0}
.board-card-link .board-progress{flex:none;width:100%;margin-top:auto}
.board-card-link>p{margin-bottom:12px}
.board-meta{flex-wrap:wrap;gap:4px 12px}
.board-card>.card-options{margin-top:8px}
.event-group>summary{flex-wrap:wrap}
.event-group-actions{flex-wrap:wrap}

/* Everyday work: one visible input, one action, optional controls underneath. */
.board-workspace-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin:20px 0 24px}
.notebook-paper .board-workspace-tools .quick-add{position:static;display:flex;flex:1 1 100%;flex-wrap:wrap;gap:8px;margin:0;padding:8px;border:1px solid var(--field-line);border-radius:12px;background:var(--paper)}
.board-workspace-tools .quick-add input{flex:1;min-width:0;min-height:48px;font:inherit;color:var(--ink)}
.board-workspace-tools .quick-add button{flex:none;min-height:48px;padding:10px 16px}
.board-workspace-tools .quick-add .form-error{flex-basis:100%;margin:0!important}
.board-workspace-tools .quick-add .form-error:empty{display:none}
.board-workspace-tools .job-details-add{min-height:44px;padding:8px 0;font-size:.85rem}
.board-workspace-tools .list-view-options{flex:1 1 auto;margin:0;padding:0;border:0;background:transparent}
.board-workspace-tools .list-view-options>summary{width:max-content;max-width:100%;padding:10px 0;font-size:.85rem}
.board-workspace-tools .list-view-options[open]{flex-basis:100%}
.board-empty .notebook-sidebar,.board-empty .board-stats,.board-empty .mobile-board-progress{display:none}
.notebook-layout.board-empty{grid-template-columns:minmax(0,1fr)}
.board-hero .board-description-desktop:empty{display:none}
.app-shell .task-card .task-status{border:0;background:transparent;padding:0;margin:8px 0}
.app-shell .task-card .helper-avatars{display:none}
.app-shell .task-card .task-status-line strong{font-size:.85rem;font-weight:500}
.other-job-views{margin-top:28px}.other-job-views>summary,.optional-help>summary{min-height:48px;padding:12px 0;cursor:pointer;color:var(--green-dark)}
.optional-help{margin-top:28px}.optional-help>.task-list{margin-top:12px}
@media(max-width:760px){.board-workspace-tools .quick-add input{width:0}.board-empty-message{padding:12px 0}.app-shell .board-hero{padding-bottom:8px}}

.board-workspace-tools .quick-add button.primary-button{background:var(--green-dark);color:#fff}
:root[data-theme=dark] .board-workspace-tools .quick-add button.primary-button{color:var(--accent-ink,#17271e)}
.task-grid-caption{display:none}
/* Board names are already visible above the jobs; personal cards retain their board context. */
.board-task-grid .task-list-name{display:none}
@media(max-width:760px){
 .app-shell .task-card{grid-template-columns:minmax(0,1fr)}
 .app-shell .task-card .task-card-main{grid-column:1;grid-row:1}
 .app-shell .task-card .task-actions{grid-column:1;grid-row:2}
}

/* Board → Notebook → Checklist: compact controls leave the hierarchy readable on phones. */
#taskDetail .detail-head,#taskDetail .detail-head:has(>.job-share-icon){display:block;position:relative;grid-template-columns:none;padding:0 0 8px}
#taskDetail .detail-head>.kicker{min-height:48px;padding-right:104px;display:flex;align-items:center}
#taskDetail .detail-head>.job-share-icon{position:absolute;right:52px;top:0;float:none;width:44px;height:44px;margin:0}
#taskDetail .detail-head>.detail-menu,#taskDetail .detail-head>.detail-menu[open]{position:absolute;right:0;top:0;width:44px;min-width:44px;margin:0}
#taskDetail .detail-head>.detail-menu>summary,#taskDetail .detail-head>.detail-menu[open]>summary{display:flex;align-items:center;justify-content:center;width:44px;min-width:44px;height:44px;min-height:44px;padding:0;font-size:24px}
#taskDetail .detail-head>.hierarchy-breadcrumb{width:100%;grid-column:auto}
#taskDetail .hierarchy-label{display:inline-flex;flex-direction:row;white-space:nowrap;width:max-content}
#taskDetail .detail-head h1{font-size:clamp(26px,6vw,34px);line-height:1.2;overflow-wrap:anywhere;margin:12px 0}

.management-board-options,.board-card .card-options button{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;font-size:24px}

.board-card{position:relative}.board-card>.card-options{position:absolute;top:12px;right:12px;z-index:3}.board-card>.card-options button{border:1px solid var(--line);border-radius:10px;background:var(--paper);color:var(--ink);text-decoration:none}

/* Keep the first checklist item in reach when a helper opens a phone link. */
@media(max-width:760px){
 body.task-page .topbar{height:64px}
 #taskDetail .detail-head>.kicker{font-size:11px;line-height:1.3;margin:0;min-height:44px}
 #taskDetail .detail-head>.read-only-notice{padding:0;margin:8px 0;font-size:13px;line-height:1.4;background:transparent;border:0}
 #taskDetail .detail-head>.hierarchy-breadcrumb{gap:4px;margin:8px 0;font-size:12px;line-height:1.4}
 #taskDetail .hierarchy-breadcrumb>span{gap:4px}
 #taskDetail .hierarchy-breadcrumb .hierarchy-label{padding:3px 5px;font-size:11px}
 #taskDetail .detail-head h1{margin:8px 0}
 #taskDetail .checklist-heading h3{margin:8px 0}
 #taskDetail .checklist-order-hint{margin:4px 0;font-size:14px;line-height:1.4}
 #taskDetail .checklist-save-status{margin:4px 0;font-size:13px;line-height:1.4}
 #taskDetail .checklist-view{margin:8px 0 4px}
}

/* Keep the level and its title in one wrapping, navigable rectangle. */
.hierarchy-label{box-sizing:border-box;min-width:0;max-width:100%;white-space:normal;text-align:left;text-decoration:none;color:var(--ink)}
a.hierarchy-label:hover{background:var(--selected);text-decoration:none;border-color:var(--green-dark)}
a.hierarchy-label:focus-visible{outline:3px solid var(--green-dark);outline-offset:3px}
.hierarchy-type{display:inline-flex;align-items:center;gap:7px;flex:none;font-size:12px;font-weight:750;line-height:1.3}
.hierarchy-label:has(.hierarchy-title),#taskDetail .hierarchy-label:has(.hierarchy-title){display:inline-block;font-size:inherit;line-height:1.3}
.hierarchy-label:has(.hierarchy-title) .hierarchy-type{margin-right:7px;vertical-align:middle}
.hierarchy-title{min-width:0;flex:1 1 8ch;overflow-wrap:anywhere;white-space:normal;font-weight:inherit}
.hierarchy-type svg{align-self:center}
#taskDetail .hierarchy-label{white-space:normal;max-width:100%}
#taskDetail .hierarchy-breadcrumb a{display:inline-block}
.task-card .task-name{display:block;margin:0 0 8px}
.task-card .task-list-name{margin:0 0 8px;font-size:12px}
.task-card .task-name a,.task-card .task-list-name a{position:relative;z-index:2}
.task-card.completed .hierarchy-notebook .hierarchy-title{text-decoration:line-through}
.board-hero-top>div:first-child{min-width:0}
.board-card-link h3 .hierarchy-label{width:100%}

@media(max-width:600px){#taskDetail #detailTitle{font-size:22px;line-height:1.3}}

/* W01: group notebook context, responsibility and progress above the item controls. */
#taskDetail .detail-head>.kicker{display:none}
#taskDetail .detail-head>.hierarchy-breadcrumb{padding-right:104px;min-height:44px;margin:0;display:flex;align-items:center}
#taskDetail .task-context-note{margin:6px 0;padding:0;background:transparent;font-size:14px;line-height:1.4;overflow-wrap:anywhere}
#taskDetail .detail-head .task-status{margin:6px 0}
#taskDetail .detail-task-actions:empty{display:none}
#taskDetail .checklist-section{margin-top:8px;padding-top:8px}
#taskDetail .checklist-heading{gap:8px;justify-content:space-between}
#taskDetail .checklist-heading h3{margin:4px 0;font-size:16px;flex-wrap:nowrap;white-space:nowrap;gap:4px}
#taskDetail .checklist-heading .hierarchy-label{padding:3px 5px;font-size:11px}
#taskDetail .checklist-order-hint,#taskDetail .checklist-save-status{margin:4px 0;font-size:13px;line-height:1.4}
#taskDetail .checklist-progress{margin:6px 0}
#taskDetail .checklist-row,#taskDetail .checklist-row:has(.checklist-menu[open]){grid-template-columns:44px minmax(0,1fr) 56px 44px}
#taskDetail .checklist-row>.checklist-toggle{grid-area:1 / 1;width:44px;min-width:44px}
#taskDetail .checklist-row>.checklist-copy{grid-area:1 / 2;min-width:0;overflow-wrap:anywhere}
#taskDetail .checklist-row>.checklist-menu,#taskDetail .checklist-row>.checklist-menu[open]{grid-area:1 / 4}
#taskDetail .checklist-row>.checklist-assignment,#taskDetail .checklist-row>.checklist-assignment[open]{grid-area:1 / 3}
#taskDetail .checklist-assignment>summary{width:56px;min-width:56px;height:auto;min-height:44px;display:flex;flex-direction:column;justify-content:center;gap:2px;padding:4px;border-radius:10px}
#taskDetail .checklist-assignment>summary>span{display:flex;align-items:center;justify-content:center;line-height:1.2}
#taskDetail .checklist-assignment>summary .checklist-assignment-label{font:11px/1.2 system-ui;letter-spacing:normal;white-space:nowrap;word-break:normal;width:100%}
#taskDetail .checklist-assignment-space{width:56px}
#taskDetail .checklist-edit-actions{flex-wrap:wrap}
#taskDetail .checklist-edit-actions>small{flex-basis:100%}
@media(max-width:600px){
 body.task-page #detailDialog[open]{margin:8px 8px 100px;padding:12px;width:calc(100% - 16px)}
 #taskDetail .detail-head>.read-only-notice{margin:4px 0}
 #taskDetail .detail-head h1{margin:6px 0}
 #taskDetail .checklist-grip{display:none}
 #taskDetail .checklist-row{gap:4px}
 #taskDetail .checklist-row:has(>[data-checklist-grip]){padding-left:0}
 #taskDetail .checklist-item{padding-left:0}
 #taskDetail .checklist-copy small{font-size:11px;line-height:1.3}
}

/* W02: work precedes optional creation, teaching and management controls. */
.board-guide{margin:8px 0;font-size:13px}.board-guide>summary{min-height:44px;display:flex;align-items:center;cursor:pointer;color:var(--green-dark)}
.board-guide p{margin:4px 0}
.board-workspace-tools .board-view-switch{flex-basis:100%;margin:0}
.board-view-switch .view-toggle{display:flex;flex-wrap:wrap;gap:4px}
.board-view-switch button{min-height:44px}
.board-hero .board-stats{display:flex;flex-wrap:wrap;gap:4px 12px;margin-top:8px}
.board-hero .board-stats>span{display:inline;padding:0;border:0;background:transparent;font-size:13px;line-height:1.5}
.board-hero .board-stats>.no-help-needed{display:none}
.board-create-options{margin-top:16px}.board-create-options>summary{min-height:44px;display:list-item;padding:12px 0;cursor:pointer;color:var(--green-dark)}
.notebook-paper .board-create-options .quick-add{display:flex;flex-wrap:wrap;gap:8px;padding:8px;margin:0;border:1px solid var(--field-line);border-radius:12px}
.board-create-options .quick-add input{flex:1;min-width:0;width:0}.board-create-options .quick-add button{flex:none}
.board-create-options .quick-add .form-error:empty{display:none}
.board-create-options .job-details-add{min-height:44px;margin-top:8px}
@media(max-width:760px){
 /* My boards stays in fixed navigation; cover artwork and a duplicate back row yield to work. */
 body:has(.notebook-view) .topbar{height:64px}
 body:has(.notebook-view) #main{padding-top:8px}
 .notebook-view .mobile-board-back,.notebook-paper .board-header-cover{display:none}
 .notebook-view .notebook-paper{padding-top:12px}
 .notebook-paper .board-hero h1{font-size:24px;margin:4px 0;line-height:1.2}
 .notebook-paper .board-hero-top{gap:4px}
 .notebook-paper .board-owner-actions{margin:4px 0}
 .notebook-paper .board-guide{margin:0}
 .notebook-paper .mobile-board-progress{margin:8px 0}
 .notebook-paper .board-workspace-tools{margin:8px 0;gap:0 12px}
 .notebook-paper .board-workspace-tools .board-view-switch{padding:0}
 .notebook-paper .board-workspace-tools .list-view-options>summary{padding:8px 0}
 .notebook-paper .board-view-switch .view-toggle{padding:2px}
 .notebook-paper .board-view-switch button{min-height:44px;padding:8px 10px;font-size:14px}
 .notebook-paper .board-stats>span{display:inline;font-size:12px}
 .notebook-paper .board-stats>.no-help-needed{display:none}
 .notebook-paper .board-create-options .quick-add input{min-height:44px}
 #app .notebook-paper .board-task-grid .task-card{padding:8px 16px;gap:6px}
}

/* Updates keeps source, action and date readable at phone widths. */
.updates-collection > *, .personal-notifications, .notebook-updates .notebook-section-head > * { min-width: 0; }
.updates-collection h2, .personal-notifications h2, .updates-preview .feed-link, .updates-preview time { overflow-wrap: anywhere; white-space: normal; }
.updates-preview .feed-link { display: block; max-width: 100%; min-height: 44px; text-align: left; }
.updates-preview .update-source { margin: 0 0 4px; font-size: .875rem; color: var(--muted); overflow-wrap: anywhere; }
.personal-notifications .notebook-section-head { flex-wrap: wrap; }

/* Settings keeps immediate device choices separate from explicit-save preferences. */
.settings-group{min-width:0;margin:24px 0;padding:18px;border:1px solid var(--line);border-radius:12px;overflow-wrap:anywhere}
.settings-group legend{max-width:100%;padding:0 6px;font-weight:700;line-height:1.5}
.settings-group select,.settings-group input{max-width:100%;box-sizing:border-box}
#settingsSaveState,#appearanceSaveState{font-size:14px;line-height:1.6;color:var(--muted)}
@media(max-width:620px){.settings-group{padding:12px}.settings-group .form-grid{grid-template-columns:1fr}}

/* Notebook creation stays in the centre of the mobile toolbar. */
@media(max-width:900px){
  .bottom-nav{grid-template-columns:repeat(5,minmax(0,1fr))}
  .bottom-nav button.notebook-add:nth-child(3){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;width:56px;height:60px;min-height:60px;margin:-12px auto 0;border:2px solid var(--ink);border-radius:18px;background:var(--handbook-gradient);color:#fff;box-shadow:0 3px 10px #0757d830}
  .bottom-nav .notebook-add span{font-size:30px;line-height:30px}
  .bottom-nav .notebook-add small{font-size:12px;font-weight:800}
  .mobile-add-task{display:none}
}

.notebook-group-context{font-size:.85rem;margin-block:10px}
.notebook-group-context summary{cursor:pointer;color:var(--muted)}

@media(max-width:900px){
  :root[data-theme="dark"] .bottom-nav button.notebook-add:nth-child(3){background:var(--handbook-gradient);color:#fff;border-color:var(--paper);box-shadow:0 3px 10px #0757d830}
}

@media(max-width:360px){
  .bottom-nav a{padding-inline:2px;font-size:11px;overflow-wrap:normal;word-break:normal}
}

@media(max-width:900px){
  .view-head>[data-action="new-notebook"]{display:none}
}

/* Equal board boxes use the full grid width; icons leave more room for titles. */
.notebook-home-heading{margin-bottom:18px}.notebook-home-heading h1{font-size:1.8rem;letter-spacing:-.035em}.notebook-home-heading p{margin:6px 0 0;font-size:.9rem;color:var(--muted)}
.notebook-board-grid{display:flex;flex-direction:column;gap:1.5rem;align-items:stretch}
.notebook-board-group{box-sizing:border-box;position:relative;min-width:0;height:auto;padding:0;display:block;border:none;border-radius:1rem;background:var(--paper);box-shadow:0 4px 0 #e2e8f0,0 8px 0 #cbd5e1,0 16px 32px rgba(22,42,69,0.06);transition:box-shadow .16s}
.board-box-heading{display:flex;align-items:center;gap:8px;min-width:0}.board-box-heading h2{flex:1;min-width:0;margin:0;font-size:16px}
.notebook-board-group .hierarchy-label:has(.hierarchy-title){display:flex;align-items:center;gap:8px;min-width:0;max-width:100%;width:100%;white-space:nowrap}
.notebook-board-group .hierarchy-type{flex:none;margin:0!important;font-size:10px;display:none}
.notebook-board-group .hierarchy-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:-.015em}
.board-box-heading a{min-height:44px;border:0;background:var(--selected);padding:7px 9px;border-radius:10px}.board-notebook-count{display:grid;place-items:center;min-width:28px;height:28px;padding:0 6px;border:1px solid var(--line);border-radius:9px;color:var(--muted);font-size:12px;font-weight:650;font-variant-numeric:tabular-nums}
.board-notebook-rows{min-width:0;overflow:hidden}.board-notebook-rows>.muted{font-size:14px;color:var(--muted);padding:8px}
.notebook-row{box-sizing:border-box;display:flex;flex-direction:column;gap:0.25rem;min-width:0;height:auto;padding:1rem;color:var(--ink);text-decoration:none;border:none;border-radius:0.75rem;box-shadow:0 1px 3px rgba(22,42,69,0.05);transition:box-shadow .16s,transform .16s}
.notebook-row .hierarchy-label{flex:1;border:0;padding:0;font-size:15px;font-weight:600;background:transparent}.notebook-row .hierarchy-type{display:none}
.notebook-row-progress{display:grid;gap:4px;justify-items:end;flex:none;min-width:28px;color:var(--muted);font-size:11px;font-variant-numeric:tabular-nums}.notebook-progress-track{display:block;width:28px;height:3px;overflow:hidden;border:0;appearance:none;border-radius:3px;background:var(--line);color:var(--green-dark)}.notebook-progress-track::-webkit-progress-bar{background:var(--line);border-radius:3px}.notebook-progress-track::-webkit-progress-value{border-radius:3px;background:var(--green-dark)}.notebook-progress-track::-moz-progress-bar{border-radius:3px;background:var(--green-dark)}
.notebook-row-arrow{flex:none;color:var(--muted);font-size:20px;transition:transform .16s}.notebook-row:hover,.notebook-row:focus-visible{background:var(--surface)}.notebook-row:focus-visible,.board-box-more:focus-visible{outline:3px solid var(--green-dark);outline-offset:-3px;border-radius:6px}
.board-box-more{display:flex;align-items:center;gap:8px;min-width:0;min-height:44px;padding:0 4px;color:var(--green-dark);text-decoration:none;font-size:13px;font-weight:650}.board-box-more>span:last-child{margin-left:auto;font-size:22px;transition:transform .16s}.board-box-more.has-more{border-top:1px solid var(--line)}
.board-overflow-symbol{border-radius:8px;background:var(--selected);padding:3px 7px;font-size:12px}.board-box-more:hover{text-decoration:underline}
@media(hover:hover) and (prefers-reduced-motion:no-preference){:root:not(.quiet-mode) .notebook-board-group:hover{border-color:var(--green-dark);box-shadow:0 4px 12px #10221b0a}:root:not(.quiet-mode) :is(.notebook-row:hover .notebook-row-arrow,.board-box-more:hover>span:last-child){transform:translateX(3px)}}
@media(prefers-reduced-motion:no-preference){:root:not(.quiet-mode) .notebook-row:active{transform:scale(.99)}}
@media(prefers-reduced-motion:reduce){.notebook-board-group,.notebook-row,.notebook-row-arrow,.board-box-more>span:last-child{transition:none}}
@media(max-width:620px){.notebook-board-grid{grid-template-columns:minmax(0,1fr);gap:12px}.notebook-home-heading{gap:8px;margin-bottom:16px}.notebook-home-heading h1{font-size:1.65rem}}

/* A small set of labelled controls keeps the notebook journey easy to follow. */
.notebook-home-heading .notebook-add-hint{display:none}
.notebook-tools{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px;margin-bottom:16px}.notebook-tools:empty{display:none}
.notebook-search-label{display:grid;gap:6px;width:min(100%,420px);font-size:14px;font-weight:600}.notebook-search-label input{box-sizing:border-box;width:100%;min-width:0;min-height:48px;padding:10px 14px;border:1px solid var(--field-line);border-radius:12px;background:var(--paper);color:var(--ink);font-size:16px}
.notebook-finished-toggle{display:inline-flex;align-items:center;min-height:48px;color:var(--green-dark);font-size:14px;font-weight:600;text-underline-offset:3px}
.notebook-result-count{margin:0 0 12px;color:var(--muted);font-size:14px}
.notebook-empty{max-width:560px;margin:12px auto;padding:24px;border:1px solid var(--line);border-radius:16px;background:var(--paper)}.notebook-empty h2{margin:8px 0;font-size:22px;line-height:1.25}.notebook-empty p{color:var(--muted);font-size:16px;line-height:1.5}.notebook-empty-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:var(--selected);color:var(--green-dark);font-size:24px}.notebook-empty .notebook-empty-note{margin-bottom:0;font-size:14px}
.notebook-row .hierarchy-label{font-size:16px}.notebook-row-progress{font-size:13px;min-width:32px}
@media(max-width:760px){.notebook-home-heading .notebook-add-hint{display:block;font-size:14px}.notebook-tools{gap:4px}.notebook-search-label{width:100%}.notebook-empty{padding:18px}.notebook-empty .primary-button{width:100%}}

@media(min-width:1100px){.notebook-home-heading:has(.notebook-search-label){display:grid;grid-template-columns:minmax(0,1fr) minmax(200px,280px) auto;gap:16px;align-items:end}.notebook-home-heading .notebook-search-label{width:100%}.notebook-home-heading .primary-button{margin-bottom:0}.notebook-home-heading h1{margin:0}}

/* Handbook revision: notebook detail, journeys 4, 6, 7 and 8.
   Scoped to this screen so other journey checkpoints retain their verified styling. */
body.task-page {
 --cream:#f8fafc;--paper:#ffffff;--ink:#0f172a;--muted:#64748b;--line:#cbd5e1;
 --surface:#f1f5f9;--selected:#e2e8f0;--green:#7dd3fc;--green-dark:#0f172a;
 --field-line:#94a3b8;--notebook-mint:#e0f2fe;--notebook-lavender:#ede9fe;
 --notebook-gradient:#0f172a;
 background:var(--cream);color:var(--ink);
}
:root[data-theme=dark] body.task-page {
 --cream:#111c20;--paper:#1c2a2f;--ink:#eef2ed;--muted:#b4c4c6;--line:#42585e;
 --surface:#26383d;--selected:#304437;--green:#0284c7;--green-dark:#0284c7;
 --field-line:#708a91;--notebook-mint:#0f172a;--notebook-lavender:#302e50;
 --notebook-gradient:#0f172a;
}
body.task-page #detailDialog[open] {
 box-sizing:border-box;border:1px solid var(--line);border-radius:24px;
 background:var(--paper);color:var(--ink);box-shadow:0 8px 40px #17243d0b;
 padding:0;overflow:visible;
}
body.task-page #detailDialog>.task-close-bar {
 justify-content:flex-start;background:var(--paper);border-radius:24px 24px 0 0;
 padding:10px 24px;border-bottom:1px solid var(--line);
}
body.task-page .task-close-bar>.notebook-back-button {
 border:0;background:var(--surface);color:var(--green-dark);min-height:48px;
}
body.task-page #detailDialog>#taskDetail {
 padding:24px 28px 28px;background:var(--paper);color:var(--ink);border-radius:0 0 24px 24px;
}
:root[data-theme] body.task-page #detailDialog #taskDetail .detail-head {
 padding:16px 20px;background:linear-gradient(125deg,var(--notebook-lavender),var(--surface));
 border:1px solid var(--line);border-radius:16px;box-shadow:none;
}
body.task-page #taskDetail .detail-head>.kicker {
 color:var(--muted);font-size:11px;letter-spacing:.1em;min-height:48px;margin:0;padding-right:112px;
}
body.task-page #taskDetail .detail-menu {right:16px;top:16px;width:48px;min-width:48px}
body.task-page #taskDetail .detail-menu>summary {
 width:48px;min-width:48px;min-height:48px;height:48px;padding:0;font-size:24px;
 border:1px solid var(--line);border-radius:12px;background:var(--paper);color:var(--ink);
}
body.task-page #taskDetail .job-share-icon {right:72px;top:16px;width:48px;height:48px;border-radius:12px;background:var(--paper);color:var(--green-dark);border:1px solid var(--line)}
body.task-page #taskDetail #detailTitle {margin:8px 0 12px;font-size:clamp(22px,3.6vw,32px);line-height:1.25;letter-spacing:-.035em}
body.task-page #detailTitle:focus {outline:none}
body.task-page #taskDetail .detail-head h1 .hierarchy-label {border-color:var(--line);background:var(--paper);padding:8px 12px;border-radius:10px}
body.task-page #taskDetail .notebook-group-context {margin:0;font-size:13px;color:var(--muted);padding-right:112px;min-height:48px}
body.task-page #taskDetail .notebook-group-context>summary {font-size:13px;min-height:36px;display:flex;align-items:center;gap:8px;cursor:pointer}
body.task-page #taskDetail .notebook-group-context>summary::before {content:'›';font-size:20px}
body.task-page #taskDetail .notebook-group-context[open]>summary::before {content:'⌄'}
body.task-page #taskDetail .notebook-group-context .hierarchy-breadcrumb {margin:0 0 8px}
body.task-page #taskDetail .task-status {color:var(--green-dark)}
body.task-page #taskDetail .task-context-note {margin-bottom:10px;line-height:1.5}
body.task-page #taskDetail .detail-task-actions {gap:10px;margin:12px 0;position:static;box-shadow:none}
body.task-page #taskDetail :is(.primary-button,[data-action=complete-task]) {
 background:var(--green-dark,#0f172a);color:#fff;border:1px solid var(--green-dark,#0f172a);border-radius:14px;
 min-height:48px;padding:12px 20px;box-shadow:0 4px 12px rgba(15,23,42,0.18);text-decoration:none;font-weight:700;
}
body.task-page #taskDetail .help-button,
.checklist-claim-direct {
 background:#7dd3fc;color:#0f172a;border:1px solid #38bdf8;border-radius:12px;
 min-height:44px;padding:10px 16px;box-shadow:0 2px 6px rgba(125,211,252,0.3);text-decoration:none;font-weight:700;cursor:pointer;
 display:inline-flex;align-items:center;justify-content:center;gap:6px;
}
body.task-page #taskDetail .secondary-button {min-height:48px;border-radius:12px;background:var(--paper);color:var(--green-dark);border:1px solid var(--field-line)}
body.task-page #taskDetail .checklist-section {padding:20px 0 8px;margin:0;max-width:none}
body.task-page #taskDetail .checklist-heading h3 {font-size:16px;flex-wrap:wrap;white-space:normal;line-height:1.5}
body.task-page #taskDetail .checklist-heading .hierarchy-label {background:var(--surface);border:0;border-radius:8px;color:var(--ink);padding:6px 8px}
body.task-page #taskDetail .checklist-order-hint {color:var(--muted);line-height:1.5}
body.task-page #taskDetail .checklist-progress {height:6px;margin:12px 0;border-radius:8px}
body.task-page #taskDetail .checklist-progress::-webkit-progress-value {background:var(--green-dark,#0f172a);border-radius:8px}
body.task-page #taskDetail .checklist-progress::-moz-progress-bar {background:var(--green-dark,#0f172a);border-radius:8px}
body.task-page #taskDetail .checklist-save-status {padding:8px 10px;border-radius:8px;background:var(--surface);color:var(--muted);line-height:1.5}
body.task-page #taskDetail .checklist-save-status[data-state=saved] {background:var(--notebook-mint);color:var(--ink)}
body.task-page #taskDetail .checklist-save-status[data-state=error] {background:var(--surface);color:var(--ink);border:2px solid #bc3949}
body.task-page #taskDetail .task-checklist {margin:12px 0}
body.task-page #taskDetail .checklist-item {box-sizing:border-box;padding:12px 14px;border-bottom:1px solid var(--line);background:var(--paper);border-radius:12px;margin-bottom:6px;transition:background .15s ease,border-color .15s ease}
body.task-page #taskDetail .checklist-item:hover {background:#f8fafc}
body.task-page #taskDetail .checklist-item.is-complete {opacity:.75}
body.task-page #taskDetail .checklist-item.is-complete .checklist-label {text-decoration:line-through;color:var(--muted)}
body.task-page #taskDetail .checklist-label {font-size:16px;line-height:1.5;font-weight:600}
body.task-page #taskDetail .checklist-copy small {color:var(--muted);font-size:12px;line-height:1.5}
body.task-page #taskDetail .checklist-hint {font-size:13px;line-height:1.6;color:var(--muted)}
body.task-page #taskDetail .checklist-toggle {width:36px;min-width:36px;height:36px;min-height:36px!important;border-radius:50%!important;border:2px solid var(--line);background:var(--paper);color:transparent;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:18px;cursor:pointer;transition:all .15s ease}
body.task-page #taskDetail .checklist-toggle[aria-checked=true] {background:#7dd3fc;color:#0f172a;border-color:#0f172a}
body.task-page #taskDetail .checklist-menu>summary {min-height:48px;min-width:44px;color:var(--ink)}
body.task-page #taskDetail .checklist-assignment>summary {border-radius:12px;background:var(--surface);border:1px solid var(--line)}
body.task-page #detailDialog .checklist-menu-panel {background:var(--paper);border-color:var(--line);box-shadow:0 12px 36px #17243d26}
body.task-page #taskDetail .checklist-add textarea {border-radius:12px;border-color:var(--field-line);background:var(--paper);color:var(--ink);font-size:16px}
body.task-page #taskDetail .notebook-finish-panel {padding:20px;border:1px solid var(--line);border-radius:16px;background:var(--notebook-mint);margin:8px 0 20px}
body.task-page #taskDetail .notebook-finish-panel h2 {font-size:19px;line-height:1.35;margin:0 0 8px;letter-spacing:-.02em}
body.task-page #taskDetail .notebook-finish-panel p {font-size:14px;line-height:1.6;color:var(--muted);margin:0}
body.task-page #taskDetail .notebook-finish-panel .detail-task-actions {margin:16px 0 0}
body.task-page #taskDetail .task-conversation {border:1px solid var(--line);border-radius:16px;background:var(--surface);padding:0 16px;margin-top:12px}
body.task-page #taskDetail .task-conversation>summary {min-height:52px}
body.task-page #taskDetail .task-notes-content {padding-bottom:16px}
body.task-page #taskDetail .comment {background:var(--paper);border-color:var(--line);border-radius:12px}
body.task-page #taskDetail :is(button,a,textarea,select,summary):focus-visible {outline:3px solid var(--green-dark);outline-offset:3px}
@media(min-width:761px) {
 body.task-page .app-shell .topbar {background:#0f172a;border-color:#1e293b;color:#f1f5ff}
 body.task-page .topbar :is(.logo,.workspace-message,.sidebar-label,.desktop-nav a,.desktop-nav button) {color:#c5d3eb}
 body.task-page .topbar .logo {color:#fff}
 body.task-page .desktop-nav :is(a,button):hover {background:#1e293b;color:#fff}
 body.task-page .desktop-nav :is(a.active,a[aria-current=page]) {background:var(--green-dark,#0f172a);color:#fff}
 body.task-page .sidebar-group {border-color:#1e293b}
 body.task-page #detailDialog[open] {max-width:1000px;margin-top:28px;margin-bottom:48px}
}
@media(max-width:760px) {
 body.task-page #detailDialog[open] {width:calc(100% - 24px);height:auto;max-height:none;margin:12px 12px 108px;border-radius:20px}
 body.task-page #detailDialog>.task-close-bar {padding:4px 12px;border-radius:20px 20px 0 0}
 body.task-page #detailDialog>#taskDetail {padding:12px;border-radius:0 0 20px 20px}
 :root[data-theme] body.task-page #detailDialog #taskDetail .detail-head {padding:10px 12px}
 body.task-page #taskDetail .detail-menu {right:10px;top:10px}
 body.task-page #taskDetail .job-share-icon {right:66px;top:10px}
 body.task-page #taskDetail #detailTitle {margin:6px 0 10px;font-size:22px}
 body.task-page #taskDetail .detail-head h1 .hierarchy-label {padding:6px 8px}
 body.task-page #taskDetail .checklist-section {padding-top:8px}
 body.task-page #taskDetail .checklist-progress {margin:6px 0}
 body.task-page #taskDetail .task-checklist {margin:8px 0}
 body.task-page #taskDetail .checklist-save-status {padding:6px 8px}
 body.task-page #taskDetail .notebook-finish-panel {padding:16px}
 body.task-page #taskDetail .notebook-finish-panel .detail-task-actions {flex-direction:column;align-items:stretch}
 body.task-page #taskDetail .notebook-finish-panel .detail-task-actions>button {flex:none;width:100%}
}
@media(prefers-reduced-motion:no-preference) {
 @keyframes notebook-enter {from {opacity:0;transform:translateY(8px)} to {opacity:1;transform:translateY(0)}}
 @keyframes notebook-saved {from {box-shadow:0 0 0 3px rgba(15,23,42,0.3)} to {box-shadow:0 0 0 0 rgba(15,23,42,0)}}
 :root:not(.quiet-mode) body.task-page #detailDialog[open] {animation:notebook-enter .26s ease-out}
 :root:not(.quiet-mode) body.task-page #detailDialog .checklist-menu[open]>.checklist-menu-panel {animation:notebook-enter .16s ease-out}
 :root:not(.quiet-mode) body.task-page #taskDetail .checklist-save-status[data-state=saved] {animation:notebook-saved .4s ease-out}
 :root:not(.quiet-mode) body.task-page #taskDetail :is(button,a,summary) {transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease}
}
@media(hover:hover) and (prefers-reduced-motion:no-preference) {
 :root:not(.quiet-mode) body.task-page #taskDetail :is(.primary-button,[data-action=complete-task]):hover {box-shadow:0 5px 14px rgba(15,23,42,0.25)}
 :root:not(.quiet-mode) body.task-page #taskDetail .help-button:hover,
 :root:not(.quiet-mode) .checklist-claim-direct:hover {box-shadow:0 4px 12px rgba(125,211,252,0.5)}
}
@media(prefers-reduced-motion:reduce) {
 body.task-page #detailDialog,body.task-page #taskDetail *,body.task-page #taskDetail *::before,body.task-page #taskDetail *::after {animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
@media print {
 body.task-page #detailDialog[open] {box-shadow:none;border:0;margin:0;width:100%;max-width:none}
 body.task-page #detailDialog>.task-close-bar {display:none}
}

/* Stitch Redesign: Tactile Ruled Notebook & Sprout Widget Web Extensions */
.notebook-paper {
  position: relative;
  background: var(--paper);
  border-radius: 16px;
  box-shadow: 0 4px 0 #e2e8f0, 0 8px 0 #cbd5e1, 0 20px 40px rgba(22, 42, 69, 0.06);
  padding: 32px 36px 48px 56px;
  border: 1px solid var(--line);
}
.notebook-paper::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 48px;
  width: 1px;
  background: rgba(232, 173, 166, 0.65);
  pointer-events: none;
  z-index: 2;
}
.notebook-paper::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 54px;
  width: 1px;
  background: rgba(232, 173, 166, 0.3);
  pointer-events: none;
  z-index: 2;
}

/* Tactile Pinned Sticky Note */
.pinned-note, .sticky-memo {
  position: relative;
  background: var(--sticker-yellow-bg, #fff3be);
  color: var(--ink);
  padding: 20px 22px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(22, 42, 69, 0.08);
  transform: rotate(-1deg);
  transition: transform 0.2s ease;
  margin: 16px 0 24px;
}
.pinned-note:hover, .sticky-memo:hover {
  transform: rotate(0deg);
}
.pinned-note::before, .sticky-memo::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 32px;
  width: 48px;
  height: 20px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(2px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transform: rotate(2deg);
  border-radius: 2px;
}
:root[data-theme="dark"] .pinned-note, :root[data-theme="dark"] .sticky-memo {
  background: var(--sticker-paper, #39352b);
  color: var(--ink);
}

/* Stitch Sprout Garden Widget */
.sprout-garden-widget {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--green-dark);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(22, 42, 69, 0.04);
}
.sprout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.sprout-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sprout-icon {
  width: 32px;
  height: 32px;
  border-radius: 16px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.sprout-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0;
}
.sprout-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}
.sprout-badge {
  background: var(--surface);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--green-dark);
}
.sprout-track {
  height: 8px;
  width: 100%;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}
.sprout-bar {
  height: 100%;
  background: var(--green-dark);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.sprout-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

/* Left sticker accent on task cards */
.task-card {
  border-left-width: 5px !important;
  border-left-style: solid !important;
  border-left-color: var(--sticker-ink, var(--green-dark)) !important;
  border-radius: 16px;
}
