/* Scene 4 - one calm day: the Today screen assembles while a HUD clock runs with the scroll */
.day-slot { left: max(40%, calc(var(--gutter) + min(var(--measure), 38vw) + 24px)); right: 108px; top: 70px; bottom: 22px; z-index: 3; }
.day-copy { width: min(var(--measure), 38vw); }
.sky { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.sky i { position: absolute; inset: 0; opacity: 0; will-change: opacity; }
.sky .sk-dawn { background: radial-gradient(70% 60% at 0% 100%, color-mix(in srgb, var(--learning) 42%, transparent), transparent 70%), radial-gradient(50% 40% at 30% 100%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%); }
.sky .sk-day { background: radial-gradient(60% 45% at 70% 0%, color-mix(in srgb, var(--money) 26%, transparent), transparent 70%); }
.sky .sk-dusk { background: radial-gradient(80% 60% at 100% 100%, color-mix(in srgb, var(--accent) 44%, transparent), transparent 70%), radial-gradient(60% 50% at 40% 100%, color-mix(in srgb, var(--learning) 30%, transparent), transparent 70%); }
.sky .sk-night { background: linear-gradient(180deg, color-mix(in srgb, var(--career-ink) 34%, transparent), color-mix(in srgb, var(--career) 16%, transparent)); mix-blend-mode: multiply; }
[data-theme="dark"] .sky .sk-night { mix-blend-mode: normal; background: linear-gradient(180deg, color-mix(in srgb, var(--career) 20%, transparent), transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sky .sk-night { mix-blend-mode: normal; background: linear-gradient(180deg, color-mix(in srgb, var(--career) 20%, transparent), transparent); } }

/* the HUD clock in the copy column */
.clock { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; max-width: 25rem; margin-top: 30px; }
.clock-ic { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 21px; background: var(--learning-soft); color: var(--learning-ink); transition: background var(--dur-effects-slow, 0.5s) var(--ease-effects), color var(--dur-effects-slow, 0.5s) var(--ease-effects); }
.clock-ic.night { background: var(--career-soft); color: var(--career-ink); }
.clock-ic.dusk { background: var(--accent-soft); color: var(--accent-ink); }
.clock-ic .ms { font-size: 32px; font-variation-settings: 'FILL' 1; }
.clock-t { font-size: clamp(3.2rem, 1.6rem + 4.2vw, 5.2rem); line-height: 1; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; font-variation-settings: 'ROND' 100; }
.clock-l { align-self: flex-end; padding-bottom: 8px; font-size: var(--fs-title-m); font-weight: 700; color: var(--ink2); }
.clock-track { position: relative; flex-basis: 100%; height: 8px; margin-top: 16px; border-radius: 4px; background: var(--inset); }
.clock-track b { position: absolute; inset: 0; border-radius: 4px; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--learning), var(--accent) 60%, var(--accent2)); }
.mk { position: absolute; top: 50%; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2.5px var(--h); transition: transform var(--dur-spatial) var(--ease-spatial), background var(--dur-effects) var(--ease-effects); }
.mk.on { background: var(--h); transform: scale(1.3); }
.day-beat { margin-top: 22px; min-height: 2.9em; max-width: 22ch; font-size: 1.2rem; line-height: 1.45; font-weight: 500; color: var(--ink); font-variation-settings: 'ROND' 80; }
.day-beat.swap { animation: beatIn 0.6s var(--ease-spatial) both; }
.day-beat.swap2 { animation: beatIn2 0.6s var(--ease-spatial) both; }
@keyframes beatIn { from { opacity: 0; transform: translate3d(0, 12px, 0); } to { opacity: 1; transform: none; } }
@keyframes beatIn2 { from { opacity: 0; transform: translate3d(0, 12px, 0); } to { opacity: 1; transform: none; } }
.static .day-beat { min-height: 0; }

/* ---------- the Today screen inside the window (prototype: design/demo/src/js/screens/today) ---------- */
.td-head { position: relative; margin-bottom: 10px; }
.td-date { font-size: 12px; font-weight: 600; color: var(--ink2); }
.td-hello { margin-top: 1px; font-size: 25px; line-height: 1.15; font-weight: 500; font-variation-settings: 'ROND' 100; letter-spacing: 0; }
.td-hello.swap, .now-t.swap, .now-l.swap { animation: beatIn 0.5s var(--ease-spatial) both; }
.td-hello.swap2, .now-t.swap2, .now-l.swap2 { animation: beatIn2 0.5s var(--ease-spatial) both; }

.td-now {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 16px 14px 12px; margin-bottom: 14px; overflow: hidden;
  border-radius: 24px; background: color-mix(in srgb, var(--accent-soft) 88%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent);
}
.now-ic { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.now-ic .ms { font-size: 24px; font-variation-settings: 'FILL' 1; }
.now-tx { min-width: 0; flex: 1; }
.now-l { font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-ink); }
.now-t { margin-top: 1px; font-size: 17px; font-weight: 500; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variation-settings: 'ROND' 100; }
.now-sub { flex: none; text-align: right; font-size: 11.5px; font-weight: 600; color: var(--accent-ink); line-height: 1.4; font-variant-numeric: tabular-nums; }
.now-bar { position: absolute; left: 14px; right: 14px; bottom: 6px; height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--accent) 18%, transparent); }
.now-bar b { position: absolute; inset: 0; border-radius: 2px; background: var(--accent); transform-origin: left; transform: scaleX(0); }

.td-goals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.goal { position: relative; display: grid; grid-template-columns: 38px 1fr; gap: 2px 10px; align-items: center; padding: 10px 12px 12px 10px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-soft), inset 0 0 0 1px var(--line); }
.goal .tile { width: 38px; height: 38px; border-radius: 13px; grid-row: 1 / span 2; }
.g-t { font-size: 12.5px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-m { font-size: 11px; font-weight: 500; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-bar { grid-column: 1 / -1; position: relative; height: 5px; margin-top: 6px; border-radius: 3px; background: var(--inset); overflow: hidden; }
.g-bar b { position: absolute; inset: 0; border-radius: 3px; background: var(--h); transform-origin: left; transform: scaleX(0); }

.td-cols { display: grid; grid-template-columns: 1fr 1.06fr; gap: 18px; }
.td-sec { display: flex; align-items: center; gap: 9px; height: 30px; margin-bottom: 8px; }
.td-sec .tile { width: 28px; height: 28px; border-radius: 10px; }
.td-sec .tile .ms { font-size: 17px; }
.td-sec h3 { font-size: 18px; font-weight: 500; font-variation-settings: 'ROND' 100; }
.td-sec .cnt { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--ink2); font-variant-numeric: tabular-nums; }
.td-sec .tab { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 12px; border-radius: 13px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 700; }
.td-sec .tab + .cnt { margin-left: 4px; }

.hcards, .tcards { display: flex; flex-direction: column; gap: 8px; }
.hcard, .tcard {
  position: relative; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 14px 0 10px; border-radius: 20px;
  background: var(--surface); box-shadow: var(--shadow-soft), inset 0 0 0 1px var(--line); will-change: transform, opacity;
  transition: background var(--dur-effects) var(--ease-effects);
}
.hcard .hbtn { width: 40px; height: 40px; }
.hc-tx, .tc-tx { min-width: 0; flex: 1; }
.hc-t, .tc-t { font-size: 14px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color var(--dur-effects) var(--ease-effects); }
.hc-m, .tc-m { display: flex; align-items: center; gap: 5px; margin-top: 2px; font-size: 11.5px; font-weight: 500; color: var(--ink2); white-space: nowrap; }
.hc-m .ms, .tc-m .ms { font-size: 13px; }
.dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--h); }
.streak { flex: none; display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; color: var(--amber-ink); font-variant-numeric: tabular-nums; }
.streak .ms { font-size: 15px; color: var(--amber); font-variation-settings: 'FILL' 1; }
.hcard.is-done { background: color-mix(in srgb, var(--hs) 55%, var(--surface)); }
.hcard.is-done .hc-t { color: var(--hi); }

.tcard .tc-c { position: relative; flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin: 0 2px; border-radius: 50%; border: 2.5px solid var(--h); transition: background var(--dur-effects) var(--ease-effects), border-color var(--dur-effects) var(--ease-effects); }
.tcard .tc-c .ms { font-size: 18px; color: var(--surface); opacity: 0; transform: scale(0.3); font-variation-settings: 'wght' 700; transition: opacity 0.15s, transform var(--dur-spatial) var(--ease-spatial); }
.tcard.is-done .tc-c { background: var(--accent); border-color: var(--accent); }
.tcard.is-done .tc-c .ms { opacity: 1; transform: none; }
.tcard.is-done .tc-t { color: var(--ink3); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.tcard .tc-flag { flex: none; font-size: 18px; font-variation-settings: 'FILL' 1; }
.tcard .tc-flag.red { color: var(--red); } .tcard .tc-flag.amber { color: var(--amber); }
.tcard.ev { background: color-mix(in srgb, var(--hs) 70%, var(--surface)); }
.tcard.ev .tile { width: 36px; height: 36px; border-radius: 13px; background: color-mix(in srgb, var(--h) 22%, var(--surface)); margin-left: -1px; }
.tcard.ev .tile .ms { font-size: 20px; }
.tcard.ev .tile .ms-ok { position: absolute; opacity: 0; transform: scale(0.3); transition: opacity 0.15s, transform var(--dur-spatial) var(--ease-spatial); }
.tcard.ev .tile { position: relative; }
.tcard.ev.is-done .tile .ms-ic { opacity: 0; }
.tcard.ev.is-done .tile .ms-ok { opacity: 1; transform: none; }
.tcard.ev.is-done .tc-t { text-decoration: none; color: var(--hi); }
.tcard.ev.is-done { background: color-mix(in srgb, var(--surface) 70%, transparent); }

/* ---------- mobile: no goals row, habits as a row of buttons ---------- */
.appwin.is-m .td-goals { display: none; }
.appwin.is-m .td-head { margin-bottom: 8px; }
.appwin.is-m .td-hello { font-size: 22px; }
.appwin.is-m .td-now { margin-bottom: 10px; padding: 10px 12px 13px 10px; }
.appwin.is-m .now-sub { display: none; }
.appwin.is-m .td-cols { grid-template-columns: 1fr; gap: 6px; }
.appwin.is-m .td-sec { height: 26px; margin-bottom: 6px; }
.appwin.is-m .hcards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.appwin.is-m .hcard { flex-direction: column; justify-content: center; gap: 5px; height: 84px; padding: 0 4px; text-align: center; border-radius: 18px; }
.appwin.is-m .hc-tx { flex: none; width: 100%; }
.appwin.is-m .hc-t { font-size: 11.5px; }
.appwin.is-m .hc-m, .appwin.is-m .streak { display: none; }
.appwin.is-m .tcards { gap: 6px; }
.appwin.is-m .tcard { height: 46px; border-radius: 16px; gap: 10px; }
.appwin.is-m .tc-t { font-size: 13px; }
.appwin.is-m .tc-m { font-size: 10.5px; margin-top: 1px; }

@media (max-width: 759px) {
  .day-slot { left: 0; right: 0; top: 274px; bottom: 60px; }
  .day-copy { width: auto; }
  .day-copy .lead { display: none; }
  .static .day-copy .lead { display: block; }
  .static #day .stage { min-height: 1160px; }
  .static #day .day-slot { top: 430px; bottom: 24px; }
  .clock { gap: 2px 12px; margin-top: 12px; max-width: none; }
  .clock-ic { width: 42px; height: 42px; border-radius: 15px; }
  .clock-ic .ms { font-size: 24px; }
  .clock-t { font-size: 2.7rem; }
  .clock-l { padding-bottom: 4px; font-size: 0.9rem; }
  .clock-track { height: 6px; margin-top: 10px; }
  .mk { width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; }
  .day-beat { margin-top: 10px; min-height: 2.6em; max-width: none; font-size: 0.98rem; }
}
