/* ---------- Dashboard tab (web/dashboard.js) ----------
   The stable, metrics side of the Home feed, in the feed's own parts and rhythm: few, big, calm cards. A summary hero
   (headline, average progress, four small figures, a bar per project), then one full-width hero per project in its
   theme (big number, trend chip, its chart), one "This month" card, and quiet Paused / Done rows. Only layout lives
   here; the look comes from app.css and viz.css. A project's page is the feed's detail page (#detail styles). */
.dash{overflow-y:auto;overflow-x:hidden;color:#fff;padding:calc(var(--top) + 10px) 14px calc(var(--above-nav) + 32px);display:flex;flex-direction:column;gap:24px;scrollbar-width:none;overscroll-behavior:contain}
.dash::-webkit-scrollbar{display:none}
.dash .card{flex:none;touch-action:auto;user-select:auto;-webkit-user-select:auto}
.db-head{padding:2px 6px 0;margin-bottom:-8px}
.db-sh{margin:16px 0 -10px}
.db-delta{display:inline-flex;align-items:center;gap:4px;padding:3px 9px;border-radius:99px;font-size:12px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap;background:color-mix(in srgb,var(--ink,#1f1a24) 14%,transparent);color:var(--ink,#1f1a24)}

/* the summary hero */
.db-hero{height:auto}
.db-hero .card-body{padding:24px 24px 20px}
.db-hl{margin-top:20px;font-size:30px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.db-focus{display:flex;align-items:center;gap:8px;margin:12px 0 0;font-size:14.5px;line-height:1.35;color:var(--ink-soft)}
.db-focus svg{flex:none;width:16px;height:16px;color:var(--glow)}
.db-focus span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.db-hero .h-num{margin-top:24px}
.db-figs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-top:22px;padding-top:16px;border-top:1px solid color-mix(in srgb,var(--ink) 16%,transparent)}
.db-fig{display:flex;flex-direction:column;gap:3px;min-width:0}
.db-fig+.db-fig{padding-left:14px;border-left:1px solid color-mix(in srgb,var(--ink) 12%,transparent)}
.db-fig b{font-weight:300;font-size:28px;line-height:1;letter-spacing:-.04em;font-variant-numeric:tabular-nums}
.db-fig small{font-size:11.5px;color:var(--ink-soft);white-space:nowrap}
.db-fig.ok b{color:#9ff0c0}.db-fig.warn b{color:#ffd27a}
.db-hero .h-viz{flex:none;height:170px;margin:22px -4px 0}
.db-hero .viz-bars .viz-xl{font-size:15px;fill-opacity:1}

/* a project: one full-width hero */
.dash .pj{height:auto;max-height:66cqh;cursor:pointer;transition:transform .25s var(--spring)}
.dash .pj:active{transform:scale(.98)}
.dash .pj .card-body{padding:24px 24px 20px;display:flex;flex-direction:column}
.pj-who{display:flex;align-items:center;gap:12px;min-width:0}
.pj-ico{flex:none;width:38px;height:38px;border-radius:12px;display:grid;place-items:center;font-size:20px;line-height:1;background:color-mix(in srgb,var(--ink) 14%,transparent)}
.pj-t{font-family:var(--f-display);font-weight:400;font-size:23px;line-height:1.12;letter-spacing:-.015em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.dash .pj .h-top{align-items:flex-start}
.dash .pj .pj-h{margin-top:6px}
.pj-h{flex:none;display:inline-flex;align-items:center;gap:6px;padding:5px 11px 5px 9px;border-radius:99px;font-size:12.5px;font-weight:600;white-space:nowrap;background:color-mix(in srgb,var(--ink) 14%,transparent);color:var(--ink)}
.pj-h::before{content:"";width:7px;height:7px;border-radius:50%;background:#fff}
.pj-h.on_track::before{background:#7fe0a3}.pj-h.at_risk::before{background:#ffd27a}.pj-h.off_track::before{background:#ff8b7e}
.pj-h.st::before{display:none}
.dash .pj .h-num{margin-top:22px}
.dash .pj .h-num .sub{max-width:none;line-height:1.6}
.pj-chart{flex:none!important;height:150px;margin:16px -4px 0!important}
.pj-cap{margin:16px 0 0;font-size:12.5px;color:var(--ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pj.is-done,.pj.is-paused{opacity:.8}
.pj.fresh .card-body{animation:pjFresh 1.6s var(--ease)}
@keyframes pjFresh{0%{box-shadow:0 0 0 3px var(--glow),inset 0 0 0 1px rgba(255,255,255,.08)}}

/* this month: activity + the next dates */
.db-month .card-body{padding:24px 24px 18px}
.db-month .kind{margin-bottom:16px}
.db-act{height:72px;margin:0 -2px}
.db-act .viz{color:#8c6fd6}
.db-act .viz-bar{fill-opacity:.4}
.db-act .viz-bar:last-of-type{fill:#d94f9c;fill-opacity:1}
.db-act .viz-base{stroke:#2b2233}
.db-ax{display:flex;justify-content:space-between;margin-top:8px;font-size:11px;color:#8a8190;letter-spacing:.02em}
.db-up{display:flex;flex-direction:column;margin-top:16px;border-top:1px solid rgba(31,26,36,.07)}
.db-ur{display:flex;align-items:center;gap:14px;width:100%;padding:12px 0;text-align:left;transition:transform .25s var(--spring)}
.db-ur+.db-ur{border-top:1px solid rgba(31,26,36,.07)}
.db-ur:active{transform:scale(.98)}
.db-date{flex:none;width:44px;height:46px;border-radius:14px;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1;color:var(--ink);background:radial-gradient(90% 70% at 80% 10%,color-mix(in srgb,var(--glow) 40%,transparent),transparent 65%),linear-gradient(150deg,var(--c1),var(--c2))}
.db-date small{font-size:9px;letter-spacing:.1em;text-transform:uppercase;font-weight:650;opacity:.85}
.db-date b{font-size:17px;font-weight:600;margin-top:3px;font-variant-numeric:tabular-nums}
.db-ut{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.db-ut b{font-size:15.5px;font-weight:550;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.db-ut small{font-size:12.5px;color:#7a7282;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.db-rel{flex:none;font-size:13px;font-weight:600;color:#3a3340;font-variant-numeric:tabular-nums}

/* Paused / Done: quiet rows */
.db-fold+.db-fold{margin-top:-12px}
.db-fh{display:flex;align-items:center;gap:10px;width:100%;padding:4px 6px;font-size:12px;letter-spacing:.1em;text-transform:uppercase;font-weight:550;opacity:.9}
.db-fh b{font-weight:600;letter-spacing:0;opacity:.75}
.db-fh svg{width:15px;height:15px;margin-left:-4px;transition:transform .35s var(--ease)}
.db-fold.open .db-fh svg{transform:rotate(90deg)}
.db-fb{display:grid;grid-template-rows:0fr;transition:grid-template-rows .45s var(--ease)}
.db-fold.open .db-fb{grid-template-rows:1fr}
.db-fb>div{overflow:hidden;min-height:0}
.db-list{display:flex;flex-direction:column;gap:24px;padding-top:14px}

/* nothing yet */
.db-empty .card-body{min-height:46cqh}
.db-start{align-self:flex-start;display:inline-flex;align-items:center;gap:9px;margin-top:8px;padding:12px 18px;border-radius:99px;background:#fff;color:#16131a;font-weight:600;font-size:15px;transition:transform .2s var(--spring)}
.db-start:active{transform:scale(.95)}
.db-start svg{width:18px;height:18px}

/* ---------- a project's page (#pdetail: the feed's detail page) ---------- */
.pj-detail{background:linear-gradient(to bottom,var(--c1) 0,var(--c2) 520px,var(--paper) 520px)}
.pj-detail .d-hero{padding-bottom:46px}
.pj-detail .d-title{font-size:38px}
.pj-meta{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:12px}
.pj-meta:empty{display:none}
.pj-h{display:inline-flex;align-items:center;gap:6px;padding:4px 11px 4px 9px;border-radius:99px;font-size:12.5px;font-weight:600;background:color-mix(in srgb,var(--ink) 14%,transparent);color:var(--ink)}
.pj-h::before{content:"";width:7px;height:7px;border-radius:50%;background:#fff}
.pj-h.on_track::before{background:#7fe0a3}.pj-h.at_risk::before{background:#ffd27a}.pj-h.off_track::before{background:#ff8b7e}
.pj-h.st::before{display:none}
.pj-dd{font-size:13px;font-weight:500;color:var(--ink-soft);font-variant-numeric:tabular-nums}
.pj-sum{margin:12px 0 0;font-size:15px;line-height:1.45;color:var(--ink-soft);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.pj-detail .h-num{margin-top:18px}
.pj-detail .h-num .sub{max-width:none;line-height:1.5}
.pj-detail .h-num .sub .db-delta{margin-top:4px;background:color-mix(in srgb,var(--ink) 14%,transparent);color:var(--ink)}
.pj-detail .d-viz{min-height:220px}
/* the sheet */
.db-pks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));row-gap:18px;padding:20px 20px 18px;border-radius:22px;background:#fff;box-shadow:inset 0 0 0 1px var(--paper-line)}
.db-pk{min-width:0;display:flex;flex-direction:column;gap:4px;padding:0 12px}
.db-pk:nth-child(3n+1){padding-left:0}
.db-pk:not(:nth-child(3n+1)){border-left:1px solid var(--paper-line)}
.db-pk small{font-size:12px;color:var(--paper-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.db-pk b{font-weight:300;font-size:28px;line-height:1;letter-spacing:-.04em;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.db-pk b small{font-size:.5em;letter-spacing:0;color:var(--paper-muted)}
.db-pk.good b{color:#256b40}.db-pk.warn b{color:#a86412}.db-pk.bad b{color:#c9381a}
.db-sv{--ink-soft:color-mix(in srgb,var(--ink) 70%,transparent);display:flex;flex-direction:column;gap:6px;padding:22px 22px 14px;border-radius:24px;color:var(--ink);
  background:radial-gradient(120% 70% at 85% 0%,color-mix(in srgb,var(--glow) 34%,transparent),transparent 60%),linear-gradient(165deg,var(--c1),var(--c2))}
.db-svi+.db-svi{margin-top:18px;padding-top:18px;border-top:1px solid color-mix(in srgb,var(--ink) 16%,transparent)}
.db-svh small{font-size:11px;letter-spacing:.1em;text-transform:uppercase;font-weight:600;opacity:.8}
.db-svh .h-num{margin-top:4px}
.db-svh .h-num .big{font-size:36px}
.db-svc{height:150px}
.db-seg{display:flex;gap:4px;margin-bottom:10px}
.db-seg i{flex:1;height:6px;border-radius:3px;background:#e4dee8}
.db-seg i.on{background:#2f9e6b}
.d-body .pj-h3{display:flex;justify-content:space-between;align-items:baseline}
.d-body .pj-h3 span{letter-spacing:0;font-variant-numeric:tabular-nums}
.pj-ms,.pj-tl{list-style:none;margin:0;padding:0}
.pj-ms{border-radius:18px;background:#fff;box-shadow:inset 0 0 0 1px var(--paper-line);overflow:hidden}
.pj-ms li{display:grid;grid-template-columns:20px 1fr auto;gap:12px;align-items:center;padding:11px 14px}
.pj-ms li+li{border-top:1px solid var(--paper-line)}
.pj-ck{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;box-shadow:inset 0 0 0 1.5px #cfc6d6}
.pj-ms li.done .pj-ck{background:#2f9e6b;box-shadow:none;color:#fff}
.pj-ck svg{width:12px;height:12px;stroke-width:2.6}
.pj-mt{font-size:15px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pj-ms li.done .pj-mt{color:var(--paper-muted)}
.pj-ms small{font-size:12.5px;color:var(--paper-muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.pj-ms li.done small{color:#256b40}
.d-body .act p small{display:block;margin-top:2px;font-size:12.5px;color:var(--paper-muted)}
.pj-tag{display:inline-block;margin-left:7px;padding:1px 7px;border-radius:99px;font-style:normal;font-size:11px;font-weight:600;background:#efeaf3;color:var(--lilac);vertical-align:1px}
.act .pj-do{display:inline-flex;align-items:center;gap:6px}
.act .pj-do svg{width:14px;height:14px}
.act .pj-do.on{background:#e3f4e8;color:#256b40}
.act .pj-do:disabled{opacity:.6}
.pj-link .badge svg{width:17px;height:17px;color:#fff}
.pj-link .chev{transform:none}
.pj-tl{display:flex;flex-direction:column}
.pj-tl li{position:relative;display:grid;grid-template-columns:14px 1fr;gap:12px;padding:0 0 14px}
.pj-tl li:last-child{padding-bottom:0}
.pj-tl li::before{content:"";position:absolute;left:6.5px;top:16px;bottom:-2px;width:1px;background:var(--paper-line)}
.pj-tl li:last-child::before{display:none}
.pj-td{width:14px;height:14px;margin-top:3px;border-radius:50%;background:var(--paper);box-shadow:inset 0 0 0 2px #cfc6d6}
.pj-tl li:first-child .pj-td{box-shadow:inset 0 0 0 4px var(--acc)}
.pj-tl p{margin:0;font-size:14.5px;line-height:1.45;overflow-wrap:anywhere}
.pj-tl small{display:block;margin-top:3px;font-size:12px;color:var(--paper-muted)}
.db-more{margin-top:10px;font-size:13.5px;font-weight:600;color:var(--lilac)}
.pj-end{display:flex;flex-direction:column;align-items:center;gap:6px;margin-top:-10px}
.pj-end p{margin:0;font-size:12.5px;color:var(--paper-muted);text-align:center}
.pj-rm{display:inline-flex;align-items:center;gap:7px;padding:10px 14px;border-radius:99px;font-size:14px;font-weight:500;color:var(--paper-muted);transition:background .25s,color .25s}
.pj-rm svg{width:16px;height:16px}
.pj-rm.armed{background:#fde3df;color:#b42a1a}
@media (prefers-reduced-motion:reduce){.pj.fresh .card-body{animation:none}}
/* a project's tracker, notes, to-dos and the timeline composer */
.tk-sum{display:flex;gap:6px;margin:-2px 0 10px;flex-wrap:wrap}
.tk-c{display:inline-flex;align-items:baseline;gap:5px;padding:4px 10px;border-radius:99px;font-size:12.5px;background:#efeaf3;color:var(--paper-ink)}
.tk-c b{font-weight:650;font-variant-numeric:tabular-nums}
.tk-c.blocked{background:#fde3df;color:#9c2a1a}.tk-c.doing{background:#e6eefc;color:#2c4f8f}
.tk-list{list-style:none;margin:0;padding:0;border-radius:18px;background:#fff;box-shadow:inset 0 0 0 1px var(--paper-line);overflow:hidden}
.tk-row{display:grid;grid-template-columns:22px 1fr;column-gap:12px;align-items:center;padding:0 14px}
.tk-row+.tk-row,.tk-row+.tk-addrow{border-top:1px solid var(--paper-line)}
.tk-st{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;box-shadow:inset 0 0 0 1.5px #cfc6d6;color:#fff;transition:background .2s,box-shadow .2s}
.tk-st svg{width:12px;height:12px;stroke-width:2.6}
.tk-row.s-doing .tk-st{box-shadow:inset 0 0 0 1.5px #4a74c9;background:conic-gradient(#4a74c9 0 50%,transparent 50% 100%)}
.tk-row.s-blocked .tk-st{background:#d9533f;box-shadow:none}
.tk-row.s-done .tk-st{background:#2f9e6b;box-shadow:none}
.tk-main{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:0;padding:12px 0;text-align:left;width:100%}
.tk-t{font-size:15px;line-height:1.3;overflow-wrap:anywhere}
.tk-row.s-done .tk-t{color:var(--paper-muted);text-decoration:line-through;text-decoration-color:#cfc6d6}
.tk-main small{display:flex;flex-wrap:wrap;align-items:baseline;gap:5px;font-size:12.5px;color:var(--paper-muted)}
.tk-main small i{font-style:normal;opacity:.6}
.tk-main small .late{color:#c9381a;font-weight:600}
.tk-p{font-weight:600}.tk-p.high{color:#c9381a}.tk-p.medium{color:#a86412}
.tk-ed{grid-column:1/-1;display:flex;flex-direction:column;gap:10px;padding:2px 0 14px 34px}
.tk-line{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.tk-line label{width:58px;font-size:12.5px;color:var(--paper-muted)}
.tk-seg{display:inline-flex;flex-wrap:wrap;gap:4px}
.tk-seg button{padding:6px 11px;border-radius:99px;font-size:13px;background:#f3eff6;color:var(--paper-ink)}
.tk-seg button.on{background:var(--paper-ink);color:#fff}
.tk-in{font:inherit;font-size:14px;padding:8px 11px;border-radius:12px;border:1px solid var(--paper-line);background:var(--paper);color:var(--paper-ink);width:100%;box-sizing:border-box}
.tk-date{width:auto}
.tk-notes{resize:vertical;min-height:44px;line-height:1.4}
.tk-x{font-size:13px;color:var(--lilac);font-weight:600}
.tk-foot{display:flex;justify-content:space-between;align-items:center;gap:8px}
.tk-foot small{font-size:12px;color:var(--paper-muted)}
.tk-del{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:99px;font-size:13px;color:var(--paper-muted)}
.tk-del svg{width:14px;height:14px}
.tk-del.armed{background:#fde3df;color:#b42a1a}
.tk-addrow form{display:grid;grid-template-columns:22px 1fr;column-gap:12px;align-items:center;padding:0 14px}
.tk-plus{width:22px;height:22px;display:grid;place-items:center;color:var(--paper-muted)}
.tk-plus svg{width:15px;height:15px}
.tk-addrow input{font:inherit;font-size:15px;padding:13px 0;border:0;background:none;outline:none;color:var(--paper-ink);width:100%}
.pj-notes .pj-newnote b{color:var(--lilac)}
.pj-notes .badge svg{width:17px;height:17px;color:#fff}
.pj-ms .pj-ck{cursor:pointer}
.pj-log{display:grid;grid-template-columns:1fr auto 38px;gap:6px;align-items:center;margin:0 0 14px;padding:5px 5px 5px 14px;border-radius:99px;background:#fff;box-shadow:inset 0 0 0 1px var(--paper-line)}
.pj-log input{font:inherit;font-size:14.5px;border:0;background:none;outline:none;color:var(--paper-ink);min-width:0}
.pj-log select{font:inherit;font-size:13px;border:0;background:#f3eff6;border-radius:99px;padding:6px 8px;color:var(--paper-ink)}
.pj-log button{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:var(--paper-ink);color:#fff}
.pj-log button svg{width:15px;height:15px}
.pj-k{display:inline-block;margin-right:7px;padding:1px 7px;border-radius:99px;font-size:11px;font-weight:650;vertical-align:1px;background:#efeaf3;color:var(--lilac)}
.pj-k.blocker{background:#fde3df;color:#9c2a1a}.pj-k.milestone{background:#e3f4e8;color:#256b40}
