/* The today view (public/js/ui/views/today.js). Linked from index.html; its rules live here and nowhere else (never in styles.css). */

/* The card is the centrepiece of the start page: a big card with a gradient border, the blocks drawn as a path (a state icon
   on each one, from the block's data-state), the next block lit, a full-width Start button and the test line as a banner. Only
   the styling is neon: the card's words stay calm (spec daily-routine 5.4). */
.today {
  display: grid; gap: 0.9rem; padding: 1.3rem 1.3rem 1.4rem;
  border: 2px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, var(--accent), var(--neon-2)) border-box;
  box-shadow: var(--shadow), 0 20px 44px -26px color-mix(in srgb, var(--neon-2) 70%, transparent);
}
.today-title { margin: 0; font-size: 1.5rem; }
.today-title:focus { outline: none; }
.today-title:focus-visible { outline: 3px solid var(--glow-ring); outline-offset: 2px; }
.today-test { margin: 0; padding: 0.6rem 0.9rem; border-radius: 12px; border-left: 4px solid var(--neon-2); background: var(--accent-soft); font-weight: 600; overflow-wrap: anywhere; }

/* The path: a dashed line down the left edge, and an icon where each block meets it. */
.today-blocks { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
/* The gutter is in px, not rem: it must not grow with the text size, or at 200 % it would squeeze the blocks (320 px reflow). */
.today-blocks::before { content: ''; position: absolute; left: 16px; top: 20px; bottom: 20px; border-left: 3px dashed var(--border); }
.today-block { position: relative; margin-left: 38px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 0.8rem; padding: 0.7rem 0.9rem; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); }
.today-block::before {
  content: ''; position: absolute; left: -38px; top: 50%; width: 32px; height: 32px; transform: translateY(-50%);
  display: grid; place-items: center; border-radius: 50%; border: 3px solid var(--border); background: var(--surface);
  font-weight: 800; font-size: 1rem; line-height: 1; color: var(--cta-text);
}
.today-block[data-state="started"]::before { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 0 32%, var(--surface) 36%); }
.today-block[data-state="done"]::before { content: '✓'; content: '✓' / ''; border-color: var(--cta); background: var(--cta); }
.today-block-text { display: grid; gap: 0.15rem; flex: 1 1 11rem; min-width: 0; overflow-wrap: anywhere; }
.today-state { font-weight: 800; font-size: 0.8rem; padding: 0.1rem 0.6rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.today-block[data-state="done"] { background: var(--good-soft); border-color: transparent; }
.today-block[data-state="done"] .today-state { background: transparent; border-color: transparent; color: var(--good); }
.today-block[data-state="started"] { border-color: var(--accent); }
/* The next block, the one Start leads to, is lit. */
.today-block[data-next] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent), 0 12px 28px -16px var(--accent); }
.today-block[data-next]::before { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent), 0 0 16px 2px color-mix(in srgb, var(--accent) 55%, transparent); }

/* The card body is a flex column, so Start stretches across it on its own; the study-plan link is compact. */
.today-start { min-height: 54px; font-size: 1.1rem; }
.today-plan { align-self: flex-start; min-height: 44px; }
.today-summary, .today-empty { margin: 0; }
.today-status { margin: 0; }
.today-status:empty { display: none; }

/* "Back to today" beside "Next: Practice" on the Learn step. */
.next-row--today { flex-wrap: wrap; justify-content: space-between; gap: 0.6rem; }
