/* src/styles/views/today.css — owned by T3 (Today view). Scope every rule under .view-today. */

.view-today { padding-bottom: var(--s-8); }
.view-today .today-sec { margin-top: var(--section-gap); }
.view-today .today-muted { color: var(--text-3); font: 400 var(--fs-small)/var(--lh-small) var(--font-sans); }
.view-today .today-more {
  display: inline-flex; align-items: center; gap: var(--s-1); min-height: var(--tap-min); padding-inline: var(--s-1);
  color: var(--text-2); font: 500 var(--fs-caption)/1 var(--font-sans); text-decoration: none; white-space: nowrap;
}
.view-today .today-more:hover { color: var(--text); }

/* ── Countdown numeral (the cover itself lives in today-cover.css) ── */
.view-today .today-num {
  font: 400 var(--fs-hero)/var(--lh-hero) var(--font-serif); font-variation-settings: 'opsz' 72;
  letter-spacing: -.02em; font-variant-numeric: lining-nums tabular-nums; color: var(--text);
}
.view-today .today-unit { font: italic 400 22px/28px var(--font-serif); color: var(--text-2); }

/* ── Before you go ───────────────────────────────────────────── */
.view-today .today-progress { display: flex; align-items: center; gap: var(--s-3); margin: var(--s-1) 0 var(--s-2); }
.view-today .today-progress-text { font: 500 var(--fs-caption)/var(--lh-caption) var(--font-sans); color: var(--text-2); white-space: nowrap; }
.view-today .today-progress-bar { flex: 1; height: 2px; background: var(--line); border-radius: 1px; overflow: hidden; }
.view-today .today-progress-fill { display: block; height: 100%; background: var(--text); transition: width var(--dur-2) var(--ease-out); }
.view-today .today-todo-list { list-style: none; margin: 0; padding: 0; }
.view-today .today-todo { border-top: 1px solid var(--line); padding-block: var(--s-1); }
.view-today .today-todo:first-child { border-top: 0; }
.view-today .today-due { display: inline-flex; align-items: center; gap: var(--s-1); color: var(--text-3); }
.view-today .today-due.is-overdue { color: var(--accent-text); font-weight: 500; }

/* ── Gaps ────────────────────────────────────────────────────── */
.view-today .today-gaps-lede { display: flex; align-items: center; gap: var(--s-2); margin: var(--s-1) 0 var(--s-2); font: 400 var(--fs-small)/var(--lh-small) var(--font-sans); color: var(--text-2); }
.view-today .today-gap-list { list-style: none; margin: 0; padding: 0; }
.view-today .today-gap {
  display: grid; grid-template-columns: 56px 1fr; column-gap: var(--s-3); padding: var(--s-3) 0;
  border-top: 1px solid var(--line); font: 400 var(--fs-small)/var(--lh-small) var(--font-sans);
}
.view-today .today-gap:first-child { border-top: 0; }
.view-today .today-gap-date { color: var(--text-3); font-weight: 500; }
.view-today .today-gap-text { color: var(--text); min-width: 0; overflow-wrap: anywhere; }

/* ── Compact day cards (first days) ──────────────────────────── */
.view-today .today-day-list { display: grid; gap: var(--card-gap); }
.view-today .today-day {
  display: grid; grid-template-columns: 28px 1fr auto; align-items: start; column-gap: var(--s-3);
  padding: var(--s-3) var(--s-4); min-height: var(--tap-min);
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--tone); border-radius: var(--r-3);
  color: var(--text); text-decoration: none;
  transition: background var(--dur-1) var(--ease-out);
}
.view-today .today-day:hover { background: var(--surface-pressed); }
.view-today .today-day .stamp { margin-top: 2px; }
.view-today .today-day-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.view-today .today-day-eyebrow { font: 600 var(--fs-label)/var(--lh-label) var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.view-today .today-day-title { font: 500 var(--fs-title-3, 18px)/var(--lh-title-3, 24px) var(--font-serif); }
.view-today .today-day-sub { font: italic 400 var(--fs-small)/var(--lh-small) var(--font-serif); color: var(--text-2); }
.view-today .today-day-chip { padding-top: 1px; }
@media (max-width: 380px) { .view-today .today-day { grid-template-columns: 28px 1fr; } .view-today .today-day-chip { grid-column: 2; padding-top: var(--s-2); } }
@media (min-width: 840px) {
  .view-today .today-day-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .view-today .today-day { grid-template-columns: 28px 1fr; }
  .view-today .today-day-chip { grid-column: 1 / -1; padding-top: var(--s-3); }
}

/* ── Compact hero (during) ───────────────────────────────────── */
.view-today .today-now-hero { padding-top: var(--s-1); padding-bottom: var(--s-5); border-bottom: 1px solid var(--line); }
.view-today .today-now-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); }
.view-today .today-now-text { min-width: 0; }
.view-today .today-now-eyebrow { font: 600 var(--fs-label)/var(--lh-label) var(--font-sans); letter-spacing: var(--track-section); text-transform: uppercase; color: var(--accent-text); margin-bottom: var(--s-2); }
.view-today .today-now-title { font-variant-numeric: lining-nums tabular-nums; }
.view-today .today-now-day { margin-top: var(--s-1); font: 500 var(--fs-title-3, 18px)/var(--lh-title-3, 24px) var(--font-serif); color: var(--text); }
.view-today .today-now-sub { font-style: italic; font-weight: 400; color: var(--text-2); }
.view-today .today-now-chip { flex-shrink: 0; padding-top: var(--s-6); }
.view-today .today-stamps { display: flex; flex-wrap: wrap; gap: 6px 5px; margin-top: var(--s-4); }
.view-today .today-stamps > span { display: inline-flex; }
.view-today .today-clocks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); margin-top: var(--s-4); }
.view-today .today-clock {
  display: flex; flex-direction: column; gap: 2px; padding: var(--s-2) var(--s-3);
  background: var(--surface-inset); border-radius: var(--r-2);
}
.view-today .today-clock-label { display: flex; align-items: center; gap: 6px; font: 600 var(--fs-micro)/var(--lh-micro) var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.view-today .today-clock-row { display: flex; align-items: center; gap: var(--s-2); color: var(--text-2); }
.view-today .today-clock-time { font: 600 20px/26px var(--font-sans); color: var(--text); font-variant-numeric: tabular-nums; }
@media (max-width: 420px) { .view-today .today-now-chip { padding-top: 0; } .view-today .today-now-head { flex-direction: column; gap: var(--s-3); } }

/* ── Next card ───────────────────────────────────────────────── */
.view-today .today-next-card { display: flex; flex-direction: column; gap: var(--s-2); }
.view-today .today-next-eyebrow { font: 600 var(--fs-label)/var(--lh-label) var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.view-today .today-next-head { display: flex; align-items: flex-start; gap: var(--s-2); }
.view-today .today-next-icon { flex-shrink: 0; margin-top: 3px; color: var(--text-2); }
.view-today .today-next-title { font: 500 var(--fs-title-2)/var(--lh-title-2) var(--font-serif); min-width: 0; }
.view-today .today-next-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s-1); font: 400 var(--fs-small)/var(--lh-small) var(--font-sans); color: var(--text-2); }
.view-today .today-next-note { font: 400 var(--fs-small)/var(--lh-small) var(--font-sans); color: var(--text-2); max-width: 62ch; }
.view-today .today-next-card .action-row { margin-top: var(--s-2); }
.view-today .today-then-wrap { margin-top: var(--s-2); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.view-today .today-then-label { font: 600 var(--fs-micro)/var(--lh-micro) var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: var(--s-1); }
/* The rows share one set of columns (subgrid): the when column is as wide as its longest entry ("Wed 25 Nov",
   "Tomorrow", "14:00"), so dates never run into the icons and the icons stay aligned down the list. */
.view-today .today-then-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: max-content 18px minmax(0, 1fr) auto; column-gap: var(--s-2);
}
.view-today .today-then {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 84px 18px minmax(0, 1fr) auto; grid-template-columns: subgrid;
  align-items: center; column-gap: var(--s-2);
  min-height: 36px; font: 400 var(--fs-small)/var(--lh-small) var(--font-sans);
}
.view-today .today-then-time { padding-right: var(--s-1); }
.view-today .today-then-icon { color: var(--text-3); }
.view-today .today-then-title { min-width: 0; color: var(--text); }
.view-today .today-then-rel { color: var(--text-3); font-size: var(--fs-caption); white-space: nowrap; }

/* ── Tonight ─────────────────────────────────────────────────── */
.view-today .today-tonight-card { display: flex; flex-direction: column; gap: var(--s-2); }
.view-today .today-tonight-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.view-today .today-tonight-eyebrow { display: inline-flex; align-items: center; gap: 6px; font: 600 var(--fs-label)/var(--lh-label) var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.view-today .today-tonight-name { font: 500 24px/28px var(--font-serif); color: var(--text); text-decoration: none; }
.view-today a.today-tonight-name:hover { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.view-today .today-tonight-ja { font-size: 15px; color: var(--text-2); margin-top: calc(-1 * var(--s-1)); }
.view-today .today-tonight-check { font: 500 var(--fs-small)/var(--lh-small) var(--font-sans); color: var(--text-2); }
.view-today .today-tonight-card .action-row { margin-top: var(--s-1); }

/* ── Today's plan (condensed) ────────────────────────────────── */
.view-today .today-plan-list { list-style: none; margin: 0; padding: 0; }
.view-today .today-plan-row { border-top: 1px solid var(--line); }
.view-today .today-plan-row:first-child { border-top: 0; }
.view-today .today-plan-hit {
  display: grid; grid-template-columns: 64px 20px 1fr; align-items: center; column-gap: var(--s-2);
  width: 100%; min-height: var(--tap-min); padding: var(--s-2) 0; text-align: left;
  font: 400 15px/20px var(--font-sans); color: var(--text); background: none; border: 0;
}
button.today-plan-hit { cursor: pointer; }
.view-today button.today-plan-hit .today-plan-title { text-decoration: underline dotted var(--text-3); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.view-today .today-plan-icon { color: var(--text-2); }
.view-today .today-plan-title { min-width: 0; }
.view-today .today-plan-time { font-size: var(--fs-small); }
.view-today .today-plan-row.is-past .today-plan-hit,
.view-today .today-plan-row.is-past .today-plan-icon,
.view-today .today-plan-row.is-past .time { color: var(--text-3); }
.view-today .today-plan-row.is-past .time-hard { text-decoration-color: var(--line-strong); }
.view-today .today-nowline { display: flex; align-items: center; gap: var(--s-2); height: 0; position: relative; z-index: 1; }
.view-today .today-nowline-pill {
  padding: 1px 5px; border-radius: var(--r-1); background: var(--accent); color: var(--on-accent);
  font: 600 var(--fs-label)/16px var(--font-sans); font-variant-numeric: tabular-nums;
}
.view-today .today-nowline-rule { flex: 1; height: 1px; background: var(--accent); }

/* ── After ───────────────────────────────────────────────────── */
.view-today .today-after { padding-top: var(--s-6); text-align: left; }
.view-today .today-after-ja { font: 600 32px/40px var(--font-mincho); color: var(--text); letter-spacing: .06em; }
.view-today .today-after-title { margin-top: var(--s-1); }
.view-today .today-after-lede { margin-top: var(--s-2); font: italic 400 17px/24px var(--font-serif); color: var(--text-2); }
.view-today .today-stamps-after { gap: var(--s-2); margin-top: var(--s-5); }
.view-today .today-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.view-today .today-stat { display: flex; flex-direction: column; gap: 2px; padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.view-today .today-stat-num { font: 500 40px/44px var(--font-serif); font-variant-numeric: lining-nums tabular-nums; }
.view-today .today-stat-label { font: 500 var(--fs-caption)/var(--lh-caption) var(--font-sans); color: var(--text-2); }
@media (min-width: 600px) { .view-today .today-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.view-today .today-book-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: var(--s-3); }
.view-today .today-book-item { display: flex; flex-direction: column; align-items: center; gap: var(--s-2); width: 100%; padding: var(--s-2); background: none; border: 0; color: var(--text); text-align: center; cursor: pointer; }
.view-today .today-book-name { font: 400 var(--fs-caption)/var(--lh-caption) var(--font-sans); }

/* ── First reveal (once per session) ─────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .view-today.is-revealing > * { animation: today-rise 280ms var(--ease-out) both; }
  .view-today.is-revealing > :nth-child(2) { animation-delay: 40ms; }
  .view-today.is-revealing > :nth-child(3) { animation-delay: 80ms; }
  .view-today.is-revealing > :nth-child(4) { animation-delay: 120ms; }
  .view-today.is-revealing > :nth-child(n+5) { animation-delay: 160ms; }
}
@keyframes today-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Stamp row: on phones the whole trip does not fit one line — split it into two even rows instead of 19 + 6. */
@media (max-width: 599px) {
  .view-today .today-now-hero .today-stamps {
    display: grid; grid-template-columns: repeat(var(--half, 13), auto); justify-content: space-between; gap: 8px 0;
  }
}

/* ── P3 integration: weather/daylight chips in the hero, next-bus line in the Next card ── */
.view-today .today-hero-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.view-today .today-next-bus {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s-1);
  margin: var(--s-2) 0 0; padding-top: var(--s-2); border-top: 1px solid var(--line);
  font: 400 var(--fs-small)/var(--lh-small) var(--font-sans); color: var(--text);
}
.view-today .today-bus-glyph { color: var(--text-3); margin-right: var(--s-1); }
.view-today .today-bus-last { font: 600 var(--fs-micro)/1 var(--font-sans); letter-spacing: 0.08em; margin-left: var(--s-1); }

/* Season strip in the day's header (features/season-ui.js): rides on the chips line, centred on the pills. */
.view-today .today-hero-chips { align-items: center; }
.view-today .today-hero-chips .today-season { margin: -6px 0; }

/* On a walk day the hike card holds "you are here": the Next card loses its shu frame and its shu eyebrow. */
.view-today .today-next.is-quiet .today-next-eyebrow { color: var(--text-3); }
