/* ============================================================
   ASSIST SKIN LIBRARY (platform component stylesheet)
   The session page skin: the shared screen, the chat, the
   controls, the banners, every state the participant sees.
   Built from the Mobbin pass in ../mobbin-pass.md (third run,
   Nov 22, 2026, Ask ID DSP-20261122-01). The rules there bind
   this file. Component names carry the tsa- prefix so the
   library can sit on a page that also hosts other software
   without collisions. The brand token values are not in this
   file: each deployment's instance configuration supplies them
   and the gate serves them as its theme stylesheet.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  /* brand tokens (--brand, --brand-strong, --brand-ink,
     --brand-wash) are declared by the serving gate from the
     instance configuration, in its generated theme stylesheet.
     They are deliberately absent here: this file carries no
     deployment's palette. Status colors are data and never
     follow the brand. */

  /* fixed chrome */
  --ink: #1c2733;
  --ink-2: #33424f;
  --muted: #51606e;
  --faint: #8494a3;
  --page: #f4f6f8;
  --panel: #ffffff;
  --wash: #eef3f7;
  --hairline: #d7dee5;

  /* the stage (live session ground) */
  --stage: #0d141b;
  --stage-2: #16212c;
  --stage-bar: #1c2733;
  --stage-line: #2c3a47;
  --stage-text: #f2f5f7;
  --stage-muted: #9fb0bf;

  /* status tones: data, never themed */
  --tone-live: #2fa84f;
  --tone-live-wash: #e3f3e8;
  --tone-exec: #e8a33d;
  --tone-exec-ink: #241a04;
  --tone-exec-wash: #fdf1dc;
  --tone-danger: #c8102e;
  --tone-danger-ink: #ffffff;
  --tone-warn: #b97a0f;

  /* type */
  --font-ui: "Inter", "Helvetica Neue", Arial, sans-serif;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-md: 15px;
  --text-lg: 17px;
  --text-xl: 20px;
  --text-2xl: 24px;

  /* spacing scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;

  /* shape */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-tile: 20px;
  --radius-pill: 999px;

  /* touch targets: a truck cab, one thumb, gloves possible */
  --tap-min: 48px;
  --tap-control: 56px;
  --tap-primary: 52px;

  /* layout */
  --chat-rail: 360px;
  --chat-rail-tablet: 320px;
  --topbar-h: 52px;
}

/* ---------- base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
.tsa-num { font-variant-numeric: tabular-nums; }

/* ============================================================
   SESSION ROOT
   .tsa-session fills its frame. Live states sit on the dark
   stage; lobby and ended states sit on the light page. The
   switch itself tells the participant where they are.
   ============================================================ */
.tsa-session {
  font-family: var(--font-ui);
  display: flex; flex-direction: column;
  height: 100%; overflow: hidden;
  background: var(--stage); color: var(--stage-text);
  -webkit-font-smoothing: antialiased;
}
.tsa-session--light { background: var(--page); color: var(--ink); }

/* ---------- top bar ---------- */
.tsa-topbar {
  flex: 0 0 auto; min-height: var(--topbar-h);
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-4);
  background: var(--stage-bar); border-bottom: 1px solid var(--stage-line);
  color: var(--stage-text);
}
.tsa-session--light .tsa-topbar { background: var(--panel); border-bottom: 1px solid var(--hairline); color: var(--ink); }
.tsa-brandmark {
  flex: 0 0 auto;
  font-size: var(--text-xs); font-weight: 700; color: var(--stage-text);
  letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
}
.tsa-session--light .tsa-brandmark { color: var(--ink); }
.tsa-brandmark b { color: var(--tone-live); font-weight: 700; }
.tsa-session--light .tsa-brandmark b { color: var(--brand); }
.tsa-session-title { font-size: var(--text-md); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tsa-presence { font-size: var(--text-sm); color: var(--stage-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tsa-session--light .tsa-presence { color: var(--muted); }
.tsa-topbar .spacer { flex: 1 1 auto; }

/* ---------- status pill: connection in plain words ---------- */
.tsa-statuspill {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--text-sm); font-weight: 600;
  padding: 6px var(--sp-3); border-radius: var(--radius-pill);
  background: var(--stage-2); color: var(--stage-text); white-space: nowrap;
}
.tsa-statuspill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: 0 0 auto; }
.tsa-statuspill--live .dot { background: var(--tone-live); }
.tsa-statuspill--connecting .dot { background: var(--tone-exec); }
.tsa-statuspill--ready { background: var(--tone-live-wash); color: var(--brand-strong); }
.tsa-statuspill--ready .dot { background: var(--tone-live); }
.tsa-session--light .tsa-statuspill { background: var(--wash); color: var(--ink); }

/* ============================================================
   MODE BANNER: pinned at the top of the stage, always.
   It never scrolls, never fades, never auto-hides. Guidance
   is quiet. Execution is amber and carries its stop action.
   ============================================================ */
.tsa-modebanner {
  flex: 0 0 auto; display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--text-md); line-height: 1.4;
}
.tsa-modebanner .mode-word { font-weight: 800; letter-spacing: .08em; white-space: nowrap; }
.tsa-modebanner--guidance { background: var(--stage-2); color: var(--stage-text); border-bottom: 1px solid var(--stage-line); }
.tsa-modebanner--guidance .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--tone-live); flex: 0 0 auto; }
.tsa-modebanner--execution { background: var(--tone-exec); color: var(--tone-exec-ink); flex-wrap: wrap; }
.tsa-modebanner--execution .task { font-weight: 600; }
.tsa-controlstate {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--text-sm); font-weight: 700;
  background: rgba(0,0,0,.14); border-radius: var(--radius-pill);
  padding: 6px var(--sp-3); white-space: nowrap;
}
.tsa-revoke {
  margin-left: auto; flex: 0 0 auto;
  min-height: var(--tap-min); padding: var(--sp-2) var(--sp-4);
  border: 2px solid var(--tone-exec-ink); border-radius: var(--radius-pill);
  background: transparent; color: var(--tone-exec-ink);
  font-family: var(--font-ui); font-size: var(--text-md); font-weight: 700; cursor: pointer;
}

/* ============================================================
   STAGE: the shared screen is the page. Chat rail sits at
   the right on tablet and desktop widths.
   ============================================================ */
.tsa-stage { flex: 1 1 auto; display: flex; min-height: 0; position: relative; }
.tsa-screenwrap { flex: 1 1 auto; position: relative; min-width: 0; padding: var(--sp-3); display: flex; }
.tsa-screen {
  flex: 1 1 auto; position: relative; border-radius: var(--radius-tile);
  background: #22303d; overflow: hidden; min-height: 180px;
}
.tsa-screen-label {
  position: absolute; left: var(--sp-3); bottom: var(--sp-3);
  display: inline-flex; align-items: center; gap: var(--sp-2);
  background: rgba(10,16,22,.78); color: #fff;
  font-size: var(--text-sm); font-weight: 600;
  padding: 6px var(--sp-3); border-radius: var(--radius-pill);
  white-space: nowrap; max-width: calc(100% - 2 * var(--sp-3));
}
.tsa-screen-label .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tone-live); flex: 0 0 auto; }
.tsa-screen-label .lbl { overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* mock portal window drawn inside the screen on artboards */
.tsa-mockwin {
  position: absolute; inset: 9% 7%;
  background: #fbfcfd; border-radius: var(--radius-md);
  box-shadow: 0 8px 30px rgba(0,0,0,.35); overflow: hidden;
  color: var(--ink); display: flex; flex-direction: column;
}
.tsa-mockwin-bar {
  flex: 0 0 auto; display: flex; align-items: center; gap: var(--sp-2);
  background: var(--wash); border-bottom: 1px solid var(--hairline);
  padding: var(--sp-2) var(--sp-3); font-size: var(--text-xs); color: var(--muted); font-weight: 600;
}
.tsa-mockwin-body { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3); }
.tsa-mockrow { height: 12px; border-radius: 6px; background: var(--hairline); }
.tsa-mockrow--short { width: 55%; }
.tsa-mockrow--mid { width: 78%; }
.tsa-mockbtn {
  align-self: flex-start; margin-top: var(--sp-2);
  background: var(--brand); color: var(--brand-ink);
  font-size: var(--text-sm); font-weight: 700;
  padding: var(--sp-2) var(--sp-4); border-radius: var(--radius-sm);
  position: relative;
}
.tsa-pointring {
  position: absolute; inset: -7px; border: 3px solid var(--tone-exec);
  border-radius: var(--radius-md); pointer-events: none;
}
.tsa-pointnote {
  position: absolute; top: -34px; left: 0; white-space: nowrap;
  background: var(--tone-exec); color: var(--tone-exec-ink);
  font-size: var(--text-xs); font-weight: 700;
  padding: 4px var(--sp-2); border-radius: var(--radius-sm);
}

/* guide presence tile: small, top right of the screen */
.tsa-pip {
  position: absolute; top: var(--sp-5); right: var(--sp-5);
  width: 104px; border-radius: var(--radius-md); overflow: hidden;
  background: var(--stage-2); border: 1px solid var(--stage-line);
  color: var(--stage-text); text-align: center;
}
.tsa-pip .face {
  height: 56px; display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xl); font-weight: 700; background: var(--ink-2);
}
.tsa-pip .who { font-size: var(--text-xs); font-weight: 600; padding: 5px var(--sp-1); }

/* toast: short news only, top center, dismisses itself */
.tsa-toast {
  position: absolute; top: var(--sp-4); left: 50%; transform: translateX(-50%);
  background: rgba(10,16,22,.88); color: #fff;
  font-size: var(--text-sm); font-weight: 600;
  padding: var(--sp-2) var(--sp-4); border-radius: var(--radius-pill);
  white-space: nowrap; max-width: 92%;
}

/* ============================================================
   CONTROL BAR: one bar, pinned at the bottom, present in
   every live state. A word under every icon. End session is
   a red pill at the right end, never a menu item.
   ============================================================ */
.tsa-controlbar {
  flex: 0 0 auto; display: flex; align-items: stretch; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3) calc(var(--sp-2) + 2px);
  background: var(--stage-bar); border-top: 1px solid var(--stage-line);
}
.tsa-ctl {
  position: relative; flex: 0 1 auto; min-height: var(--tap-control);
  min-width: 68px; padding: var(--sp-1) var(--sp-3);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: transparent; border: 0; border-radius: var(--radius-md);
  color: var(--stage-text); font-family: var(--font-ui);
  font-size: var(--text-xs); font-weight: 600; cursor: pointer;
}
.tsa-ctl svg { width: 24px; height: 24px; }
.tsa-ctl--active { background: var(--stage-2); }
.tsa-badge {
  position: absolute; top: 4px; right: 10px;
  min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--tone-danger); color: #fff; border-radius: var(--radius-pill);
  font-size: var(--text-xs); font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.tsa-ctl--end {
  margin-left: auto; flex-direction: row; gap: var(--sp-2);
  min-width: 0; padding: var(--sp-2) var(--sp-5); white-space: nowrap;
  background: var(--tone-danger); color: var(--tone-danger-ink);
  border-radius: var(--radius-pill); font-size: var(--text-md); font-weight: 700;
}
.tsa-ctl--complete {
  flex-direction: row; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-5);
  background: var(--tone-live); color: #fff;
  border-radius: var(--radius-pill); font-size: var(--text-md); font-weight: 700;
}

/* ============================================================
   CHAT: bottom sheet on phone, right rail on wider screens.
   One component, two placements. The anti-code notice is a
   fixed strip inside the panel; it cannot scroll away.
   ============================================================ */
.tsa-chat {
  background: var(--panel); color: var(--ink);
  display: flex; flex-direction: column; min-height: 0;
}
.tsa-chat--rail {
  flex: 0 0 var(--chat-rail); width: var(--chat-rail);
  margin: var(--sp-3) var(--sp-3) var(--sp-3) 0;
  border-radius: var(--radius-lg); overflow: hidden;
}
.tsa-chat--sheet {
  position: absolute; left: 0; right: 0; bottom: 0; top: 12%;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -10px 34px rgba(0,0,0,.45); overflow: hidden; z-index: 5;
}
.tsa-chat-grab { flex: 0 0 auto; padding: var(--sp-2) 0 0; display: flex; justify-content: center; }
.tsa-chat-grab i { width: 44px; height: 5px; border-radius: 3px; background: var(--hairline); display: block; }
.tsa-chat--rail .tsa-chat-grab { display: none; }
.tsa-chathead {
  flex: 0 0 auto; display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--hairline);
}
.tsa-chathead .title { font-size: var(--text-lg); font-weight: 700; }
.tsa-chathead .sub { font-size: var(--text-sm); color: var(--muted); }
.tsa-chatclose {
  margin-left: auto; width: 44px; height: 44px; flex: 0 0 auto;
  border: 0; border-radius: 50%; background: var(--wash); color: var(--ink);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.tsa-chatclose svg { width: 20px; height: 20px; }
.tsa-notice {
  flex: 0 0 auto; margin: var(--sp-3) var(--sp-4) 0;
  background: var(--tone-exec-wash); color: var(--ink);
  border: 1px solid var(--tone-exec);
  border-radius: var(--radius-md); padding: var(--sp-3);
  /* The notice is an instruction the participant must act on, not
     metadata: it sets at the body size, not the secondary step
     (premium audit finding P-05). */
  font-size: var(--text-md); line-height: 1.45;
}
.tsa-notice b { font-weight: 700; }
.tsa-chatstream {
  flex: 1 1 auto; overflow-y: auto; min-height: 0;
  padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3);
}
.tsa-msg { max-width: 86%; font-size: var(--text-md); line-height: 1.45; }
.tsa-msg .who { font-size: var(--text-xs); font-weight: 700; color: var(--muted); margin-bottom: 3px; }
.tsa-msg .bubble { padding: var(--sp-3); border-radius: var(--radius-md); }
.tsa-msg--guide { align-self: flex-start; }
.tsa-msg--guide .bubble { background: var(--wash); border-bottom-left-radius: 4px; }
.tsa-msg--participant { align-self: flex-end; text-align: right; }
.tsa-msg--participant .bubble { background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 4px; text-align: left; }
.tsa-msg--system {
  align-self: center; max-width: 94%; text-align: center;
  font-size: var(--text-sm); color: var(--muted);
  display: flex; align-items: center; gap: var(--sp-3); width: 100%;
}
.tsa-msg--system::before, .tsa-msg--system::after {
  content: ""; flex: 1 1 auto; height: 1px; background: var(--hairline);
}
.tsa-grantline {
  align-self: stretch; max-width: none;
  background: var(--tone-exec-wash); border: 1px solid var(--tone-exec);
  border-radius: var(--radius-md); padding: var(--sp-3);
  font-size: var(--text-sm); line-height: 1.5; color: var(--ink);
}
.tsa-composer {
  flex: 0 0 auto; display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--hairline); background: var(--panel);
}
.tsa-composer .field {
  flex: 1 1 auto; min-height: var(--tap-min);
  border: 1px solid var(--hairline); border-radius: var(--radius-pill);
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--text-md); color: var(--faint);
  display: flex; align-items: center; background: var(--panel);
}
.tsa-send {
  flex: 0 0 auto; width: var(--tap-min); height: var(--tap-min);
  border: 0; border-radius: 50%; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.tsa-send svg { width: 22px; height: 22px; }

/* ============================================================
   CHAT-FIRST STATES (DSP-20261123-08 supplement, Phase A)
   The chat is the session's home (see ../ARCHITECTURE.md):
   the participant lands in the conversation, the screen
   session opens as a visit inside it, and the conversation
   carries the record after the visit closes. The pieces
   below are the chat-first furniture. The evidence is the
   Mobbin pass plus the supplement's Intercom pass, cited in
   CHAT-FIRST-SUPPLEMENT.md.
   ============================================================ */

/* chat as the page body: the home itself, not a panel over
   something else. One centered column on wide frames, full
   width on a phone. Carries no close control: there is
   nothing behind it to close back to. */
.tsa-chat--home {
  flex: 1 1 auto; width: 100%; max-width: 780px; margin: 0 auto;
  min-height: 0;
}
.tsa-device--desktop .tsa-chat--home {
  border-left: 1px solid var(--hairline);
  border-right: 1px solid var(--hairline);
}

/* the booked job, pinned at the top of the chat home: the
   company whose file backs this conversation, the job in
   plain words, the facts, and the one way to start the
   screen work. It does not scroll away. */
.tsa-jobcard {
  flex: 0 0 auto; margin: var(--sp-3) var(--sp-4) 0;
  background: var(--wash); border: 1px solid var(--hairline);
  border-radius: var(--radius-md); padding: var(--sp-4);
  display: flex; flex-direction: column; gap: var(--sp-3);
  font-size: var(--text-md); line-height: 1.5; color: var(--ink);
}
.tsa-jobcard .j-title {
  font-size: var(--text-xs); font-weight: 800;
  letter-spacing: .08em; color: var(--muted);
}
.tsa-jobcard .job { font-size: var(--text-lg); font-weight: 700; line-height: 1.3; }
.tsa-jobcard .co { font-weight: 600; color: var(--ink-2); }

/* the filed outcome, as a card inside the stream: what was
   done, its reference, and when, in the record colors. The
   stream is the session record, so the outcome is filed
   where the conversation can see it. */
.tsa-recordcard {
  align-self: stretch; max-width: none;
  background: var(--tone-live-wash); border: 1px solid var(--tone-live);
  border-radius: var(--radius-md); padding: var(--sp-3);
  display: flex; flex-direction: column; gap: var(--sp-2);
  font-size: var(--text-sm); line-height: 1.5; color: var(--ink);
}
.tsa-recordcard .r-title {
  display: flex; align-items: center; gap: var(--sp-2);
  font-size: var(--text-sm); font-weight: 800;
  letter-spacing: .06em; color: var(--brand-strong);
}
.tsa-recordcard .r-title svg { width: 18px; height: 18px; flex: 0 0 auto; }
.tsa-recordcard .tsa-kv { font-size: var(--text-sm); }

/* the conversation, still present while the screen visit
   runs on a phone: the latest message as one line above the
   control bar, with its unread count. Tapping it opens the
   chat sheet, the same as the Chat control. */
.tsa-chatpeek {
  flex: 0 0 auto; display: flex; align-items: center; gap: var(--sp-2);
  min-height: var(--tap-min); padding: var(--sp-2) var(--sp-4);
  background: var(--panel); color: var(--ink);
  border-top: 1px solid var(--hairline);
  font-size: var(--text-md);
}
.tsa-chatpeek .peek-who {
  flex: 0 0 auto; font-size: var(--text-xs); font-weight: 700;
  color: var(--muted); white-space: nowrap;
}
.tsa-chatpeek .peek-msg {
  flex: 1 1 auto; min-width: 0; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.tsa-chatpeek .tsa-badge { position: static; flex: 0 0 auto; }

/* ============================================================
   SHEET over a dimmed stage: reconnect, confirmations.
   ============================================================ */
.tsa-scrim {
  position: absolute; inset: 0; background: rgba(7,11,15,.66);
  display: flex; align-items: flex-end; justify-content: center; z-index: 6;
}
.tsa-sheet {
  background: var(--panel); color: var(--ink);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--sp-5) var(--sp-5) var(--sp-6);
  width: 100%; max-width: 520px;
  display: flex; flex-direction: column; gap: var(--sp-3);
}
.tsa-sheet h2 { font-size: var(--text-xl); font-weight: 700; }
.tsa-sheet p { font-size: var(--text-md); line-height: 1.5; color: var(--ink-2); }
.tsa-sheet .warnicon {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--tone-exec-wash); border: 1px solid var(--tone-exec);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-2xl); font-weight: 800; color: var(--tone-warn);
}

/* spinner: connecting states */
.tsa-spinner {
  width: 46px; height: 46px; border-radius: 50%;
  border: 5px solid var(--stage-line); border-top-color: var(--tone-live);
  animation: tsa-spin 1s linear infinite;
}
@keyframes tsa-spin { to { transform: rotate(360deg); } }
.tsa-connectbox {
  margin: auto; display: flex; flex-direction: column; align-items: center;
  gap: var(--sp-4); text-align: center; padding: var(--sp-6);
}
.tsa-connectbox .big { font-size: var(--text-xl); font-weight: 700; }
.tsa-connectbox .small { font-size: var(--text-md); color: var(--stage-muted); line-height: 1.5; max-width: 300px; }

/* ============================================================
   LIGHT PAGES: lobby, link dead, session ended.
   One card, one plain headline, what happens next.
   ============================================================ */
.tsa-pagebody {
  flex: 1 1 auto; overflow-y: auto; min-height: 0;
  padding: var(--sp-5) var(--sp-4) var(--sp-8);
  display: flex; flex-direction: column; align-items: center;
}
.tsa-card {
  background: var(--panel); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); padding: var(--sp-6);
  width: 100%; max-width: 560px;
  display: flex; flex-direction: column; gap: var(--sp-4);
}
.tsa-card h1 { font-size: var(--text-2xl); font-weight: 700; line-height: 1.25; }
.tsa-card h2 { font-size: var(--text-lg); font-weight: 700; }
.tsa-card p { font-size: var(--text-md); line-height: 1.55; color: var(--ink-2); }
.tsa-card .fineprint { font-size: var(--text-sm); color: var(--muted); line-height: 1.5; }
.tsa-kv { display: flex; flex-direction: column; gap: var(--sp-2); font-size: var(--text-md); }
.tsa-kv .row { display: flex; gap: var(--sp-3); }
.tsa-kv .k { flex: 0 0 108px; color: var(--muted); font-weight: 600; }
.tsa-kv .v { font-weight: 600; }
.tsa-modefact {
  border-radius: var(--radius-md); padding: var(--sp-4);
  font-size: var(--text-md); line-height: 1.5;
  background: var(--tone-live-wash); border: 1px solid var(--tone-live);
}
.tsa-modefact--exec { background: var(--tone-exec-wash); border-color: var(--tone-exec); }
.tsa-checkrow {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  min-height: var(--tap-min); padding: var(--sp-2) 0;
  font-size: var(--text-md); line-height: 1.5;
}
.tsa-checkrow .tick {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.tsa-checkrow .tick svg { width: 17px; height: 17px; }
.tsa-doneicon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--tone-live-wash); border: 1px solid var(--tone-live);
  display: flex; align-items: center; justify-content: center; color: var(--brand-strong);
}
.tsa-doneicon svg { width: 32px; height: 32px; }
.tsa-doneicon--plain { background: var(--wash); border-color: var(--hairline); color: var(--muted); }

/* grant card: the execution handoff, in the open */
.tsa-grantcard {
  border: 2px solid var(--tone-exec); background: var(--tone-exec-wash);
  border-radius: var(--radius-md); padding: var(--sp-4);
  display: flex; flex-direction: column; gap: var(--sp-2);
  font-size: var(--text-md); line-height: 1.5; color: var(--ink);
}
.tsa-grantcard .g-title { font-weight: 800; letter-spacing: .06em; }

/* ---------- buttons ---------- */
.tsa-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: var(--tap-primary); padding: var(--sp-3) var(--sp-6);
  border-radius: var(--radius-pill); border: 0;
  font-family: var(--font-ui); font-size: var(--text-md); font-weight: 700; cursor: pointer;
  text-decoration: none; text-align: center;
}
.tsa-btn--primary { background: var(--brand); color: var(--brand-ink); }
.tsa-btn--block { width: 100%; }
.tsa-btn--danger { background: var(--tone-danger); color: var(--tone-danger-ink); }
.tsa-btn--quiet { background: transparent; color: var(--muted); border: 1px solid var(--hairline); }
.tsa-btn--textdanger { background: transparent; color: var(--tone-danger); min-height: var(--tap-min); }

/* ============================================================
   ARTBOARD FRAMES (gallery only, not shipped UI)
   Phone portrait is the primary frame. Tablet and desktop
   frames show the same skin at wider widths.
   ============================================================ */
.tsa-device {
  border: 1px solid var(--hairline); border-radius: 28px; overflow: hidden;
  background: var(--stage); flex: 0 0 auto;
  box-shadow: 0 10px 34px rgba(16,24,32,.16);
}
.tsa-device--phone { width: 360px; height: 740px; }
.tsa-device--phone-sm { width: 320px; height: 700px; }
.tsa-device--tablet { width: 768px; height: 900px; border-radius: 22px; }
.tsa-device--desktop { width: 1180px; height: 760px; border-radius: 14px; }
.tsa-device .tsa-session { height: 100%; }
.tsa-device--tablet .tsa-chat--rail { flex-basis: var(--chat-rail-tablet); width: var(--chat-rail-tablet); }

/* ============================================================
   SMALL FRAMES: the phone widths (360 px, and the 320 px
   small Android frame). The same words fit at these widths
   by tightening the chrome spacing inside the frame, never
   by dropping a word or shrinking it below the type floor.
   Scoped to the device frames, the way the tablet chat rail
   width is scoped above. The presence sentence and the End
   session label stay whole at both widths.
   ============================================================ */
.tsa-device--phone .tsa-topbar, .tsa-device--phone-sm .tsa-topbar {
  gap: var(--sp-1); padding-left: var(--sp-1); padding-right: var(--sp-1);
}
.tsa-device--phone .tsa-brandmark, .tsa-device--phone-sm .tsa-brandmark { letter-spacing: -0.03em; }
.tsa-device--phone .tsa-statuspill, .tsa-device--phone-sm .tsa-statuspill {
  gap: var(--sp-1); padding-left: var(--sp-1); padding-right: var(--sp-1);
  font-size: var(--text-xs);
}
.tsa-device--phone .tsa-presence, .tsa-device--phone-sm .tsa-presence {
  font-size: var(--text-xs); letter-spacing: -0.03em;
}
/* The compact connecting pill: at the phone widths the long
   connecting pill (Connecting, Reconnecting) carries its state in
   the word alone, so the presence sentence beside it stays whole
   (premium audit finding P-03). */
.tsa-device--phone .tsa-statuspill--connecting .dot, .tsa-device--phone-sm .tsa-statuspill--connecting .dot {
  display: none;
}
.tsa-device--phone .tsa-controlbar, .tsa-device--phone-sm .tsa-controlbar {
  gap: var(--sp-1); padding-left: var(--sp-2); padding-right: var(--sp-2);
}
.tsa-device--phone .tsa-ctl, .tsa-device--phone-sm .tsa-ctl {
  min-width: 60px; padding-left: var(--sp-2); padding-right: var(--sp-2);
}
.tsa-device--phone .tsa-ctl--end, .tsa-device--phone-sm .tsa-ctl--end,
.tsa-device--phone .tsa-ctl--complete, .tsa-device--phone-sm .tsa-ctl--complete {
  padding-left: var(--sp-4); padding-right: var(--sp-4);
}
