/* ob-today-done.css (V2-T8): Done for you (#ob-receipts) and Later (#ob-later).
   Tokens --ob3-* only, no colour literal. Loaded after ob-today.css, which owns the grid,
   .ob-rail-label, .ob-count and .ob-muted. Boards: TodayReceipts*, TodayBriefStates*, TodayV2Phone*. */

/* ── Done for you: the strip ─────────────────────────────────────────────── */
.ob-dfy {
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px 14px; border-radius: var(--ob3-radius-card); background: var(--ob3-sunk);
}
.ob-dfy-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ob-dfy-tick { flex: 0 0 auto; display: inline-flex; color: var(--ob3-good); }
.ob-dfy-title {
  flex: 1 1 0; min-width: 0; font-size: var(--ob3-text-body); font-weight: var(--ob3-weight-semibold);
  line-height: 1.3; color: var(--ob3-ink);
}
.ob-dfy[data-state="empty"] .ob-dfy-title,
.ob-dfy[data-state="unknown"] .ob-dfy-title { font-size: var(--ob3-text-body-sm); font-weight: var(--ob3-weight-medium); color: var(--ob3-muted); }
.ob-dfy[data-state="empty"] .ob-dfy-tick,
.ob-dfy[data-state="unknown"] .ob-dfy-tick { color: var(--ob3-muted); }
.ob-dfy-btn {
  flex: 0 0 auto; min-height: 44px; padding: 0 18px; border: 0; border-radius: var(--ob3-radius-full);
  background: var(--ob3-surface); color: var(--ob3-ink); cursor: pointer;
  font: inherit; font-size: var(--ob3-text-body-sm); font-weight: var(--ob3-weight-semibold);
}
.ob-dfy-btn:hover { background: var(--ob3-card); }
.ob-dfy-btn:focus-visible, .ob-dfy-more:focus-visible, .ob-lrow-head:focus-visible {
  outline: var(--ob3-focus-ring); outline-offset: var(--ob3-focus-offset);
}
.ob-dfy-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.ob-dfy-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; box-sizing: border-box;
  border-radius: var(--ob3-radius-full); background: var(--ob3-surface); border: 1px solid var(--ob3-line);
  font-size: var(--ob3-text-meta); font-weight: var(--ob3-weight-semibold); color: var(--ob3-ink); white-space: nowrap;
}
.ob-dfy-chip.is-amber { background: var(--ob3-attention-tint); border-color: transparent; color: var(--ob3-attention); }

.ob-dfy-list { display: flex; flex-direction: column; gap: 10px; }
.ob-dfy-grp { display: flex; flex-direction: column; gap: 2px; }
.ob-dfy-grp-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 20px;
  font-size: var(--ob3-text-label); line-height: var(--ob3-leading-label); font-weight: var(--ob3-weight-semibold);
  letter-spacing: var(--ob3-tracking-label); text-transform: uppercase; color: var(--ob3-muted);
}
.ob-dfy-warn {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: var(--ob3-radius-full);
  background: var(--ob3-attention-tint); color: var(--ob3-attention);
  letter-spacing: 0; text-transform: none; font-size: var(--ob3-text-label);
}
.ob-dfy-row {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 4px 0;
  border-bottom: 1px solid var(--ob3-line); color: var(--ob3-ink);
}
.ob-dfy-grp .ob-dfy-row:last-of-type { border-bottom: 0; }
.ob-dfy-ico, .ob-lrow-ico {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: var(--ob3-radius-control);
  display: flex; align-items: center; justify-content: center;
  background: var(--ob3-sunk-deep); color: var(--ob3-muted);
}
.ob-dfy-row[data-tone="note"] .ob-dfy-ico, .ob-dfy-row[data-tone="memory"] .ob-dfy-ico,
.ob-lrow-ico[data-tone="capture"] { background: var(--ob3-capture-tint); color: var(--ob3-capture); }
.ob-dfy-row[data-tone="goal_step"] .ob-dfy-ico, .ob-lrow-ico[data-tone="accent"] { background: var(--ob3-accent-tint); color: var(--ob3-on-accent-tint); }
.ob-dfy-row[data-tone="calendar_created"] .ob-dfy-ico, .ob-lrow-ico[data-tone="attention"] { background: var(--ob3-attention-tint); color: var(--ob3-attention); }
.ob-dfy-row[data-tone="routine_dossier"] .ob-dfy-ico, .ob-lrow-ico[data-tone="saarthi"] { background: var(--ob3-saarthi-tint); color: var(--ob3-saarthi); }
.ob-lrow-ico[data-tone="money"] { background: var(--ob3-money-tint); color: var(--ob3-money); }
.ob-dfy-txt { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.ob-dfy-name, .ob-dfy-dest, .ob-lrow-title, .ob-lrow-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ob-dfy-name { font-size: var(--ob3-text-body-sm); line-height: 19px; font-weight: var(--ob3-weight-semibold); }
.ob-dfy-dest, .ob-dfy-time, .ob-dfy-note { font-size: var(--ob3-text-meta); line-height: var(--ob3-leading-meta); color: var(--ob3-muted); }
.ob-dfy-time { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.ob-dfy-more {
  align-self: flex-start; min-height: 44px; padding: 0 4px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: var(--ob3-text-meta); font-weight: var(--ob3-weight-semibold); color: var(--ob3-accent-text);
}
.ob-dfy-more:hover { text-decoration: underline; }
.ob-dfy-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ── Later: the rows ─────────────────────────────────────────────────────── */
#ob-later-body { display: flex; flex-direction: column; gap: 8px; }
.ob-lrow { display: block; }
.ob-lrow[hidden] { display: none !important; }
.ob-lrow-head {
  display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; min-height: 56px;
  padding: 10px 12px; border-radius: var(--ob3-radius-control); border: 1px solid var(--ob3-line);
  background: var(--ob3-surface); color: var(--ob3-ink); text-align: left; text-decoration: none; cursor: pointer;
  font: inherit;
}
.ob-lrow-head:hover { border-color: var(--ob3-line-strong); }
.ob-lrow-txt { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.ob-lrow-title { font-size: var(--ob3-text-body-sm); font-weight: var(--ob3-weight-semibold); line-height: 19px; }
.ob-lrow-sub { font-size: var(--ob3-text-meta); line-height: var(--ob3-leading-meta); color: var(--ob3-muted); }
.ob-lrow-sub:empty { display: none; }
.ob-lrow-chev { flex: 0 0 auto; display: inline-flex; color: var(--ob3-faint); transition: transform var(--ob3-dur-short) var(--ob3-ease); }
.ob-lrow.is-open .ob-lrow-chev { transform: rotate(180deg); }
.ob-lrow-body {
  margin-top: 6px; padding: 12px; border-radius: var(--ob3-radius-control);
  border: 1px solid var(--ob3-line); background: var(--ob3-surface);
}
.ob-lrow-body[hidden] { display: none; }
.ob-lrow-letter { white-space: pre-wrap; line-height: 1.5; font-size: var(--ob3-text-body-sm); color: var(--ob3-ink); }
/* The moved API-spend tile sits inside the row body, not in a second card. */
.ob-lrow-body #ob-cost-tile { border: 0; padding: 0; background: none; box-shadow: none; }
.ob-lrow-body .ob-read-shelf { grid-template-columns: 1fr; }
.ob-lrow-body .ob-today-card { margin: 0; }

@media (max-width: 899px) {
  .ob-lrow-head { min-height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .ob-lrow-chev { transition: none; }
}

/* Defeat the legacy button and anchor resets (legacy-wrap.css `body.obds-app button`, theme.css
   `a { color }`), which are !important, the same way ob-today.css does for .ob-chip. */
body.obds-app .ob-today .ob-dfy-btn {
  background: var(--ob3-surface) !important; color: var(--ob3-ink) !important; border: 0 !important;
  border-radius: var(--ob3-radius-full) !important; padding: 0 18px !important; font-size: var(--ob3-text-body-sm) !important;
  font-weight: var(--ob3-weight-semibold) !important;
}
body.obds-app .ob-today .ob-dfy-more {
  background: none !important; color: var(--ob3-accent-text) !important; border: 0 !important;
  border-radius: 0 !important; padding: 0 4px !important; font-size: var(--ob3-text-meta) !important;
  font-weight: var(--ob3-weight-semibold) !important;
}
body.obds-app .ob-today .ob-lrow-head,
body.obds-app .ob-today a.ob-lrow-head {
  background: var(--ob3-surface) !important; color: var(--ob3-ink) !important;
  border: 1px solid var(--ob3-line) !important; border-radius: var(--ob3-radius-control) !important;
  padding: 10px 12px !important; font-size: var(--ob3-text-body-sm) !important; font-weight: var(--ob3-weight-regular) !important;
}
body.obds-app .ob-today .ob-lrow-head:hover { border-color: var(--ob3-line-strong) !important; }

.ob-dfy-reassure { margin: var(--ob3-space-2) 0 0; font-size: var(--ob3-text-meta); line-height: var(--ob3-leading-meta); color: var(--ob3-muted); }

/* ═════════════════════════════════════════════════════════════════════════════
   R5-T9: Done for you and Later to the boards.
   ═════════════════════════════════════════════════════════════════════════════ */
.ob-dfy-title { font-size: 14px; }
.ob-lrow-ico { width: 40px; height: 40px; }
#ob-later-body { gap: var(--ob3-space-3); }


/* 30 Oct 2026 (TodayStreamPhone, TodayV2Tablet's row): at EVERY width Later is ONE collapsed row ("Later · N", the row names under it) until it opens. */
#ob-later[hidden] { display: none; }
#ob-later > .ob-rail-label { display: none; }
body.obds-app .ob-today .ob-later-group { display: flex; }
#ob-later:not(.is-group-open) > #ob-later-body { display: none; }
#ob-later.is-group-open > #ob-later-body { margin-top: var(--ob3-space-2); }
#ob-later.is-group-open .ob-later-group .ob-lrow-chev { transform: rotate(180deg); }
/* The Voices-to-name strip is a row of the same family inside Later. */
#ob-later-body > #ob-voices-strip { margin-top: 0; }
#ob-later-body > #ob-voices-strip .obvs-card { min-height: 56px; border-radius: var(--ob3-radius-control); border: 1px solid var(--ob3-line); background: var(--ob3-surface); }
/* Done for you: the "Handled for you today" counts line (moved here from Needs you). */
.ob-dfy-handled { margin: var(--ob3-space-2) 0 0; font-size: var(--ob3-text-meta); line-height: var(--ob3-leading-meta); color: var(--ob3-muted); }
@media (prefers-reduced-motion: reduce) { .ob-later-group .ob-lrow-chev { transition: none; } }

/* Desktop: hold the room the strip takes until its read lands, so Later does not drop under the reader. */
@media (min-width: 1280px) { #ob-receipts-body:empty { min-height: 178px; } }

/* ═════════════════════════════════════════════════════════════════════════════
   T-TODAY-HIG (30 Oct 2026): the Apple restyle, Today-scoped, existing tokens only.
   One focus (Your day card), one secondary (Needs you), the rest quiet. Sections are INSET GROUPED LISTS: one rounded group
   (radius 20 = --ob3-radius-card), 16 px insets, hairline separators, chevron = opens, trailing value = status. Inner shapes are
   concentric (group 20 - inset 8 = 12 = --ob3-radius-control). Three weights only (400 / 600 plus 700 aliased to 600 below).
   Today-scoped aliases: --ob3-today-group-radius, --ob3-today-inset, --ob3-today-hairline; --ob3-weight-bold/medium re-pointed
   inside .ob-today only (global tokens untouched); the tokens and the row anatomy live in ob-today.css (T-VISUAL-TODAY), Needs you's
   group in ob-today-needs.css and the plan's in ob-goals-plan.css.
   ═════════════════════════════════════════════════════════════════════════════ */
.ob-today .ob-rail-label { font-weight: var(--ob3-weight-semibold); }

/* Primary: the Your day card. Larger line, 20 px inset, the one elevated surface (light: soft shadow; dark: the tint is the lift). */
body.obds-app .ob-today .obd-today { padding: var(--ob3-space-5); border-radius: 24px; box-shadow: var(--obds-shadow-soft); }
/* Owner board 31 Oct 2026 (review): a lighter card: an 18 px sans headline, the Full brief and Plan links on the label row. */
body.obds-app .ob-today .obd-today-line { font-family: inherit; font-size: 18px; line-height: 24px; font-weight: var(--ob3-weight-semibold); margin-bottom: 0; }
body.obds-app .ob-today .obd-today-head > .obd-today-eyebrow { flex: 1 1 auto; min-width: 0; }
body.obds-app .ob-today .obd-today-head > .obd-today-links { flex: 0 0 auto; display: inline-flex; gap: var(--ob3-space-3); }
body.obds-app .ob-today .obd-today-foot[hidden] { display: none; }
/* Its foot is one 20 px line; the Full brief and Plan links keep 44 px hit areas that overhang it. */
body.obds-app .ob-today .obd-today-foot { min-height: 20px; }
body.obds-app .ob-today .obd-today-brief, body.obds-app .ob-today .obd-today-plan { margin: -12px 0; }
@media (max-width: 899.98px) {
  body.obds-app .ob-today .obd-today { padding: var(--ob3-space-4); }
}

/* Quiet: Done for you is one group on the surface (not a second tint), chips lose their border. T-VISUAL-TODAY: the Today row
   anatomy (ob-today.css): the tick in the 32 px leading slot, the title at the row text edge, Show as the trailing 32 px pill; the
   chips and the reassurance line start on the text edge too. */
.ob-today .ob-dfy { gap: 6px; padding: 10px var(--ob-row-pad); border-radius: var(--ob3-today-group-radius); background: var(--ob3-surface); }
.ob-today .ob-dfy-head { gap: var(--ob-row-gap); min-height: 32px; }
.ob-today .ob-dfy-tick { width: var(--ob-row-lead); justify-content: center; }
.ob-today .ob-dfy-tags, .ob-today .ob-dfy-reassure, .ob-today .ob-dfy-list { margin-left: calc(var(--ob-row-lead) + var(--ob-row-gap)); }
.ob-today .ob-dfy-reassure { margin-top: 0; }
body.obds-app .ob-today .ob-dfy-btn { position: relative; height: 32px !important; min-height: 32px !important; margin: 0 !important; padding: 0 14px !important; font-size: 13px !important; }
.ob-today .ob-dfy-btn::before { content: ""; position: absolute; inset: -6px -2px; }
.ob-today .ob-dfy-handled { margin-top: 0; }
.ob-today .ob-dfy-chip { border: 0; background: var(--ob3-sunk); }
.ob-today .ob-dfy-chip.is-amber { background: var(--ob3-attention-tint); }
body.obds-app .ob-today .ob-dfy-btn { background: var(--ob3-sunk) !important; }

/* Quiet: the vital tiles lose their hairline border (the surface layer is the edge). */
body.obds-app .ob-today a.ob-tile { border-color: transparent; }
body.obds-app .ob-today a.ob-tile:hover { border-color: var(--ob3-line-strong); }

/* Later: the toggle row is a group of one row; opened, its rows are ONE group with hairlines (chevron = opens). */
body.obds-app .ob-today .ob-later-group.ob-lrow-head,
body.obds-app .ob-today #ob-later-body {
  border: 0 !important; border-radius: var(--ob3-today-group-radius) !important; background: var(--ob3-surface) !important;
  padding: 10px var(--ob-row-pad) !important;
}
body.obds-app .ob-today #ob-later-body { padding: 0 !important; overflow: hidden; gap: 0; }
body.obds-app .ob-today #ob-later-body .ob-lrow-head {
  border: 0 !important; border-radius: 0 !important; background: transparent !important; padding: 10px var(--ob-row-pad) !important;
}
/* The Later rows keep the Today row anatomy: a 32 px icon tile in the leading slot, the text 56 px in. */
.ob-today .ob-lrow-head { gap: var(--ob-row-gap); min-height: var(--ob-row-min); }
.ob-today .ob-lrow-ico { width: var(--ob-row-lead); height: var(--ob-row-lead); border-radius: 10px; }
.ob-today #ob-later-body > .ob-lrow + .ob-lrow, .ob-today #ob-later-body > * + * { border-top: 1px solid var(--ob3-today-hairline); }
.ob-today #ob-later-body .ob-lrow-body { margin-top: 0; border: 0; border-radius: 0; background: var(--ob3-sunk); padding: var(--ob3-today-inset); }
.ob-today #ob-later-body > #ob-voices-strip .obvs-card { border: 0; border-radius: 0; background: transparent; padding-left: var(--ob3-today-inset); padding-right: var(--ob3-today-inset); }
.ob-today #ob-later.is-group-open > #ob-later-body { margin-top: var(--ob3-space-2); }
.ob-today .ob-lrow-ico { border-radius: var(--ob3-radius-control); }

/* T-TODAY-44 (30 Oct 2026): 44 px hit areas at pointer widths. Real min-height with an equal negative margin, so each row keeps
   its visual size and the column keeps its height; the hover background grows by 4 px, nothing else moves. */
@media (min-width: 900px) {
  body.obds-app .ob-today .ob-today-grid a.ob-dial-link { min-height: 44px; margin-top: -4px; margin-bottom: -4px; box-sizing: border-box; }
}
/* The card head's link: a 44 px hit area over a 16 px line at every width (no taller head on the phone). */
body.obds-app .ob-today .ob-today-grid a.ob-day-open { position: relative; min-height: 20px; }
body.obds-app .ob-today .ob-today-grid a.ob-day-open::after { content: ""; position: absolute; inset: -12px -4px; }
/* A column under 300 px (font scale 2): Done for you stacks too: the title takes its line, Show wraps under it, the chips start at the edge. */
@container obcol (max-width: 300px) {
  .ob-today .ob-dfy-head { flex-wrap: wrap; }
  .ob-today .ob-dfy-title { flex-basis: calc(100% - var(--ob-row-lead) - var(--ob-row-gap)); }
  .ob-today .ob-dfy-tags, .ob-today .ob-dfy-reassure, .ob-today .ob-dfy-list { margin-left: 0; }
  .ob-today .ob-lrow-ico { display: none; }
}

/* t6514 (alerts v2): the Kept back row, the Kept back list and This morning (ob-today-alerts-v2.js). Rows reuse the Later row look. */
.ob-kept-back-row { margin-top: 8px; }
.ob-kept-list { display: flex; flex-direction: column; border-radius: 16px; background: var(--ob3-surface, #fffdf8); overflow: hidden; }
.ob-kept-row { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 16px; border: 0; border-top: 1px solid var(--ob3-line, #eadfce); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ob-kept-list > .ob-kept-row:first-child, .ob-kept-hour + .ob-kept-row { border-top: 0; }
.ob-kept-row:focus-visible, .ob-kept-more:focus-visible { outline: 2px solid var(--ob3-accent, #b3205a); outline-offset: -2px; }
.ob-kept-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ob-kept-title { font-weight: 600; }
.ob-kept-time, .ob-panel-sub { color: var(--ob3-muted, #6b6258); font-size: 13px; }
.ob-kept-tag { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--ob3-sunk, #f1e8da); color: var(--ob3-muted, #6b6258); white-space: nowrap; }
.ob-kept-tag[data-reason="quiet_hours"] { background: var(--ob3-attention-tint, #f6e6c8); color: var(--ob3-attention, #8a5a00); }
.ob-kept-chev { color: var(--ob3-muted, #6b6258); }
.ob-kept-hour { margin: 12px 4px 4px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ob3-muted, #6b6258); }
.ob-kept-more { min-height: 48px; width: 100%; border: 0; border-top: 1px solid var(--ob3-line, #eadfce); background: transparent; color: var(--ob3-accent-text, #b3205a); font: inherit; font-weight: 600; cursor: pointer; }
.ob-kept-empty { padding: 20px 16px; border-radius: 16px; background: var(--ob3-surface, #fffdf8); }
.ob-kept-empty-title { margin: 0; font-weight: 600; } .ob-kept-empty-body { margin: 4px 0 0; color: var(--ob3-muted, #6b6258); }
.ob-no-longer-open, .ob-strip.is-failed { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--ob3-attention-tint, #f6e6c8); color: var(--ob3-attention, #8a5a00); font-weight: 600; }
.ob-strip-text { flex: 1; }
.is-focused { outline: 2px solid var(--ob3-accent, #b3205a); border-radius: 14px; }
