/* "Hôm nay": the day's work across every course, then the newest lessons. */

.wrap { max-width: var(--page-width); margin: 0 auto; padding: 0 var(--page-gutter) 80px; }
.page-head { padding: 30px 0 18px; border-bottom: 1px solid var(--line); }
.page-head .eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.page-head h1 { font-family: var(--font-display); font-size: 28px; margin: 0 0 8px; }
.page-head .sub { margin: 0; color: var(--ink-soft); font-size: 14.5px; max-width: 54ch; line-height: 1.7; }
.muted { color: var(--ink-faint); font-size: 14px; }

.today-date { margin: 18px 0 0; font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-faint); }

.today-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0 0; }
@media (max-width: 560px) { .today-summary { grid-template-columns: 1fr 1fr; } }
.today-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 14px 16px; display: grid; gap: 2px; }
.today-tile b { font-family: var(--font-display); font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.today-tile span { font-size: 12.5px; color: var(--ink-soft); }
.today-tile.warn b { color: var(--accent); }
.today-tile.ok b { color: var(--ok); }

.today-goal { margin: 16px 0 0; }
.goal-bar, .tc-progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.goal-bar .fill, .tc-progress .fill { height: 100%; background: var(--accent); border-radius: 999px; }
.today-goal p { margin: 10px 0 0; font-size: 14.5px; color: var(--ink-soft); }
.today-goal b { color: var(--ink); }

.today-h2 { font-family: var(--font-display); font-size: 19px; margin: 32px 0 12px; }

.today-courses { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.today-course { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 16px 18px; display: grid; gap: 10px; align-content: start; box-shadow: var(--shadow-card); }
.tc-head { display: flex; align-items: center; gap: 10px; }
.tc-head h3 { margin: 0; font-size: 16px; flex: 1; }
.mark { display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 6px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; }
.tc-streak { font-size: 12px; font-weight: 700; color: var(--ok); background: var(--ok-soft); border-radius: 999px; padding: 2px 9px; }
.tc-line { margin: 0; font-size: 14px; color: var(--ink-soft); }
.tc-line b { color: var(--ink); font-variant-numeric: tabular-nums; }
.tc-line b.warn { color: var(--accent); }
.today-goal .today-tip { margin: 6px 0 0; font-size: 13.5px; }
.today-goal-pick { display: grid; gap: 6px; margin-bottom: 12px; }
.today-goal-label { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.today-goal .today-streak { margin: 6px 0 0; font-size: 13.5px; font-weight: 600; }
.today-goal .today-streak.risk { color: var(--flag); }
.tc-recall { margin: 0; font-size: 13px; color: var(--ink-soft); }
.tc-recall b { font-variant-numeric: tabular-nums; }
.tc-recall b.ok { color: var(--ok); }
.tc-recall b.warn { color: var(--accent); }
.tc-decks { display: flex; flex-wrap: wrap; gap: 6px; }
.deck-chip { font-size: 12px; color: var(--ink-soft); background: var(--surface-2); border-radius: 999px; padding: 3px 10px; }
.today-course .go-btn { justify-self: start; text-decoration: none; }

.go-btn { display: inline-block; background: var(--accent); color: var(--ink-inverse); border: none; border-radius: 999px;
  padding: 10px 18px; font-size: 13.5px; font-weight: 700; }
.go-btn.secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.go-btn:hover { filter: brightness(1.06); }
.go-btn:focus-visible, .today-chip:focus-visible, .today-lesson:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.today-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.today-chip { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px 5px 6px; font-size: 14px; }
.today-chip:hover { border-color: var(--accent); }

.today-empty { margin: 22px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 20px; }
.today-empty h2 { font-family: var(--font-display); font-size: 20px; margin: 0 0 6px; }
.today-empty p { margin: 0 0 14px; color: var(--ink-soft); font-size: 14.5px; }

.today-lessons { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.today-lesson { display: grid; gap: 4px; text-decoration: none; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-card); padding: 12px 14px; }
.today-lesson:hover { border-color: var(--accent); }
.tl-lang { font-size: 12px; font-weight: 700; color: var(--accent); }
.tl-title { font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }

.today-source { margin: 28px 0 0; font-size: 13px; color: var(--ink-faint); }

/* Touch targets (GUI plan 2.2). On a touch screen, or a narrow one,
   everything tapped is at least 44 px in each direction (WCAG 2.5.5, Apple
   HIG), with at least 8 px between neighbours. With a mouse the sizes above
   stay as they are. tests/test_touch_targets.py keeps these blocks. */
@media (pointer: coarse), (max-width: 720px) {
  .today-chip { min-height: 44px; }
}
/* The daily reminder (GUI plan 4.3). */
.today-remind { margin-top: 24px; display: grid; gap: 8px; }
.today-remind .today-h2 { margin: 0; }
.today-remind-sub { margin: 0; color: var(--ink-soft); font-size: 14px; }
.today-remind-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.today-remind-row label { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.today-remind-row input { font: inherit; font-size: 16px; padding: 8px 10px; min-height: 44px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); }
