/* Chat extras' cards (public/chat-extras.js; AGENTS gotcha 156): the count table, the election timeline, the header
   image, and the draft card's two buttons. The results card's frame (theme.css .res-card); the app's own buttons
   (app.css .card-btn: coral .is-main for the one main step, navy outline .card-btn-navy for the rest, as "Copy text").
   Ink and greys for data (gotcha 63). Phone first: nothing here is wider than the chat column; on a desktop the cards
   keep a readable width (design review, 17 Oct 2026). */
.xt-card {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  max-width: 100%;
  box-sizing: border-box;
  margin: 4px 0;
}
.xt-card [hidden] { display: none; }
.xt-head { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 6px; }
.xt-sub { margin: 0 0 10px; font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--text); overflow-wrap: anywhere; }
.xt-note { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--text-dim); max-width: 65ch; }
.xt-fine { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: var(--text-faint); max-width: 65ch; }

/* The count table: label and number read as one row; the columns line up with the card's own edges. */
.xt-table-card { max-width: 560px; overflow-x: auto; }
.xt-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.4; }
.xt-table th, .xt-table td { text-align: left; padding: 8px 4px; border-top: 1px solid var(--line-strong); vertical-align: top; }
.xt-table :is(th, td):first-child { padding-left: 0; }
.xt-table :is(th, td):last-child { padding-right: 0; }
.xt-table thead th { border-top: 0; font-size: 12.5px; font-weight: 500; color: var(--text-dim); padding-top: 0; }
.xt-table thead th.xt-num { font-weight: 500; color: var(--text-dim); }
.xt-table tbody th { font-weight: 500; color: var(--text); overflow-wrap: anywhere; }
.xt-table .xt-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; }
.xt-table .xt-pending { color: var(--text-faint); font-weight: 400; }
.xt-table .xt-locked { color: var(--text-dim); font-weight: 500; }

/* The election timeline: the dates first, a rail that starts and ends at its dots, then what we do not know. */
.xt-timeline { max-width: 560px; }
.xt-steps { list-style: none; margin: 4px 0 0; padding: 0; }
.xt-step { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; padding: 9px 0 9px 16px; position: relative; }
.xt-step::after { content: ''; position: absolute; left: -1px; top: 0; bottom: 0; width: 2px; background: var(--line-strong); }
.xt-step:first-child::after { top: 19px; }
.xt-step:last-child::after { bottom: auto; height: 19px; }
.xt-step:only-child::after { display: none; }
.xt-step::before { content: ''; position: absolute; left: -4px; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); z-index: 1; }
.xt-step.xt-election::before, .xt-step.xt-booked::before { width: 10px; height: 10px; left: -5px; top: 14px; background: var(--navy-fill); }
/* Dark: the brightest dot on the rail is the one that matters (design re-review, 17 Oct). */
html[data-theme="dark"] .xt-step.xt-election::before, html[data-theme="dark"] .xt-step.xt-booked::before { background: var(--navy-text); }
.xt-when { font-size: 13px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.xt-what { font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.4; overflow-wrap: anywhere; }
.xt-step-note { font-size: 13.5px; color: var(--text-dim); line-height: 1.45; overflow-wrap: anywhere; max-width: 65ch; }
.xt-step-src { font-size: 12px; color: var(--text-faint); overflow-wrap: anywhere; }
.xt-ask { border-radius: 10px; background: var(--surface-2); padding: 10px 12px; margin: 14px 0 0; }
.xt-ask .xt-ask-list { margin: 0; font-size: 14px; font-weight: 500; color: var(--text); line-height: 1.45; }
.xt-ask .xt-fine { margin-top: 2px; }
.xt-info { margin-top: 14px; border-top: 1px solid var(--line-strong); padding-top: 12px; }
.xt-info-alone { margin-top: 10px; border-top: 0; padding-top: 0; }
.xt-info-alone .xt-advice { margin-top: 0; }
.xt-info-head { margin: 0; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.xt-advice { margin: 14px 0 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.xt-info .xt-advice { margin-top: 6px; }
.xt-advice dt { font-size: 14px; font-weight: 600; color: var(--text); margin-top: 12px; }
.xt-advice dt:first-child { margin-top: 0; }
.xt-advice dd { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-dim); overflow-wrap: anywhere; max-width: 65ch; }
.xt-advice dd .xt-step-src { display: block; margin-top: 2px; }

/* The deadline nudge: the deadline, the send that fits, the official note, one button. As wide as the count card above it
   (the design critic, 20 Oct: a narrower card under it looked accidental); one spacing rhythm; the action line reads
   second and the official note third. */
.xt-nudge .xt-head { margin-bottom: 4px; }
.xt-nudge-line { margin: 0; font-size: 15.5px; font-weight: 600; line-height: 1.4; color: var(--text); overflow-wrap: anywhere; }
.xt-nudge-fits { margin: 6px 0 0; font-size: 14.5px; font-weight: 500; line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }
.xt-nudge-fits .xt-nudge-lead { font-weight: 400; color: var(--text-faint); font-size: 13.5px; }
.xt-nudge-note { margin: 14px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--text-faint); overflow-wrap: anywhere; max-width: 65ch; }
.xt-nudge-note .xt-step-src { display: block; margin-top: 4px; }
.xt-nudge > .xt-fine { margin-top: 12px; }
.xt-nudge .xt-actions { margin-top: 16px; }
.xt-nudge-btn { min-height: 48px; padding-block: 12px; }
.xt-nudge-btn[data-words]::before { content: attr(data-words); }

/* The header image: an email header's proportions, never wider than a readable column. */
.xt-image { max-width: 560px; }
.xt-img { display: block; width: 100%; height: auto; border-radius: 10px; background: var(--surface-2); aspect-ratio: 16 / 9; object-fit: cover; }
.xt-img[hidden] { display: none; }
.xt-img-failed { margin: 0; padding: 28px 16px; border-radius: 10px; background: var(--surface-2); color: var(--text-dim); font-size: 14px; text-align: center; }

/* Buttons: the app's .card-btn; a row of them, and a waiting one plainly waiting. */
.xt-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.xt-draft-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.xt-card .card-btn[aria-disabled="true"] { opacity: .45; cursor: default; filter: none; }
.xt-card .card-btn:focus-visible, .xt-draft-row .card-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
@media (max-width: 420px) { .xt-card { padding: 14px 14px; } }
@media print { .xt-actions, .xt-draft-row { display: none !important; } }

/* The morning brief (worker/brief-chat.ts, connector extra K): the days left as the card's one big figure, then today's
   orders and the last send as quiet rows, and one next step with one button (coral for Sign/Pay on our own order page). */
.xt-brief .xt-head { margin-bottom: 4px; }
.xt-brief-days { margin: 0; font-size: 15px; line-height: 1.3; color: var(--text); }
.xt-brief-fig { font-size: 30px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; margin-right: 2px; }
.xt-brief-reach { margin: 4px 0 0; font-size: 14.5px; line-height: 1.4; color: var(--text-dim); overflow-wrap: anywhere; }
.xt-brief-other { margin: 4px 0 0; font-size: 14px; line-height: 1.4; color: var(--text-dim); }
.xt-brief-none { margin: 0; }
.xt-brief-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 12px 0 0; }
.xt-brief-facts dt { font-size: 12px; font-weight: 600; color: var(--text-faint); }
.xt-brief-facts dd { margin: 2px 0 0; font-size: 15px; font-weight: 700; color: var(--text); }
.xt-brief-facts dd small { display: block; font-size: 12.5px; font-weight: 400; color: var(--text-faint); }
.xt-brief-sec { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.xt-brief-h { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--text); }
.xt-brief-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.xt-brief-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.xt-brief-label { min-width: 0; font-size: 14.5px; font-weight: 600; line-height: 1.4; color: var(--text); overflow-wrap: anywhere; }
.xt-brief-tag { flex: none; font-size: 12px; font-weight: 600; line-height: 1; padding: 5px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text-dim); }
.xt-brief-line { margin: 3px 0 0; font-size: 14px; line-height: 1.45; color: var(--text-dim); overflow-wrap: anywhere; max-width: 65ch; }
.xt-brief-sec > .xt-brief-line { margin-top: 0; }
.xt-brief-figs { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 6px 0 0; }
.xt-brief-figs dt { font-size: 12px; font-weight: 600; color: var(--text-faint); }
.xt-brief-figs dd { margin: 0; font-size: 15px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.xt-brief-next .xt-nudge-fits { margin-top: 0; }
.xt-brief-figs dd small { display: block; font-size: 12px; font-weight: 400; line-height: 1.35; color: var(--text-faint); }
@media (max-width: 359px) { .xt-brief-facts { grid-template-columns: minmax(0, 1fr); } }
/* Design critic, 7 Nov: the day never splits; the four result figures two by two; no one-word last lines. */
/* Each part kept whole where it fits, wrapped inside only where it cannot fit on one line (never cut off: Simulator walk,
   12 Nov 2026, a long 2027 primary name on the connector's twin of this line). */
.xt-brief-reach .xt-nw { display: inline-block; max-width: 100%; }
.xt-brief-reach.is-stacked .xt-nw { display: block; }
.xt-brief-reach.is-stacked .xt-sep { display: none; }
.xt-brief-reach { overflow-wrap: normal; }
.xt-brief .xt-brief-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
@media (min-width: 700px) { .xt-brief .xt-brief-figs { display: flex; gap: 4px 28px; } }
.xt-brief :is(.xt-brief-line, .xt-nudge-fits, .xt-fine, .xt-note) { text-wrap: pretty; }

/* The campaign budget card (worker/budget-chat.ts): the brief card's own type, plus the bar of what is spent or booked.
   Ink and greys for the data; the bar's fill is the navy the count card's band uses (never coral: it is not an action). */
.xt-budget-bar { position: relative; height: 8px; margin: 14px 0 6px; border-radius: 99px; background: var(--line-strong); overflow: hidden; }
.xt-budget-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--navy-fill); }
/* Design critic r1 (11 Nov 2026), blocker 1: in the dark theme the navy fill was darker than its track (a bar at 100%
   looked empty). Dark: the gold the Claude card's bar has on its navy band. */
html[data-theme="dark"] .xt-budget-bar i { background: var(--map-pick); }
/* Over the budget: the bar in the warning ink (a state, not an action; the one place the bar is not navy or gold). */
.xt-budget.is-over .xt-budget-bar i, html[data-theme="dark"] .xt-budget.is-over .xt-budget-bar i { background: var(--coral-fill); }
/* The budget's name: its own line in normal case under the one-word eyebrow (a client's name can be long). */
.xt-budget-name { margin: 0 0 2px; font-size: 14.5px; font-weight: 600; line-height: 1.3; color: var(--text); overflow-wrap: anywhere; text-wrap: balance; }
.xt-budget .xt-brief-reach, .xt-budget .xt-brief-other, .xt-budget .xt-note, .xt-budget dd small { text-wrap: balance; }
/* The notes run to 65 characters: balanced, a note a few characters over cut itself in half ("is not / counted"),
   unlike the full note above it (design critic r2b). Pretty fills the line and still keeps the last word company. */
.xt-budget .xt-fine { text-wrap: pretty; }
/* Three tiles where two fit side by side: the third takes the row (no empty place beside it). */
.xt-budget .xt-brief-facts.is-three .is-wide { grid-column: 1 / -1; }
.xt-budget-bar-say { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; font-size: 12.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.xt-budget .xt-brief-facts dd { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.xt-budget .xt-brief-facts.is-list { grid-template-columns: minmax(0, 1fr); }
.xt-budget .xt-brief-facts.is-list dt { font-size: 13.5px; color: var(--text); overflow-wrap: anywhere; }
@media (min-width: 520px) { .xt-budget .xt-brief-facts.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); } .xt-budget .xt-brief-facts.is-three .is-wide { grid-column: auto; } }
