/* Follow DESIGN_GUIDE.md. These rules affect the new shell and preserve legacy cards. */
.desk-shell [hidden]{display:none!important}
.desk-shell{--desk-radius:12px;--desk-gap:24px}
.desk-shell .wrap{max-width:1400px;padding:28px 32px 40px 210px}
.desk-shell header{padding-bottom:16px;margin-bottom:16px}
.desk-shell .greet{font-size:34px;line-height:1.15}
.desk-shell .kicker{margin-bottom:8px}
.desk-shell .cardgrip{display:none}
.desk-shell .grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;align-items:start}
.desk-shell .gcol{display:contents}
.desk-shell .grid .card{min-width:0;margin:0}
.desk-nav{position:fixed;top:30px;left:max(20px,calc((100vw - 1400px)/2 + 20px));width:158px;display:flex;flex-direction:column;gap:8px;z-index:40}
.desk-nav a{display:flex;gap:12px;align-items:center;min-height:52px;padding:8px 16px;border-radius:8px;text-decoration:none;color:var(--ink-soft);font:16px var(--body)}
.desk-nav a span{font-size:23px;width:24px;text-align:center}
.desk-nav a[aria-current]{background:var(--paper-2);color:var(--ember);font-weight:650}
.desk-shell a:focus-visible,.desk-shell button:focus-visible,.desk-shell input:focus-visible,.desk-shell summary:focus-visible{outline:3px solid var(--ember);outline-offset:3px}
.desk-shell button,.desk-shell select,.desk-shell input:not([type=checkbox]),.desk-shell summary{min-height:44px}
.desk-shell button:disabled{opacity:.6;cursor:not-allowed}
.desk-today{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:var(--desk-gap)}
.desk-panel{background:var(--card);border:1px solid var(--line);border-radius:var(--desk-radius);padding:24px;min-width:0;color:var(--ink);font:16px/1.5 var(--body)}
.desk-panel h2,.desk-weight-dialog h2,.desk-destination-head h2{font:600 25px/1.2 var(--display);margin:0}
.desk-panel>h2{margin-bottom:12px}
.desk-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.desk-section-head a,.desk-link,.desk-section-links a{color:var(--ember);font:14px var(--body);display:inline-flex;align-items:center;min-height:44px;flex-shrink:0}
.desk-row{display:block;width:100%;text-align:left;white-space:normal;overflow-wrap:anywhere;background:none;border:0;border-bottom:1px solid var(--line);padding:12px 0;color:var(--ink);font:16px/1.45 var(--body);cursor:pointer}
.desk-row:last-child{border-bottom:0}
.desk-row>span{display:block;margin-top:4px}
.desk-priority-row{display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line)}
.desk-priority-row .desk-row{border:0;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.desk-priority-row input{appearance:none;width:44px;height:44px;flex:0 0 44px;border:1px solid var(--line);border-radius:50%;background:var(--paper);cursor:pointer}
.desk-secondary{font:14px/1.45 var(--body);color:var(--ink-soft);margin:4px 0 12px}
.desk-check-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.desk-check{border:1px solid var(--line);border-radius:8px;background:transparent;padding:12px;text-align:left;color:var(--ink);font:600 16px/1.4 var(--body);min-height:76px;cursor:pointer}
.desk-check:hover,.desk-row:hover{background:var(--paper-2)}
.desk-check span{display:block;font:14px/1.4 var(--body);color:var(--ink-soft);margin-top:4px}
.desk-brief{grid-column:1/-1;padding:16px 24px}
.desk-clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:0}
.desk-destination-head{margin:8px 0 24px}.desk-section-links{display:flex;gap:8px 20px;flex-wrap:wrap;margin-top:10px}
.desk-shell [data-card]{scroll-margin-top:24px}.desk-shell .projectitem>summary{cursor:pointer;font:600 16px/1.5 var(--body);padding:12px 0;overflow-wrap:anywhere}.desk-shell .projectitem>summary span{display:block;font:14px/1.4 var(--body);color:var(--ink-soft)}
.desk-weight-dialog{width:min(460px,calc(100% - 24px));box-sizing:border-box;max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain;border:1px solid var(--line);border-radius:16px;background:var(--card);color:var(--ink);padding:24px;font:16px/1.5 var(--body)}
.desk-weight-dialog::backdrop{background:rgba(20,16,12,.48)}
.desk-weight-dialog input{display:block;width:100%;box-sizing:border-box;border:1px solid var(--ink-soft);border-radius:8px;background:var(--paper);color:var(--ink);padding:12px;font:22px var(--body);margin:8px 0}
.desk-weight-dialog button{min-height:48px;border:1px solid var(--line);border-radius:8px;padding:10px 16px;background:var(--paper);color:var(--ink);font:16px var(--body);cursor:pointer}
.desk-weight-dialog .desk-primary{background:var(--ember);color:var(--card);width:100%;border-color:var(--ember)}
#deskWeightDone{width:100%;margin-top:10px}#deskWeightFeedback{min-height:44px;font-size:14px}.desk-error{color:var(--bad)}
@media(max-width:1000px){.desk-shell .wrap{padding-left:180px;padding-right:20px}.desk-nav{left:12px;width:148px}.desk-today{gap:16px}.desk-panel{padding:18px}.desk-panel h2{font-size:22px}.desk-section-head{flex-wrap:wrap}}
@media(max-width:700px){.desk-shell .wrap{padding:20px 16px calc(100px + env(safe-area-inset-bottom))}.desk-shell .greet{font-size:30px}.desk-shell header{margin-bottom:12px}.desk-shell .daterow{gap:5px}.desk-nav{top:auto;left:0;right:0;bottom:0;width:auto;flex-direction:row;justify-content:space-around;gap:0;padding:5px 4px calc(5px + env(safe-area-inset-bottom));background:var(--card);border-top:1px solid var(--line)}.desk-nav a{flex:1;flex-direction:column;gap:2px;min-height:52px;padding:5px;font-size:12px}.desk-today,.desk-shell .grid{grid-template-columns:1fr;gap:16px}.desk-checkins{grid-row:2}.desk-panel{padding:16px}.desk-panel h2{font-size:23px}.desk-brief{grid-column:auto}.desk-weight-dialog{padding:20px 20px max(20px,env(safe-area-inset-bottom));margin:auto auto 12px;max-height:calc(100dvh - 24px)}.desk-shell .helpbtn{min-height:44px}.desk-section-links{gap:4px 16px}}

.desk-row-title{display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.45;max-height:2.9em}
.desk-priority-row .desk-row{display:block;overflow:visible}

.desk-shell header{position:relative;padding-right:64px}
.desk-utilities{position:absolute;right:0;top:0;z-index:45;font:14px var(--body)}
.desk-utilities summary{list-style:none;display:flex;align-items:center;justify-content:center;min-width:52px;border:1px solid var(--line);border-radius:8px;cursor:pointer;background:var(--card)}
.desk-utilities[open]{background:var(--card);border:1px solid var(--line);border-radius:8px;padding:6px;box-shadow:0 8px 24px #0002}
.desk-utilities .helpbtn{display:block;margin-top:6px;width:100%;color:var(--ink-soft)}
.desk-shell .daynav{width:44px;height:44px;font-size:22px}
.desk-shell .daterow{flex-wrap:wrap}
.desk-panel{padding:20px}.desk-row{padding:10px 0}.desk-today{gap:20px}
@media(max-width:700px){.desk-shell header{padding-right:0;padding-top:0}.desk-shell .kicker{padding-right:58px;font-size:9px;letter-spacing:.14em}.desk-shell .greet{margin-top:6px}.desk-shell .date{font-size:11px}.desk-shell .syncstatus{font-size:10px;letter-spacing:.02em}.desk-panel{padding:16px}.desk-today{gap:16px}.desk-row{font-size:16px}.desk-section-head{margin-bottom:4px}.desk-check{min-height:70px}}

.desk-weight-dialog{position:fixed;inset:auto;left:50%;transform:translateX(-50%);margin:0!important}

/* Stronger action ink keeps small links readable on warm surfaces. */
.desk-shell{--desk-action:#A64123;--desk-on-action:#FFFFFF}
.theme-dark .desk-shell{--desk-action:#EDA77F;--desk-on-action:#211C15}
.desk-section-head a,.desk-link,.desk-section-links a,.desk-nav a[aria-current]{color:var(--desk-action)}
.desk-weight-dialog .desk-primary{background:var(--desk-action);border-color:var(--desk-action);color:var(--desk-on-action)}
.desk-shell .syncstatus.saving{color:var(--ink-soft)}

/* Approved full redesign: independent stacks keep adjacent cards close. */
.desk-shell{--desk-gap:16px}
.desk-shell .wrap{max-width:1580px;padding:34px 32px 60px 260px}
.desk-shell .greet{font:600 46px/1.1 var(--display)}
.desk-nav{top:0;bottom:0;left:max(0px,calc((100vw - 1580px)/2));width:220px;border-right:1px solid var(--line);padding:30px 14px;background:var(--paper);box-sizing:border-box}
.desk-brand{display:flex;flex-direction:column;gap:8px;align-items:center;margin:0 0 36px;color:var(--ink);font:18px var(--display)}
.desk-brand>span{font-size:38px;line-height:1;color:var(--desk-action)}
.desk-nav a[aria-current]{background:var(--desk-action);color:var(--desk-on-action)}
.desk-stack,.desk-shell .gcol{display:flex;flex-direction:column;gap:16px;min-width:0}
.desk-shell .grid,.desk-today{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:start}
.desk-shell .grid .card{padding:22px;border:1px solid var(--line);border-radius:12px;background:var(--card);box-shadow:none;animation:none;opacity:1;transform:none}
.desk-shell .grid .card h2{font:600 25px/1.25 var(--display);letter-spacing:0;text-transform:none;margin:0 0 14px}
.desk-shell .grid .card .sub,.desk-shell .grid .card .hint{font:14px/1.45 var(--body);letter-spacing:0;text-transform:none;color:var(--ink-soft)}
.desk-shell .grid .card[data-card=tasks]>.sub,.desk-shell .grid .card[data-card=tasks]>.hint,.desk-shell .grid .card[data-card=projects]>.sub{display:none}
.desk-panel{padding:22px}.desk-brief{padding:22px}.desk-panel h2{font-size:27px}
.desk-priority-row .desk-row-title{-webkit-line-clamp:1;max-height:1.45em}
.desk-priority-row .desk-secondary:empty{display:none}
.desk-priority-row{min-height:66px}.desk-priority-row input{border-radius:5px;width:26px;height:26px;flex-basis:26px;margin:9px;box-shadow:0 0 0 9px transparent}
.desk-priorities>.desk-link{margin-top:8px}
.desk-check-grid{gap:12px}.desk-check{display:flex;align-items:center;gap:18px;min-height:108px;font-weight:400;padding:18px}
.desk-check .desk-check-icon{margin:0;display:grid;place-items:center;width:58px;height:58px;flex:0 0 58px;border-radius:50%;background:color-mix(in srgb,var(--sage) 15%,var(--card));color:var(--sage)}
.desk-check-icon svg{width:30px;height:32px}
.desk-attention{padding:12px 22px}.desk-attention>summary{display:flex;align-items:center;gap:12px;cursor:pointer;list-style:none;font-size:16px}
.desk-attention>summary:before{content:'!';background:var(--desk-action);color:var(--desk-on-action);border-radius:50%;width:28px;height:28px;display:grid;place-items:center}
.desk-attention>summary:after,.desk-disclosure>summary:after{content:'›';margin-left:auto;font-size:25px}
.desk-attention[open]>summary:after,.desk-disclosure[open]>summary:after{transform:rotate(90deg)}
#deskAttentionCount{color:var(--ink-soft);font-size:14px}
.desk-destination-head{margin:8px 0 18px}.desk-destination-head>h2{font-size:38px}
.desk-section-links{display:flex;gap:0;margin:16px 0 0;border:1px solid var(--line);border-radius:10px;width:fit-content;max-width:100%;overflow-x:auto;flex-wrap:nowrap;background:var(--card)}
.desk-section-links a{text-decoration:none;padding:8px 18px;color:var(--ink-soft);white-space:nowrap}
.desk-section-links a:hover{background:var(--paper-2)}
.desk-shell .grid .card:has(>.desk-disclosure){padding:0}
.desk-disclosure>summary{list-style:none;display:flex;align-items:center;gap:12px;padding:14px 22px;cursor:pointer;font:600 24px/1.3 var(--display)}
.desk-disclosure-meta{font:14px/1.4 var(--body);color:var(--ink-soft)}
.desk-disclosure-body{padding:0 22px 22px}.desk-disclosure-body>h2{display:none}
.desk-later{border-top:1px solid var(--line);margin-top:12px}.desk-later>summary,.desk-add-task>summary{padding:10px 0;font:15px var(--body);cursor:pointer}
.desk-add-task{margin-top:10px;color:var(--desk-action)}
.desk-shell .task{padding:12px 0;gap:9px;min-height:54px}.desk-shell .task .txt{font:16px/1.4 var(--body);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.desk-shell .task .dot{flex-shrink:0}.desk-shell .task .del{font-size:20px}.desk-shell .task .move{font-size:12px;padding:4px}
.desk-shell .task input[type=checkbox]{width:24px;height:24px;flex-shrink:0;margin:10px 4px 10px 0}
.desk-shell .projectitem{border-bottom:1px solid var(--line);padding:0}.desk-shell .projectitem>summary{padding:16px 20px 16px 0;list-style:none;position:relative;font-weight:500}
.desk-shell .projectitem>summary:after{content:'›';position:absolute;right:0;top:20px}.desk-shell .projectitem[open]>summary:after{transform:rotate(90deg)}
.desk-shell .projectitem>summary span{margin-top:4px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.desk-shell #addProject{float:right;margin-top:-54px}.desk-shell #projectArchive{margin-top:12px}
.desk-shell .desk-journal-goals{grid-column:1/-1;min-width:0}.desk-journal-goals>h2{font:600 28px var(--display);margin:16px 0}.desk-shell .goals{margin:0;gap:16px}
.desk-shell[data-destination=journal] .grid>.gcol:empty{display:none}
.desk-shell[data-destination=journal] .grid>.gcol:has([data-card=pages]){grid-column:1/-1}
.desk-shell[data-destination=journal] .pages textarea{min-height:280px}
.desk-shell .deskline{font:15px/1.5 var(--body);overflow-wrap:anywhere}
@media(max-width:1100px){.desk-shell .wrap{padding-left:210px;padding-right:22px}.desk-nav{width:185px}.desk-check{padding:12px;gap:10px}.desk-check .desk-check-icon{width:42px;height:42px;flex-basis:42px}.desk-panel{padding:18px}.desk-panel h2{font-size:24px}}
@media(max-width:700px){
 .desk-shell .wrap{padding:22px 16px calc(96px + env(safe-area-inset-bottom))}.desk-shell .greet{font-size:34px}.desk-shell .date{font-size:14px}.desk-shell .syncstatus{font-size:12px}
 .desk-nav{top:auto;bottom:0;left:0;right:0;width:100%;height:auto;border-right:0;padding:5px 4px calc(5px + env(safe-area-inset-bottom));background:var(--card)}.desk-brand{display:none}.desk-nav a[aria-current]{background:transparent;color:var(--desk-action)}
 .desk-today{display:flex;flex-direction:column;gap:14px}.desk-today>.desk-stack{display:contents}.desk-priorities{order:0}.desk-checkins{order:1}.desk-today .desk-stack:first-child>.desk-panel:not(.desk-priorities){order:2}.desk-attention{order:3!important}.desk-brief{order:4}
 .desk-today .desk-panel{width:100%;box-sizing:border-box;padding:16px}.desk-panel h2{font-size:23px}.desk-section-head{gap:6px}.desk-section-head a{font-size:13px}
 .desk-checkins{border:0;background:transparent;padding:2px 0!important}.desk-check-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.desk-check{flex-direction:column;justify-content:center;gap:7px;padding:10px 5px;min-height:95px;font-size:14px;background:var(--card)}
 .desk-check .desk-check-icon{background:none;width:30px;height:30px;flex-basis:30px}.desk-check-icon svg{width:28px;height:30px}
 .desk-priority-row{min-height:62px}.desk-priority-row .desk-row-title{-webkit-line-clamp:2;max-height:2.9em}.desk-priority-row .desk-secondary{font-size:13px;margin:2px 0}
 .desk-shell .grid{grid-template-columns:1fr;gap:14px}.desk-shell .gcol{gap:14px}.desk-shell .grid .card{padding:17px}.desk-shell .grid .card:has(>.desk-disclosure){padding:0}.desk-disclosure>summary{font-size:22px;padding:14px 17px;flex-wrap:wrap}.desk-disclosure-body{padding:0 17px 17px}
 .desk-section-links{width:100%;box-sizing:border-box}.desk-section-links a{padding:6px 14px}.desk-destination-head>h2{font-size:32px}.desk-shell .goals{grid-template-columns:1fr}
 .desk-shell .task .move{max-width:48px}.desk-shell .task .txt{font-size:15px}.desk-shell .grid .card h2{font-size:24px}.desk-shell #addProject{margin-top:-50px;font-size:13px}
}
.desk-shell .daterow{height:auto;overflow:visible;min-height:28px;align-items:center}
.desk-shell #syncStatus{display:inline-block!important;visibility:visible!important;opacity:1;position:static;font:12px/1.5 var(--body);white-space:normal}
.desk-shell .checkin-dialog header{padding:0;margin:0 0 14px;border:0;position:static}
.desk-shell .checkin-dialog .desk-primary{background:var(--desk-action);color:var(--desk-on-action)}
@media(max-width:700px){
 .desk-shell .wrap{padding-top:14px}.desk-shell header{padding-bottom:8px;margin-bottom:8px}.desk-shell .greet{font-size:32px}.desk-shell .kicker{margin-bottom:4px}
 .desk-priorities{padding:12px 14px!important}.desk-priorities .desk-section-head{margin-bottom:0;flex-wrap:nowrap}.desk-priorities h2{font-size:21px}
 .desk-priority-row{min-height:52px}.desk-priority-row .desk-row{padding:8px 0}.desk-priority-row .desk-row-title{-webkit-line-clamp:1;max-height:1.45em}.desk-priority-row .desk-secondary{line-height:1.25;margin:2px 0 0}
 .desk-priorities>.desk-link{display:none}.desk-checkins #deskCheckDate{display:none}.desk-checkins>h2{margin:0 0 10px}.desk-check{min-height:89px}.desk-today{gap:12px}
}
.desk-history{margin-top:16px;border-top:1px solid var(--line);font:14px/1.5 var(--body)}.desk-history summary{cursor:pointer;padding:10px 0;color:var(--desk-action)}.desk-history select{max-width:100%;border:1px solid var(--line);border-radius:8px;background:var(--card);color:var(--ink);font:14px var(--body);padding:8px}.desk-history button{margin:8px;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink);padding:8px 12px}
.desk-shell:not([data-destination=today]) .wrap>header .greet,.desk-shell:not([data-destination=today]) .wrap>header .kicker{display:none}
.desk-shell:not([data-destination=today]) .wrap>header{padding-top:0;padding-bottom:8px;margin-bottom:4px;min-height:44px}
.desk-shell .projectitem>summary{padding-top:10px;padding-bottom:10px}
.desk-shell .projectitem>summary .desk-project-name{font:500 16px/1.45 var(--body);color:var(--ink);margin:0;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.desk-shell .projectitem>summary .desk-project-meta{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:3px;font-size:13px;line-height:1.45}
.desk-shell .projectitem>summary:after{top:15px}
.desk-priority-row input{width:44px;height:44px;flex-basis:44px;margin:0;border:0;background:linear-gradient(var(--line),var(--line)) center/24px 24px no-repeat}
.desk-priority-row input:before{content:'';display:block;width:20px;height:20px;margin:12px;background:var(--card)}
.desk-shell .task input[type=checkbox]{width:44px;height:44px;margin:0;flex:0 0 44px;accent-color:var(--sage)}
.theme-dark .checkin-dialog button[aria-pressed=true]{color:#211C15}
.desk-shell .projectitem>summary{display:grid;grid-template-columns:minmax(0,1fr) max-content;grid-template-areas:'name status' 'action date';column-gap:10px;align-items:center}
.desk-shell .projectitem>summary .desk-project-name{grid-area:name}.desk-shell .projectitem>summary .desk-project-meta{grid-area:action}
.desk-shell .projectitem>summary .desk-project-status,.desk-shell .projectitem>summary .desk-project-date{display:block;white-space:nowrap;margin:0;font:13px/1.45 var(--body);color:var(--ink-soft)}
.desk-shell .projectitem>summary .desk-project-status{grid-area:status;text-align:right}.desk-shell .projectitem>summary .desk-project-date{grid-area:date;text-align:right;margin-top:3px}
