/* Today: one card style, one 52px row, one 32px icon tile, on an 8px grid. Colour only in icon tiles and small marks. */
body.sd-on-today{background:var(--bg)}
.sd-today{display:flex;flex-direction:column;gap:8px;max-width:640px;margin:0 auto;padding:8px 0 24px}
.sd-today svg,.sd-sheet svg{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sd-today-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin:8px 0}
.sd-today-date{margin:0;font-size:13px;font-weight:500;color:var(--muted)}
.sd-today-hi{margin:2px 0 0;font-size:28px;line-height:1.15;font-weight:650;color:var(--ink)}
.sd-add-btn{flex:none;width:44px;height:44px;border-radius:50%;border:0;background:var(--soft);color:var(--accent-ink);display:grid;place-items:center;cursor:pointer}
.sd-add-btn svg{width:22px;height:22px}
.sd-add-btn:focus-visible,.sd-row:focus-visible,.sd-spaces-grid a:focus-visible,.sd-link:focus-visible,.sd-stats:focus-visible{outline:3px solid #bf8a2b;outline-offset:2px}
.sd-block{display:flex;flex-direction:column;gap:8px;margin-top:8px}
.sd-block[hidden]{display:none}
.sd-block-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:0 4px}
.sd-block-head h2{margin:0;font-size:15px;font-weight:650;color:var(--muted);letter-spacing:0}
.sd-head-actions{display:flex;gap:16px}
.sd-count{font-size:12px;font-weight:600;color:var(--accent-ink);background:var(--soft);border-radius:999px;padding:2px 8px}
.sd-count:empty{display:none}
.sd-link{background:none;border:0;padding:4px 0;font:inherit;font-size:14px;font-weight:600;color:var(--accent-ink);text-decoration:none;cursor:pointer}
.sd-more{align-self:flex-start;padding-left:4px}
.sd-card{display:block;background:var(--paper);border:1px solid var(--line);border-radius:16px;overflow:hidden;color:inherit;text-decoration:none}
.sd-row{display:grid;grid-template-columns:32px minmax(0,1fr) 16px;gap:12px;align-items:center;min-height:56px;padding:8px 14px;border-top:1px solid var(--line);color:inherit;text-decoration:none}
.sd-card>.sd-row:first-child,.sd-card>div:first-child>.sd-row:first-child,.sd-card>div:empty+div>.sd-row:first-child{border-top:0}
.sd-row:active{background:var(--sunk)}
.sd-row-text{display:grid;gap:2px;min-width:0}
.sd-row-text b{font-size:15px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sd-row-text small{font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sd-due.overdue{color:var(--bad)}
.sd-ic{width:32px;height:32px;border-radius:10px;background:var(--s);color:var(--c);display:grid;place-items:center}
.sd-ic svg{width:18px;height:18px}
.sd-dot{width:8px;height:8px;border-radius:50%;background:currentColor}
.sd-chev{width:16px;height:16px;color:var(--muted)}
.sd-row-time{grid-template-columns:52px minmax(0,1fr) 8px}
.sd-row-time time{display:grid;font-size:12px;font-weight:600;color:var(--muted);line-height:1.25;font-variant-numeric:tabular-nums}
.sd-row-time time small{font-weight:500}
.sd-pip{width:8px;height:8px;border-radius:50%;justify-self:center}
.sd-empty{margin:0;padding:16px 14px;color:var(--muted);font-size:14px}
.sd-note{margin:0;padding:0 4px;color:var(--muted);font-size:13px}
.sd-stats{display:grid;grid-auto-flow:column;grid-auto-columns:1fr}
.sd-stats>span{display:grid;gap:2px;padding:12px 14px;border-left:1px solid var(--line);min-width:0}
.sd-stats>span:first-child{border-left:0}
.sd-stats small{font-size:12px;color:var(--muted);white-space:nowrap}
.sd-stats b{font-family:var(--font-display);font-size:17px;font-weight:650;font-variant-numeric:tabular-nums;white-space:nowrap}
/* Money is never cut off: a lakh amount shrinks to fit rather than ending in an ellipsis. */
@media (max-width:400px){.sd-stats b{font-size:clamp(13px,4vw,17px);letter-spacing:-.2px}}
.sd-locked-amount{font-size:14px!important;color:var(--muted)}
.sd-hide-amounts .sd-amount:not(.sd-locked-amount){filter:blur(7px);user-select:none;-webkit-user-select:none}
.sd-spaces-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px 8px;padding:8px 0}
.sd-spaces-grid a{display:grid;justify-items:center;gap:6px;color:var(--ink);text-decoration:none;font-size:13px;font-weight:500}
.sd-spaces-grid .sd-ic{width:52px;height:52px;border-radius:16px}
.sd-spaces-grid .sd-ic svg{width:22px;height:22px}
.sd-sheet-wrap{position:fixed;inset:0;z-index:60;background:rgba(21,16,23,.42);display:flex;align-items:flex-end;justify-content:center;padding:0 max(12px,env(safe-area-inset-right,0px)) max(12px,env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px))}
.sd-sheet{width:min(560px,100%);background:var(--bg);border-radius:24px;padding:16px;display:flex;flex-direction:column;gap:8px;max-height:85vh;overflow:auto}
/* Sheets rise from the bottom edge as the backdrop dims, and leave the same way a little quicker (docs/design-spec.md, Motion).
   Opacity and transform only; theme.css removes it all for reduced motion. */
@keyframes sd-backdrop-in{from{background-color:transparent}}
@keyframes sd-sheet-in{from{opacity:0;transform:translateY(24px)}}
.sd-sheet-wrap{animation:sd-backdrop-in .2s ease-out}
.sd-sheet-wrap>.sd-sheet{animation:sd-sheet-in .22s cubic-bezier(.2,.8,.2,1)}
.sd-sheet-wrap.sd-closing{pointer-events:none;background-color:transparent;transition:background-color .16s ease-in}
.sd-sheet-wrap.sd-closing>.sd-sheet{opacity:0;transform:translateY(24px);transition:opacity .16s ease-in,transform .16s ease-in}
/* Older home layers stay out of Today. */
body.sd-on-today .sd-first-look,body.sd-on-today .sd-home-footnote{display:none}
@media (prefers-color-scheme:dark){
 html.sd-dark body.sd-on-today,html.sd-dark body.sd-on-today .topbar,html.sd-dark body.sd-on-today .footer{background:var(--bg);color:var(--ink)}
 html.sd-dark body.sd-on-today .topbar *:not(.sd-profile-avatar){color:inherit}
 html.sd-dark body.sd-on-today .sd-add-btn{background:var(--soft);color:var(--a-plans)}
 html.sd-dark body.sd-on-today .sd-link,html.sd-dark body.sd-on-today .sd-count{color:var(--a-plans)}
 html.sd-dark .sd-page-nav a[aria-current],html.sd-dark #mobileNav a[aria-current]{color:var(--a-plans)}
 /* A sheet shares the page's dark background, so a deeper shade behind it and a thin edge show where it starts. */
 html.sd-dark .sd-sheet-wrap:not(.sd-closing){background:rgba(0,0,0,.6)}
 html.sd-dark .sd-sheet:not(.sd-search){border:1px solid var(--line-strong)}
}
.sd-head-actions{align-items:baseline}
.sd-link{line-height:1.4}
body.sd-on-today .demo-bar,body.sd-on-today .introduction-replay{display:none}
@media (prefers-color-scheme:dark){
 html.sd-dark body.sd-on-today .avatar,html.sd-dark body.sd-on-today .top-actions .btn{background:var(--soft);color:var(--ink);border-color:var(--line)}
}
/* This week and the news on Today. */
button.sd-row{width:100%;border:0;border-top:1px solid var(--line);background:none;font:inherit;color:inherit;text-align:left;cursor:pointer}
.sd-week-dates{font-size:13px;color:var(--muted)}
.sd-news-row{grid-template-columns:minmax(0,1fr)}
.sd-news-row .sd-row-text b{font-weight:600;line-height:1.35;white-space:normal}
/* On narrow phones these lines wrap rather than hide a date or an amount. */
#sd-needs .sd-row-text small,#sd-week .sd-row-text>*,.sd-add-sheet .sd-row-text>*{white-space:normal}
/* What changed (SD-44): a line says who and what in full, so it wraps rather than cutting a name off. */
#sd-changes .sd-row-text>*{white-space:normal;overflow-wrap:anywhere}#sd-changes .sd-row-text b{line-height:1.35}
/* The search button beside +. The search sheet itself is styled in search.css, shared with Projects. */
.sd-today-actions{display:flex;gap:8px;flex:none}
.sd-search-btn svg{width:20px;height:20px}
/* News you have not read: each headline has ✓ to set it aside, and the card ends with "Mark these read". */
.sd-news-item{display:grid;grid-template-columns:minmax(0,1fr) 52px;align-items:center;border-top:1px solid var(--line)}
.sd-card>.sd-news-item:first-child{border-top:0}
.sd-news-item .sd-news-row{border-top:0;padding-right:4px}
.sd-news-done{justify-self:center;width:44px;height:44px;border:1px solid var(--line);border-radius:50%;background:none;color:var(--muted);font:inherit;font-size:16px;cursor:pointer}
.sd-news-done:hover{color:var(--ink)}
.sd-news-more{display:block;width:100%;min-height:44px;padding:0 14px;border:0;border-top:1px solid var(--line);background:none;color:var(--accent-ink);font:inherit;font-size:14px;font-weight:600;text-align:left;cursor:pointer}
.sd-news-tools{display:flex;gap:16px;align-items:baseline}
.sd-news-tools .sd-link:disabled{opacity:.6;cursor:default}
.sd-news-empty .sd-link{display:inline;padding:0}
.sd-news-done:focus-visible,.sd-news-more:focus-visible{outline:3px solid #bf8a2b;outline-offset:-3px}
@media (prefers-color-scheme:dark){html.sd-dark body.sd-on-today .sd-news-more{color:var(--a-plans)}}
/* Today by use: your day first, then what needs you and what is next, then what you glance at (money, this week, the news, your
   spaces). One column on a phone. On a wide screen your day spans the top and the other two sit side by side under it, so the
   whole day shows at once instead of one narrow column with empty space either side. */
.sd-today-main,.sd-today-side{display:flex;flex-direction:column;gap:8px;min-width:0}
@media (min-width:1024px){
 .sd-today{max-width:1040px;display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);column-gap:32px;row-gap:8px;align-items:start}
 .sd-today>:not(.sd-today-main):not(.sd-today-side){grid-column:1/-1}
 /* Your day spans the top. Below it, both columns start level and keep the same 16px between sections. */
 .sd-today-main,.sd-today-side{gap:16px;margin-top:8px}.sd-today-main>.sd-block,.sd-today-side>.sd-block{margin-top:0}
 /* Every heading row is as tall as Money's buttons, so the two columns' titles and cards line up. */
 .sd-today-main>.sd-block>.sd-block-head,.sd-today-side>.sd-block>.sd-block-head{min-height:44px;align-items:center}
}
/* Cards are paper laid on the page: a hairline edge and a soft shadow underneath, so each reads as a layer above it. Opaque, so
   nothing shows through and nothing is blurred (docs/design-spec.md); in dark mode the edge alone does it. */
.sd-today .sd-card{box-shadow:0 1px 1px #23142308,0 8px 20px -14px #2314232e}
@media (prefers-color-scheme:dark){html.sd-dark .sd-today .sd-card{box-shadow:none}}
/* Needs you by kind: a quiet label with how many are overdue and how many in all, the most urgent three, then Show N more. With
   large text the count moves under the label, and wraps itself if it must, rather than being cut off. */
.sd-needs-set+.sd-needs-set{border-top:1px solid var(--line)}
.sd-needs-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:2px 12px;margin:0;padding:10px 14px 2px;font-size:12px;font-weight:650;letter-spacing:.02em;text-transform:uppercase;color:var(--muted)}
.sd-needs-sum{text-transform:none;letter-spacing:0;font-variant-numeric:tabular-nums}
.sd-needs-rows>.sd-row:first-child{border-top:0}
.sd-needs-more{display:block;width:100%;min-height:44px;padding:0 14px;border:0;border-top:1px solid var(--line);background:none;color:var(--accent-ink);font:inherit;font-size:14px;font-weight:600;text-align:left;cursor:pointer}
.sd-needs-more:focus-visible{outline:3px solid #bf8a2b;outline-offset:-3px}
@media (prefers-color-scheme:dark){html.sd-dark body.sd-on-today .sd-needs-more{color:var(--a-plans)}}
