/* Today (Ember Loop spec 5.1, 5.13; amendment A3): header, Mine/Team and rep chips, the Today · Missed · Upcoming ·
   Someday segments, the Next-up hero, grouped rows, personal to-dos, the rail, Compare & assign and the to-do sheet.
   Colours come only from tokens.css. Overdue is said by the signal text in its tone plus a small danger dot, never a
   coloured side stripe (craft floor; DESIGN.md No-Stripe Rule). Breakpoints: phone <=767px, tablet 768-1099px. */

.today{width:min(1180px,100%);margin:0 auto;padding:4px 0 32px}

/* ---------- header ---------- */
.t-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px 24px;flex-wrap:wrap}
.t-head-main{min-width:0}
.t-title{margin:4px 0 0;font:400 30px/38px var(--font-display);letter-spacing:-.01em;color:var(--text-strong)}
.t-title-short{display:none}
.t-summary{display:flex;flex-wrap:wrap;align-items:center;margin:6px 0 0;font:400 13px/18px var(--font);color:var(--muted)}
.t-summary-phone{display:none}
.t-sep{margin:0 6px;color:var(--hint)}
.t-sum-link{display:inline-flex;align-items:center;min-height:24px;padding:0;border:0;background:none;font:600 13px/18px var(--font);cursor:pointer;text-decoration:underline;text-decoration-color:transparent;text-underline-offset:3px;transition:text-decoration-color var(--dur-quick) ease}
.t-sum-link:hover{text-decoration-color:currentColor}
.t-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.t-add-todo .icon{color:var(--accent-icon)}

/* rep chips (Team scope): overdue + today per rep; tapping one filters the day to that rep */
.t-reps{display:flex;gap:8px;margin:14px 0 0;padding:2px 0;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}
.t-reps::-webkit-scrollbar{display:none}
.t-reps .chip{flex:none;gap:6px;padding-left:10px}
.t-reps .chip .tnum{color:var(--text-2);font-weight:600}
.t-reps .chip[aria-pressed="true"] .tnum{color:inherit}
.t-rep .avatar{margin:-4px 0 -4px -4px}

/* segments: a segmented control directly under the header */
.t-segments{margin:18px 0 0}
.t-segments.seg{display:inline-flex}
.t-segments .seg-btn{font-variant-numeric:tabular-nums}

/* ---------- layout: the queue (max 760) and a 340 rail, 32 apart ---------- */
.t-grid{display:grid;grid-template-columns:minmax(0,760px) 340px;justify-content:center;gap:32px;margin-top:20px;align-items:start}
.t-queue{display:flex;flex-direction:column;gap:24px;min-width:0}
.today>.banner{margin-top:16px}

/* ---------- Next-up hero ---------- */
.t-hero{display:flex;flex-direction:column;gap:6px;min-height:148px;padding:18px 20px;border-color:var(--accent-border);box-shadow:var(--glow-ember);box-sizing:border-box}
/* Customers late on WhatsApp above it: the hero gives up its ember (one place to act at a time) */
.t-hero.is-yielding{border-color:var(--hairline);box-shadow:var(--shadow-card)}
.t-hero.is-yielding .t-hero-top .eyebrow{color:var(--text-2)}
.t-hero:focus{outline:none}
.t-hero:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}
.t-hero-top{display:flex;align-items:center;flex-wrap:wrap;gap:6px 8px}
.t-hero-top .eyebrow{flex:none;margin-right:2px;white-space:nowrap}
.t-hero-top .due-chip{font-size:12px}
.t-due-short{display:none}
.t-hero-name{margin:2px 0 0;font:400 22px/28px var(--font-display);letter-spacing:-.005em;color:var(--text-strong)}
.t-hero-open{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-width:100%;margin:0;padding:0;border:0;border-radius:var(--r-xs);background:none;color:inherit;font:inherit;text-align:left;cursor:pointer;overflow-wrap:anywhere}
.t-hero-open:hover{color:var(--accent-text-hover)}
.t-hero-meta{display:flex;align-items:center;flex-wrap:wrap;margin:0;font:400 13px/18px var(--font);color:var(--muted)}
.t-hero-meta .t-sep{margin:0 6px}
.t-copy.btn-icon{width:28px;height:28px;margin:-6px 0 -6px 2px;color:var(--muted)}
.t-hero-why{margin:4px 0 0;font:500 14px/20px var(--font);color:var(--text-2)}
.t-hero-last{margin:0;font:400 13px/18px var(--font);color:var(--muted);overflow-wrap:anywhere}
.t-hero-last:empty{display:none}
.t-last-skel{display:block;width:70%;height:12px}
.t-hero-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:10px}
.t-hero-actions .btn{min-height:44px}
/* Ember Means Act: one primary per hero. Desktop: Log call (reps dial from their phones);
   phone: Call (see the 767px block). */
.t-hero-log{background:var(--accent);color:var(--on-accent);border-color:transparent;font-weight:600;box-shadow:var(--glow-accent)}
.t-hero-log:hover:not(:disabled){background:var(--accent-hover);color:var(--on-accent);border-color:transparent}
.t-hero-log:active:not(:disabled){background:var(--accent-active)}
.t-hero-number{color:var(--muted);font-weight:400}
.t-hero-wa .icon,.t-wa .icon{color:var(--whatsapp-text)}
.t-hero-actions .btn-icon{width:44px;height:44px}

/* ---------- New on WhatsApp: reply in 15 min (above the segments, on every one) ----------
   One card holding the waiting chats, most urgent first, as divided list items (line-soft separators, no border or
   radius of their own: cards never nest inside cards). Urgency is said by the clock pill (its words and tone, and the
   due dot once late), never a side stripe or a pulsing row (No-Stripe Rule). WhatsApp green stays on the WhatsApp
   action and the small mark only; the badge red stays on the tab; Replied is a quiet check (it stops the clock and the
   manager's alert, so it must not look like the action to take over Call and WhatsApp). */
.t-waq{display:flex;flex-direction:column;gap:12px;margin:16px 0 0;padding:14px 14px 12px 16px;border:1px solid var(--hairline);border-radius:var(--r-lg);background:var(--surface-sheen),var(--surface);box-shadow:var(--shadow-card)}
.t-waq.has-late{border-color:var(--danger)}
.t-waq.is-quiet{gap:6px;padding-block:10px;box-shadow:none;background:transparent}
.t-wa-head{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:4px 16px}
.t-wa-title{display:flex;align-items:baseline;flex-wrap:wrap;gap:0 8px;margin:0;font:600 15px/20px var(--font);color:var(--text-strong)}
.t-wa-mark{align-self:center;display:inline-grid;place-items:center}
.t-wa-mark .icon{color:var(--whatsapp-text)}
.t-wa-sub{font:500 13px/18px var(--font);color:var(--text-2)}
.t-wa-title .t-group-count{margin-left:-8px;font:600 15px/20px var(--font);color:var(--text-2)}
.t-wa-meta{display:flex;align-items:center;margin:0;font:500 13px/18px var(--font);font-variant-numeric:tabular-nums;color:var(--muted)}
.t-wa-empty{margin:0;font:400 13px/18px var(--font);color:var(--muted)}
.t-wa-list{display:flex;flex-direction:column;gap:0}
/* .t-row.t-wa-row: the generic .t-row card rule comes later in this file, so the list item needs the two classes */
.t-row.t-wa-row{padding-inline:2px 0;border:0;border-radius:0;box-shadow:none;background:transparent}
.t-row.t-wa-row+.t-row.t-wa-row{border-top:1px solid var(--line-soft)}
.t-wa-tag{flex:none;font:600 11px/16px var(--font);color:var(--text-2)}
.t-wa-tag-phone,.t-wa-alerted,.t-wa-clock-short{display:none}
.t-wa-alerted{flex:none;margin-right:6px;font:600 12px/18px var(--font);color:var(--danger)}
.t-wa-clock{display:inline-flex;align-items:center;gap:6px;flex:none;margin-left:auto;padding:2px 8px;border-radius:var(--r-pill);font:600 12px/16px var(--font);font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--accent-text);background:var(--accent-tint-soft)}
.t-wa-clock.is-later{color:var(--text-2);background:var(--surface)}
.t-wa-clock.is-warn{color:var(--warn);background:var(--warn-tint)}
.t-wa-clock.is-late{color:var(--danger);background:var(--danger-tint)}
.t-wa-clock .due-dot{flex:none}
.t-wa-reason{display:block;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:400 13px/18px var(--font);color:var(--text-2)}
.t-wa-row .t-row-line2{flex-wrap:nowrap}
.t-wa-actions{display:flex;align-items:center;gap:6px;flex:none}
.t-wa-act .icon{color:var(--muted)}
.t-wa-act.t-wa-chat .icon{color:var(--whatsapp-text)}
.t-wa-act.t-replied .icon{color:var(--muted)}
.t-wa-folds{display:flex;flex-wrap:wrap;gap:4px 24px}
.t-wa-fold{min-width:0;flex:1 1 260px}
.t-wa-fold>summary{display:inline-flex;align-items:center;gap:6px;min-height:32px;list-style:none;cursor:pointer;font:500 13px/18px var(--font);color:var(--text-2)}
.t-wa-fold>summary::-webkit-details-marker{display:none}
.t-wa-fold>summary>.icon{transition:transform var(--dur-quick) ease;color:var(--muted)}
.t-wa-fold[open]>summary>.icon{transform:rotate(90deg)}
.t-wa-fold>summary:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px;border-radius:var(--r-xs)}
.t-wa-mini{display:flex;flex-direction:column;gap:2px;margin:4px 0 0;padding:0;list-style:none}
.t-wa-mini li{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:0 12px;min-height:40px;padding:2px 0 2px 22px}
.t-wa-mini-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:500 14px/20px var(--font);color:var(--text)}
.t-wa-mini-meta{grid-column:1;font:400 12px/16px var(--font);color:var(--muted)}
.t-wa-mini li .btn{grid-column:2;grid-row:1/span 2}
.t-wa-note{margin:4px 0 0 22px;font:400 12px/16px var(--font);color:var(--muted)}

/* ---------- groups ---------- */
.t-group{display:flex;flex-direction:column;gap:10px;min-width:0}
/* the group label (One Kicker Rule): sentence case, 600 12/16, in the group's tone; text-2 unless overdue or due today */
.t-group-h{display:flex;align-items:center;flex-wrap:wrap;gap:0;margin:0;font:600 12px/16px var(--font);color:var(--text-2)}
.t-group-h.tone-danger{color:var(--danger)}
.t-group-h.tone-accent{color:var(--accent-text)}
.t-group-h.tone-muted{color:var(--text-2)}
.t-group-count{font-variant-numeric:tabular-nums;white-space:pre}
.t-group-note{display:inline-flex;flex-wrap:wrap;gap:4px 10px;margin-left:12px;font:500 12px/16px var(--font);color:var(--muted)}
.t-rep-breakdown{display:inline-flex;flex-wrap:wrap;gap:4px 14px}
.t-rep-count{font-variant-numeric:tabular-nums;white-space:nowrap}
details.t-fold>summary{display:flex;min-height:36px;cursor:pointer;list-style:none;border-radius:var(--r-sm)}
details.t-fold>summary::-webkit-details-marker{display:none}
details.t-fold>summary>.icon{margin:0 4px 0 -2px;transition:transform var(--dur-quick) var(--ease-out-soft)}
details.t-fold[open]>summary>.icon{transform:rotate(90deg)}
details.t-fold>summary:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}
.t-list{display:flex;flex-direction:column;gap:8px;min-width:0}
.t-list:empty{display:none}
.t-more-rows{align-self:flex-start}
.t-seg-note{margin:0;font:400 13px/18px var(--font);color:var(--muted)}

/* "3 not ticked off from yesterday · Review" */
.t-missed-banner{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:10px 14px;border:1px solid color-mix(in srgb,var(--danger) 25%,transparent);border-radius:var(--r);background:var(--danger-tint);color:var(--text);font:500 14px/20px var(--font);text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:border-color var(--dur-quick) ease,transform var(--dur-press) var(--ease-out-soft)}
.t-missed-banner:hover{border-color:var(--danger)}
.t-missed-banner:active{transform:scale(.99)}
.t-missed-banner>.icon{color:var(--danger)}
.t-missed-review{margin-left:auto;color:var(--accent-text);font-weight:600}

/* ---------- a lead row: 64px surface, stage dot and tag, POC · due in its tone ---------- */
.t-row{display:flex;align-items:center;gap:12px;min-height:64px;padding:10px 10px 10px 16px;border:1px solid var(--hairline);border-radius:var(--r-lg);background:var(--surface-sheen),var(--surface);box-shadow:var(--shadow-card);box-sizing:border-box;cursor:pointer;content-visibility:auto;contain-intrinsic-size:auto 64px;transition:border-color var(--dur-quick) ease}
.t-row:hover{border-color:var(--line-strong)}
.t-row:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}
.t-row.is-hero{border-color:var(--accent-border)}
.t-row-main{display:flex;flex:1;flex-direction:column;gap:4px;min-width:0}
.t-row-line1{display:flex;align-items:center;gap:8px;min-width:0}
.t-row-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:500 15px/20px var(--font);color:var(--text-strong)}
.t-row-line1 .stage-tag,.t-row-line1 .avatar{flex:none}
/* a blank or punctuation-only company name: "Company name missing" in the hint tone, then the panel's warn tag */
.t-row-name.is-missing,.t-demo-name.is-missing{color:var(--hint);font-weight:400}
.t-hero-open.is-missing{color:var(--hint)}
.today .p-verify.name-verify{flex:none;align-self:flex-start;margin:0;white-space:nowrap}
.t-hero .name-verify{margin-top:2px}
.t-row-line2 .name-verify{margin-right:8px}
.t-row-line1>.icon{color:var(--accent-icon)}
.t-row-flag{flex:none;font:600 11px/16px var(--font);color:var(--accent-text)}
.t-avatars{display:inline-flex;flex:none}
.t-avatars .avatar+.avatar{margin-left:-6px;box-shadow:0 0 0 2px var(--surface)}
.t-row-line2{display:flex;align-items:center;flex-wrap:wrap;min-width:0;font:400 13px/18px var(--font);color:var(--muted)}
.t-row-line2 .t-sep{margin:0 6px}
.t-row-poc{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:60%}
.t-row-line2 .due{font-weight:500;font-variant-numeric:tabular-nums}
.t-row-actions{display:flex;align-items:center;gap:4px;flex:none}
.t-act.btn-icon{width:36px;height:36px}
a.t-act{text-decoration:none}
.t-log.btn{margin:0 2px}

/* ---------- a personal to-do: 44px checkbox, text, date chip, linked lead chip, ⋯ ---------- */
.t-todo{display:flex;align-items:center;gap:6px;min-height:56px;padding:4px 6px 4px 2px;border:1px solid var(--line-soft);border-radius:var(--r-lg);background:var(--well);box-sizing:border-box;content-visibility:auto;contain-intrinsic-size:auto 56px}
.t-check{display:grid;flex:none;place-items:center;width:44px;height:44px;cursor:pointer}
.t-check input{width:20px;height:20px;margin:0;accent-color:var(--accent);cursor:pointer}
.t-todo-main{display:flex;flex:1;flex-direction:column;gap:4px;min-width:0;padding:4px 0}
.t-todo-text{font:500 15px/20px var(--font);color:var(--text-strong);overflow-wrap:anywhere}
.t-todo.is-done .t-todo-text{color:var(--muted);text-decoration:line-through;text-decoration-color:var(--line-strong)}
.t-todo-meta{display:flex;align-items:center;flex-wrap:wrap;gap:6px 8px}
.t-todo-kind{font:500 11px/16px var(--font);color:var(--muted)}
.t-todo-lead{position:relative;display:inline-flex;align-items:center;gap:4px;max-width:100%;min-height:24px;padding:2px 10px 2px 8px;border:1px solid var(--line);border-radius:var(--r-pill);background:transparent;color:var(--text-2);font:500 12px/16px var(--font);cursor:pointer}
.t-todo-lead span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.t-todo-lead::after{content:"";position:absolute;inset:-10px -2px}
.t-todo-lead:hover{border-color:var(--line-strong);color:var(--text)}

/* ---------- empty states ---------- */
.t-empty{display:flex;flex-direction:column;align-items:center;gap:8px;padding:32px 20px;text-align:center}
.t-empty .empty-state-body{max-width:320px}
.t-empty-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:8px}

/* ---------- rail: stat tiles, demos in the next 7 days, updates ---------- */
.t-rail{position:sticky;top:0;display:flex;flex-direction:column;gap:16px;min-width:0}
.t-tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.t-tile{display:flex;flex-direction:column;gap:2px;min-width:0;padding:14px 16px;border:1px solid var(--hairline);border-radius:var(--r-lg);background:var(--surface-sheen),var(--surface);box-shadow:var(--shadow-card);color:var(--text);text-decoration:none;transition:border-color var(--dur-quick) ease,transform var(--dur-press) var(--ease-out-soft)}
.t-tile:hover{border-color:var(--line-strong);color:var(--text)}
.t-tile:active{transform:scale(.98)}
.t-tile-n{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:400 28px/34px var(--font-display);color:var(--text-strong)}
.t-tile-n.tone-danger{color:var(--danger)}
.t-tile-n.tone-accent{color:var(--accent-text)}
.t-tile-l{font:500 12px/16px var(--font);color:var(--muted)}
.t-rail-card{display:flex;flex-direction:column;gap:8px;padding:14px 16px}
.t-rail-empty{margin:0;font:400 13px/18px var(--font);color:var(--muted)}
/* Owner and managers: calendar invitations Google has not confirmed for more than 5 minutes (one row, links to Settings). */
.t-attention{display:flex;align-items:flex-start;gap:10px;margin:0 0 12px;padding:10px 12px;border:1px solid color-mix(in srgb,var(--warn) 35%,transparent);border-radius:var(--r);background:var(--warn-tint)}
.t-attention-icon{flex:none;color:var(--warn);margin-top:1px}
.t-attention-main{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1;font:400 13px/18px var(--font);color:var(--text-2);overflow-wrap:anywhere}
.t-attention-main strong{font-weight:600;color:var(--text-strong)}
.t-demos,.t-updates{display:flex;flex-direction:column;margin:0;padding:0;list-style:none}
.t-demo{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;padding:8px 0;border-top:1px solid var(--line-soft)}
.t-demo:first-child{border-top:0}
.t-demo-when{font:600 12px/16px var(--font);color:var(--accent-text);white-space:nowrap}
.t-demo-main{display:flex;flex-direction:column;min-width:0}
.t-demo-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:500 14px/20px var(--font);color:var(--text-strong)}
.t-demo-status{font:400 12px/16px var(--font);color:var(--muted)}
.t-demo-actions{display:flex;gap:4px}
.t-rail-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.t-rail-link{display:inline-flex;align-items:center;min-height:32px;padding:0 4px;font:500 12px/16px var(--font);color:var(--accent-text);text-decoration:none;border-radius:var(--r-xs)}
.t-rail-link:hover{color:var(--accent-text-hover);text-decoration:underline}
.t-demo-remind{display:inline-flex;align-items:center;gap:6px;align-self:flex-start;min-height:32px;margin-top:2px;padding:0;border:0;background:none;font:500 12px/16px var(--font);color:var(--whatsapp-text);cursor:pointer}
.t-demo-remind:hover:not(:disabled){text-decoration:underline}
.t-demo-remind:disabled{opacity:.4;cursor:progress}
@media (pointer:coarse){.t-rail-link,.t-demo-remind{min-height:44px}}
.t-update-btn{display:flex;align-items:center;gap:10px;width:100%;min-height:48px;padding:8px 6px;border:0;border-top:1px solid var(--line-soft);border-radius:0;background:transparent;color:var(--text);font:inherit;text-align:left;cursor:pointer}
.t-update:first-child .t-update-btn{border-top:0}
.t-update-btn:hover{background:var(--line-soft)}
.t-update-btn:focus-visible{outline:2px solid var(--focus-ring);outline-offset:-2px;border-radius:var(--r-sm)}
.t-update-btn>.icon{color:var(--muted)}
.t-update-dot{display:inline-block;flex:none;width:8px;height:8px}
.t-update-main{display:flex;flex:1;flex-direction:column;min-width:0}
.t-update-title{font:400 14px/20px var(--font);color:var(--text-2);overflow-wrap:anywhere}
.t-update.is-unread .t-update-title{font-weight:600;color:var(--text-strong)}
.t-update-when{font:400 12px/16px var(--font);color:var(--muted)}
.t-see-all{align-self:flex-start}
.today-sheet .t-updates-all .t-update-btn{padding-inline:4px}

/* ---------- first paint: the first rows fade up, 40ms apart (once) ---------- */
.today .fade-up{animation-duration:280ms}

/* ---------- Compare & assign: one column per lead (stacked on phone) ---------- */
.ui-sheet.compare-sheet:not([data-variant="bottom"]){width:min(880px,calc(100vw - 32px))}
.cmp-cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px;margin-top:12px}
.cmp-col{display:flex;flex-direction:column;gap:12px;min-width:0;padding:14px 16px}
.cmp-name{margin:0;font:400 18px/24px var(--font-display);color:var(--text-strong);overflow-wrap:anywhere}
.cmp-facts{display:flex;flex-direction:column;gap:8px;margin:0}
.cmp-fact{display:grid;grid-template-columns:104px minmax(0,1fr);gap:8px;align-items:baseline}
.cmp-fact dt{font:500 12px/16px var(--font);color:var(--muted)}
.cmp-fact dd{margin:0;font:500 14px/20px var(--font);color:var(--text-strong);overflow-wrap:anywhere}
.cmp-owner{display:inline-flex;align-items:center;gap:6px}
.cmp-phone{display:block}
.cmp-phone a{color:var(--text-strong)}
.cmp-keep{margin-top:auto}
.cmp-keep[hidden],#cmpAssign[hidden]{display:none}
.compare-sheet #cmpAction .seg-btn{white-space:normal;text-align:center}
.cmp-bookings{margin-top:8px}
.compare-sheet .cx-reason{margin-right:auto;font:400 13px/18px var(--font);color:var(--muted)}

/* ---------- the to-do sheet ---------- */
.todo-sheet .chip-row+.chip-row{margin-top:8px}
.todo-sheet .chip-row[hidden],.todo-sheet input[hidden],.todo-lead-search[hidden]{display:none}
.todo-sheet #todoPickDay,.todo-sheet #todoPickTime{margin-top:8px;max-width:220px}
.todo-lead-search{display:flex;flex-direction:column;gap:8px;margin-top:8px}

/* ---------- touch: 44px row actions ---------- */
@media (pointer:coarse){
 .t-act.btn-icon{width:44px;height:44px}
 .t-wa-actions .btn{min-height:44px}
 .t-wa-fold>summary{min-height:44px}
 .t-log.btn{min-height:44px}
 details.t-fold>summary{min-height:44px;align-items:center}
 .t-copy.btn-icon{width:36px;height:36px}
}

/* ---------- the floating mic + New lead column (56px + 24px from the right edge, cortex.css .fab-cluster) ----------
   Below ~1340px the grid reaches under that corner (the one-column queue at tablet, the rail on narrow desktop), so the
   grid keeps it clear: row actions, Compare & assign and rail links end left of the buttons, as they do at 1440. */
@media (max-width:1339px){
 .t-grid{padding-inline-end:calc(56px + 24px + env(safe-area-inset-right))}
}

/* ---------- tablet and narrow desktop: the rail follows the queue ---------- */
@media (max-width:1099px){
 .t-grid{grid-template-columns:minmax(0,1fr)}
 .t-rail{position:static;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
 .t-tiles{grid-column:1/-1;grid-template-columns:repeat(4,minmax(0,1fr))}
}

/* ---------- phone (<=767): date and counts on one line, full-width segments, the hero's Call above the fold ---------- */
@media (max-width:767px){
 .today{padding-top:0}
 .t-head{flex-wrap:nowrap;align-items:baseline;gap:12px}
 .t-head-main{display:flex;flex:1;align-items:baseline;justify-content:space-between;gap:12px;min-width:0}
 .t-eyebrow,.t-title-long,.t-summary,.t-add-todo,.t-refresh{display:none}
 .t-title{margin:0;font-size:20px;line-height:26px}
 .t-title-short{display:inline}
 .t-summary-phone{display:block;margin:0;font:600 13px/18px var(--font);font-variant-numeric:tabular-nums;white-space:nowrap}
 .t-tools{display:contents}
 .t-head .t-scope{order:3}
 .t-head{flex-wrap:wrap}
 .t-head .t-scope{flex:1 1 100%}
 .t-head .t-scope .seg{display:flex;width:100%}
 .t-reps{margin-top:10px;margin-inline:calc(-1 * max(16px,env(safe-area-inset-left))) calc(-1 * max(16px,env(safe-area-inset-right)));padding-inline:max(16px,env(safe-area-inset-left)) max(16px,env(safe-area-inset-right))}
 .t-segments{margin-top:8px}
 .t-segments.seg{display:flex;width:100%;padding:0;box-sizing:border-box}
 .t-segments .seg-btn{flex:1 1 auto;min-width:0;min-height:44px;padding:4px 6px;font-size:12px;letter-spacing:-.01em}
 .t-grid{gap:20px;padding-inline-end:0}
 .t-queue{gap:20px}
 .t-grid{margin-top:6px}
 .t-hero{min-height:0;padding:10px 14px 14px;gap:2px}
 .t-hero-top{flex-wrap:nowrap;min-width:0;height:20px;overflow:hidden}
 .t-hero-top .due-chip{flex:none}
 .t-hero-top .stage-tag{min-width:0;overflow:hidden;text-overflow:ellipsis}
 .t-due-long{display:none}
 .t-due-short{display:inline}
 .t-hero-name{margin:0;font-size:22px;line-height:26px}
 .t-hero-open{-webkit-line-clamp:1;display:block;white-space:nowrap;text-overflow:ellipsis}
 .t-copy.btn-icon{display:none}
 .t-hero-actions{order:1;flex-wrap:nowrap;margin-top:6px}
 .t-hero-why,.t-hero-last{order:2}
 .t-hero-why{margin-top:6px;font-size:13px;line-height:18px}
 .t-hero-actions .btn,.t-hero-actions .btn-icon{min-height:48px;height:48px}
 .t-hero-call{order:-1;flex:2 1 0;min-width:0}
 /* Phone: Call is the single primary; with no number to call, Log keeps the primary role. */
 .t-hero-call:not(:disabled){background:var(--accent);color:var(--on-accent);border-color:transparent;font-weight:600;box-shadow:var(--glow-accent)}
 .t-hero-call:hover:not(:disabled){background:var(--accent-hover);color:var(--on-accent);border-color:transparent}
 .t-hero-call:active:not(:disabled){background:var(--accent-active)}
 .t-hero-call .t-hero-number{display:none}
 .t-hero-wa{width:48px;padding:0}
 .t-hero-wa span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
 .t-hero-log{flex:1 1 0;min-width:0;padding-inline:10px}
 .t-hero-actions:has(.t-hero-call:not(:disabled)) .t-hero-log{background:var(--surface-sheen),var(--surface);color:var(--text);border-color:var(--hairline);box-shadow:var(--shadow-card);font-weight:500}
 .t-hero-actions:has(.t-hero-call:not(:disabled)) .t-hero-log:hover:not(:disabled){background:var(--surface-sheen),var(--surface);color:var(--text-strong);border-color:var(--line-strong)}
 .t-hero-log .icon,.t-hero-log .t-hide-phone{display:none}
 .t-hero-actions .btn-icon{width:48px;flex:none}
 .t-row{flex-direction:column;align-items:stretch;gap:8px;padding:12px 12px 10px 14px;contain-intrinsic-size:auto 116px}
 .t-row-actions{gap:8px}
 .t-row-actions .t-act.btn-icon{width:44px;height:44px;border:1px solid var(--hairline);background:var(--well)}
 .t-row-actions .t-log.btn{flex:1 1 auto;min-height:44px;margin:0}
 .t-decision .t-row-actions .btn{flex:1 1 auto;min-height:44px}
 /* The queue on a phone: name and clock on the first line, the reason under it, then Call · WhatsApp · Replied as a
    3-up row of 44px buttons (More on the line's end). */
 .t-waq{margin-top:10px;padding:12px}
 .t-wa-head{flex-direction:column;align-items:flex-start;gap:2px}
 .t-wa-title{font-size:14px}
 .t-row.t-wa-row{padding:10px 0;contain-intrinsic-size:auto 140px}
 /* The reason may take two lines on a phone: the call time and the language lead it and must never be cut */
 .t-wa-reason{white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2}
 .t-wa-row .t-row-line2{align-items:flex-start}
 /* The name keeps at least 96px on line 1 (the only identifier an unnamed chat has): the tag moves to the start of
    line 2, the pill takes its short words ("Late 4m", "2:43 left") and "manager alerted" becomes line 2's prefix. */
 .t-wa-row .t-row-name{flex:1 1 auto;min-width:96px}
 .t-wa-tag-wide,.t-wa-clock-long{display:none}
 .t-wa-tag-phone{display:inline;margin-right:6px}
 .t-wa-alerted,.t-wa-clock-short{display:inline}
 .t-wa-actions{display:grid;grid-template-columns:repeat(3,auto) 44px;gap:6px}
 .t-wa-actions .btn{min-height:44px;padding-inline:4px;gap:4px;justify-content:center;min-width:0}
 /* Columns sized by their words ("WhatsApp" is the widest), the spare width shared: at 375px every icon and word fit;
    narrower phones clip a word with an ellipsis, never the row */
 .t-wa-actions .btn>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .t-wa-actions .t-act.btn-icon{width:44px;height:44px;border:1px solid var(--hairline);background:var(--well)}
 .t-rail{display:flex;align-items:stretch}
 .t-tiles{display:none}
 .t-demo{grid-template-columns:minmax(0,1fr) auto}
 .t-demo-when{grid-column:1/-1}
 .cmp-fact{grid-template-columns:96px minmax(0,1fr)}
}
/* ---------- tablet (768-1023): the phone's line 1 in the queue, so a long pill ("Late · 4 min · manager alerted")
   never squeezes the customer's name (the only identifier an unnamed chat has) ---------- */
@media (min-width:768px) and (max-width:1023px){
 .t-wa-row .t-row-name{flex:1 1 auto;min-width:96px}
 .t-wa-tag-wide,.t-wa-clock-long{display:none}
 .t-wa-tag-phone{display:inline;margin-right:6px}
 .t-wa-alerted,.t-wa-clock-short{display:inline}
}
@media (prefers-reduced-motion:reduce){
 details.t-fold>summary>.icon,.t-wa-fold>summary>.icon,.t-row,.t-tile,.t-missed-banner{transition:none}
 .today .fade-up{animation:none}
}
@media (forced-colors:active){
 .t-hero,.t-row,.t-todo,.t-tile,.t-waq{border:1px solid CanvasText}
 .t-wa-clock{border:1px solid CanvasText}
}
