/* Switchboard Talk — live voice sheet (js/switchboard-talk.js).
   Phone and narrow windows (<= 900px): bottom sheet. Wider: a small card in the Jarvis panel's corner
   (opening Talk closes the panel). */
.swt {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9100;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  border: 1px solid var(--border, #d4d2cb);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: var(--surface, #fff);
  box-shadow: 0 -12px 48px rgba(0, 0, 0, .28);
  color: var(--text, #0d0d0b);
  font-family: var(--font, system-ui, sans-serif);
  outline: none;
  animation: swt-up .26s cubic-bezier(.2, .8, .2, 1);
}
.swt[hidden] { display: none; }

@keyframes swt-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

.swt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 6px 4px 16px;
  background: var(--surface-2, #e4e3df);
}
.swt-title { font-size: 17px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.swt-x {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text-muted, #6b6c64);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
.swt-x:hover { color: var(--text, #0d0d0b); }

.swt-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
}

.swt-status-row { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-height: 30px; }
.swt-status { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; color: var(--text-muted, #6b6c64); font-variant-numeric: tabular-nums; }
.swt-status[data-phase="active"] { color: var(--text, #0d0d0b); }
.swt-status[data-phase="error"], .swt-status[data-tone="warn"] { color: var(--danger, #dc2626); }
.swt-padtoggle {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 15px;
  background: var(--surface-2, #e4e3df);
  color: var(--text, #0d0d0b);
  font: 500 13px/1 var(--font, system-ui, sans-serif);
  cursor: pointer;
}

/* Captions (Talk): two fixed-height rows, the owner's last line and Jarvis's current turn, each scrolled to its end, so
   nothing below moves as the words change. The meeting captions keep .swt-cap-line. */
.swt-cap { flex: none; display: flex; flex-direction: column; gap: 4px; --swt-cap-lines: 3; }
.swt-cap-row { height: calc(var(--swt-cap-lines) * 1.35em); overflow: hidden; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.swt-cap-row[data-who="you"] { font-weight: 450; color: var(--text-muted, #6b6c64); }
.swt-cap-row[data-who="bot"] { font-weight: 500; color: var(--text, #0d0d0b); }
@media (max-width: 900px) { .swt.swt-has-tiles .swt-cap { --swt-cap-lines: 2; } }
.swt-cap-line {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.swt-pin { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; min-height: 36px; }
.swt-dots { display: flex; justify-content: center; gap: 12px; min-height: 14px; }
.swt-back {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text-muted, #6b6c64);
  font: 500 18px/1 var(--font, system-ui, sans-serif);
  cursor: pointer;
  touch-action: manipulation;
}
.swt-back:hover { color: var(--text, #0d0d0b); }
.swt-back:active { transform: scale(.97); }
.swt-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--text-muted, #6b6c64);
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}
.swt-dot.on { background: var(--text, #0d0d0b); border-color: var(--text, #0d0d0b); transform: scale(1.05); }

.swt-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 300px;
  width: 100%;
  margin: 0 auto;
}
.swt-hang[hidden], .swt-keypad[hidden], .swt-pin[hidden], .swt-cap[hidden], .swt-meter[hidden], .swt-padtoggle[hidden] { display: none; }
.swt-key {
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  background: var(--surface-2, #e4e3df);
  color: var(--text, #0d0d0b);
  font: 600 20px/1 var(--font, system-ui, sans-serif);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: transform .1s ease-out, background .12s ease;
}
.swt-key:hover { background: var(--bg-hover, #dcdad4); }
.swt-key:active, .swt-hang:active, .swt-padtoggle:active { transform: scale(.97); }

/* No empty track: only the live fill shows, and the bar tucks into the gaps so no blank band sits above Hang up. */
.swt-meter { height: 4px; margin: -6px 0; border-radius: 2px; overflow: hidden; background: transparent; }
.swt-meter-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent, #b0664a);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 60ms linear;
}

.swt-hang {
  min-height: 52px;
  border: 0;
  border-radius: 26px;
  background: var(--danger, #dc2626);
  color: #fff;
  font: 700 16px/1 var(--font, system-ui, sans-serif);
  cursor: pointer;
  transition: transform .1s ease-out, filter .12s ease;
}
.swt-hang:hover { filter: brightness(.94); }
.swt-hang.swt-redial { background: var(--text, #0d0d0b); color: var(--surface, #fff); }

.swt button:focus-visible { outline: 2px solid var(--accent, #b0664a); outline-offset: 2px; }

/* Tabs (Talk | Meetings): segmented control under the header. */
.swt-tabs { display: flex; gap: 4px; padding: 6px 12px 0; background: var(--surface, #fff); }
.swt-tab {
  flex: 1 1 0;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text-muted, #6b6c64);
  font: 700 14px/1 var(--font, system-ui, sans-serif);
  cursor: pointer;
  touch-action: manipulation;
  transition: background .12s ease, transform .1s ease-out;
}
.swt-tab[aria-selected="true"] { background: var(--surface-2, #e4e3df); color: var(--text, #0d0d0b); }
.swt-tab:active { transform: scale(.97); }
.swt-tab:disabled { opacity: .5; cursor: default; }
.swt-voice, .swt-meet { display: flex; flex-direction: column; gap: 12px; }
.swt-voice[hidden], .swt-meet[hidden], .swt-board[hidden], .swt-mlist[hidden], .swt-mlive[hidden],
.swt-mmsg[hidden], .swt-mcap[hidden], .swt-leave[hidden] { display: none; }

/* Waiting strip: a count and short names only. */
.swt-board {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--surface-2, #e4e3df);
  font-size: 12px;
}
.swt-board-n { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.swt-board-names { color: var(--text-muted, #6b6c64); min-width: 0; overflow-wrap: anywhere; }

/* Section header row: lightly tinted band, bold title, control on the same row. */
.swt-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 6px 4px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent, #b0664a) 12%, var(--surface, #fff));
}
.swt-sec-title { font-size: 15px; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.swt-chipbtn {
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text, #0d0d0b);
  font: 600 13px/1 var(--font, system-ui, sans-serif);
  cursor: pointer;
  touch-action: manipulation;
}
.swt-chipbtn:disabled { opacity: .5; }
.swt-chipbtn:active { transform: scale(.97); }
.swt-leave { color: var(--danger, #dc2626); }

.swt-mlist, .swt-mlive { display: flex; flex-direction: column; gap: 8px; }
.swt-mmsg, .swt-mstate { font-size: 13px; color: var(--text-muted, #6b6c64); overflow-wrap: anywhere; }
.swt-mstate[data-tone="warn"] { color: var(--danger, #dc2626); }
.swt-mrows { display: flex; flex-direction: column; gap: 6px; }
.swt-mrow {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--surface-2, #e4e3df);
}
.swt-mrow-info { min-width: 0; }
.swt-mrow-title { font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.swt-mrow-sub { font-size: 12px; color: var(--text-muted, #6b6c64); font-variant-numeric: tabular-nums; }
.swt-mrow-sub.swt-warn { color: var(--danger, #dc2626); }
.swt-join {
  min-width: 64px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 22px;
  background: var(--accent, #b0664a);
  color: #fff;
  font: 700 14px/1 var(--font, system-ui, sans-serif);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .1s ease-out;
}
.swt-join:active { transform: scale(.97); }
.swt-join:disabled { background: var(--border, #d4d2cb); color: var(--text-muted, #6b6c64); cursor: default; }
.swt-auto { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 12px; color: var(--text-muted, #6b6c64); cursor: pointer; }
.swt .swt-auto input[type="checkbox"] { flex: 0 0 20px; width: 20px; height: 20px; min-width: 0; min-height: 0; margin: 0; padding: 0; accent-color: var(--accent, #b0664a); }  /* label row is the 44px target; a global phone input rule must not inflate the box */

.swt-mcap { overflow-wrap: anywhere; font-size: 14px; line-height: 1.35; }
.swt-mcap .swt-cap-line { -webkit-line-clamp: 3; line-clamp: 3; }

/* Approval cards: what exactly will happen, then Deny / Approve. */
.swt-cards { display: flex; flex-direction: column; gap: 8px; }
.swt-card { border: 1px solid var(--border, #d4d2cb); border-radius: 14px; overflow: hidden; background: var(--surface, #fff); }
.swt-card.swt-high { border-color: var(--danger, #dc2626); }
.swt-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  background: color-mix(in srgb, var(--accent, #b0664a) 12%, var(--surface, #fff));
}
.swt-card-kind { font-size: 14px; font-weight: 700; }
.swt-badge { padding: 2px 8px; border-radius: 10px; background: var(--danger, #dc2626); color: #fff; font-size: 11px; font-weight: 700; }
.swt-card-target { padding: 6px 12px 0; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.swt-card-text {
  margin: 6px 12px 0;
  max-height: 140px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.swt-card-err { padding: 4px 12px 0; font-size: 12px; color: var(--danger, #dc2626); }
.swt-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 12px 12px; }
.swt-btn {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  font: 700 15px/1 var(--font, system-ui, sans-serif);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .1s ease-out;
}
.swt-btn:active { transform: scale(.97); }
.swt-btn:disabled { opacity: .55; cursor: default; }
.swt-deny { background: var(--surface-2, #e4e3df); color: var(--text, #0d0d0b); }
.swt-approve { background: var(--accent, #b0664a); color: #fff; }
.swt-approve.swt-confirm { background: var(--danger, #dc2626); }
.swt-back-list { width: 100%; }

@media (min-width: 901px) {
  .swt {
    left: auto;
    right: var(--im-launcher-edge, 16px);
    bottom: var(--im-launcher-bottom, 20px);
    width: 320px;
    max-width: calc(100vw - 32px);
    border-bottom: 1px solid var(--border, #d4d2cb);
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
  }
  .swt-x { min-width: 36px; min-height: 36px; }
  .swt-back { min-height: 30px; }
  .swt-body { padding-bottom: 16px; gap: 10px; }
  .swt-key { min-height: 40px; font-size: 18px; }
  .swt-hang { min-height: 44px; }
  .swt-tab, .swt-chipbtn, .swt-join, .swt-btn { min-height: 36px; }
  .swt-auto { min-height: 32px; }
}

.ka-talk { display: inline-grid; place-items: center; }
.ka-talk[hidden] { display: none; }
.ka-talk:hover { color: var(--text, #f4f4f2); }

@media (prefers-reduced-motion: reduce) {
  .swt { animation: none; }
  .swt-key, .swt-back, .swt-hang, .swt-dot, .swt-meter-fill, .swt-tab, .swt-join, .swt-btn { transition: none; }
}

/* Screen cards: what Jarvis puts on screen instead of reading it out (newest first, last five). */
.swt-screen { display: flex; flex-direction: column; gap: 8px; max-height: 42dvh; overflow-y: auto; overscroll-behavior: contain; }
.swt-screen[hidden] { display: none; }
.swt-scard { border: 1px solid var(--border, #d4d2cb); border-radius: 12px; overflow: hidden; background: var(--surface, #fff); flex: none; }
.swt-scard-head { display: flex; align-items: center; gap: 8px; padding: 0 4px 0 12px; min-height: 40px; background: color-mix(in srgb, var(--accent, #b0664a) 12%, var(--surface, #fff)); }
.swt-scard-title { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.swt-scard-x { min-width: 44px; min-height: 40px; border: 0; background: transparent; color: var(--text-muted, #6b6c64); font-size: 20px; line-height: 1; cursor: pointer; }
.swt-scard-x:active { opacity: .6; }
.swt-scard-scroll { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.swt-scard-table { border-collapse: collapse; width: 100%; font-size: 12px; font-variant-numeric: tabular-nums; }
.swt-scard-table th { background: var(--surface-2, #e4e3df); text-align: left; font-size: 12px; font-weight: 700; white-space: normal; overflow-wrap: anywhere; padding: 6px 10px; border-bottom: 1px solid var(--border, #d4d2cb); color: var(--text, #0d0d0b); }
.swt .swt-scard-table { min-width: 0; }
.swt .swt-scard-table td { white-space: normal; }
.swt-scard-table td { padding: 6px 10px; vertical-align: top; border-bottom: 1px solid var(--border, #d4d2cb); color: var(--text-muted, #6b6c64); max-width: 260px; overflow-wrap: anywhere; }
.swt .swt-scard-table td:first-child { color: var(--text, #0d0d0b); font-weight: 600; white-space: nowrap; }
.swt-scard[data-kind="board"] .swt-scard-table th { white-space: normal; }
.swt-scard[data-kind="board"] .swt-scard-table td:last-child { min-width: 110px; }
.swt-scard[data-kind="board"] .swt-scard-table th, .swt-scard[data-kind="board"] .swt-scard-table td { padding: 6px 8px; }
.swt-scard-table tr:last-child td { border-bottom: 0; }
.swt-scard-text { padding: 8px 12px 10px; font-size: 13px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 30dvh; overflow-y: auto; }

/* Stage cards: chart / kpis / deck + tappable rows (Jarvis presents while it speaks). */
.swt-chart { padding: 8px 10px 10px; }
.swt-chart-svg { display: block; width: 100%; height: auto; max-height: 160px; }
.swt-chart-grid { stroke: var(--border, #d4d2cb); stroke-width: 1; stroke-dasharray: 3 3; }
.swt-chart-lab { font-size: 10px; fill: var(--text-muted, #6b6c64); font-variant-numeric: tabular-nums; } /* ui-ok: SVG viewBox units, scaled up with the chart (renders 12px+) */
.swt-chart-line { fill: none; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.swt-chart-dot, .swt-chart-bar { stroke: none; }
.swt-chart-line.swt-s0 { stroke: var(--accent, #b0664a); } .swt-chart-dot.swt-s0, .swt-chart-bar.swt-s0 { fill: var(--accent, #b0664a); }
.swt-chart-line.swt-s1 { stroke: var(--info, #2f6fd0); } .swt-chart-dot.swt-s1, .swt-chart-bar.swt-s1 { fill: var(--info, #2f6fd0); }
.swt-chart-line.swt-s2 { stroke: var(--success, #15803d); } .swt-chart-dot.swt-s2, .swt-chart-bar.swt-s2 { fill: var(--success, #15803d); }
.swt-chart-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; padding-top: 6px; font-size: 12px; color: var(--text-muted, #6b6c64); }
.swt-chart-key { display: inline-flex; align-items: center; gap: 5px; min-width: 0; overflow-wrap: anywhere; }
.swt-chart-sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.swt-b0 { background: var(--accent, #b0664a); } .swt-b1 { background: var(--info, #2f6fd0); } .swt-b2 { background: var(--success, #15803d); }

.swt-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.swt-kpi { background: var(--surface, #fff); box-shadow: inset -1px -1px 0 var(--border, #d4d2cb); padding: 8px 12px 9px; min-width: 0; }
.swt-kpi-label { font-size: 14px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.swt-kpi-value { font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--text-muted, #6b6c64); margin-top: 2px; overflow-wrap: anywhere; }
.swt-kpi-note { font-size: 11px; color: var(--text-muted, #6b6c64); margin-top: 2px; overflow-wrap: anywhere; }
@media (min-width: 901px) {
  .swt-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .swt-chart-svg { max-height: 200px; }
  /* an incomplete last row: the last tile takes the remaining columns, never a grey slab */
  .swt:not(.swt-stage) .swt-kpis > :last-child:nth-child(3n+1) { grid-column: 1 / -1; }
  .swt:not(.swt-stage) .swt-kpis > :last-child:nth-child(3n+2) { grid-column: span 2; }
}

.swt-deck { display: flex; flex-direction: column; }
.swt-beat { padding: 8px 12px; border-top: 1px solid var(--border, #d4d2cb); border-left: 3px solid transparent; transition: background-color .25s ease, border-color .25s ease; }
.swt-beat:first-child { border-top: 0; }
.swt-beat-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.swt-beat-num { flex: none; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-muted, #6b6c64); min-width: 14px; }
.swt-beat-title { font-size: 14px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; color: var(--text-muted, #6b6c64); }
.swt-beat-body { display: none; margin: 4px 0 0 22px; font-size: 13px; line-height: 1.4; color: var(--text-muted, #6b6c64); white-space: pre-wrap; overflow-wrap: anywhere; }
.swt-beat.is-focus { background: color-mix(in srgb, var(--accent, #b0664a) 12%, var(--surface, #fff)); border-left-color: var(--accent, #b0664a); }
.swt-beat.is-focus .swt-beat-title { font-size: 15px; font-weight: 700; color: var(--text, #0d0d0b); }
.swt-beat.is-focus .swt-beat-num { color: var(--accent, #b0664a); }
.swt-beat.is-focus .swt-beat-body { display: block; animation: swt-fadein .25s ease; }
@keyframes swt-fadein { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

.swt-scard-table tr.is-tap { cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color .2s ease, transform .12s ease; }
.swt-scard-table tr.is-tap td { height: 44px; }
.swt-scard-table tr.is-tap:active { transform: scale(.992); background: color-mix(in srgb, var(--accent, #b0664a) 10%, transparent); }
.swt-scard-table tr.is-tap:focus-visible { outline: 2px solid var(--accent, #b0664a); outline-offset: -2px; }
.swt-scard-table tr.is-hl { background: color-mix(in srgb, var(--accent, #b0664a) 16%, transparent); }
.swt-scard-table tr.is-asked { animation: swt-asked 1.2s ease; }
@keyframes swt-asked { 0% { background: color-mix(in srgb, var(--accent, #b0664a) 32%, transparent); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) {
  .swt-beat, .swt-scard-table tr.is-tap { transition: none; }
  .swt-beat.is-focus .swt-beat-body, .swt-scard-table tr.is-asked { animation: none; }
}

/* Stage (desktop): cards on screen widen the sheet; the screen takes the height, captions stay above it. */
@media (min-width: 901px) {
  .swt.swt-stage { width: min(720px, calc(100vw - 32px)); height: min(860px, calc(100dvh - 40px)); transition: width .28s cubic-bezier(.2,.8,.2,1); }
  .swt.swt-stage .swt-body { flex: 1; min-height: 0; }
  .swt.swt-stage .swt-screen { flex: 1; max-height: none; min-height: 0; }
  .swt.swt-stage .swt-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .swt.swt-stage .swt-chart-svg { max-height: 260px; }
}
@media (min-width: 901px) and (prefers-reduced-motion: reduce) { .swt.swt-stage { transition: none; } }
/* Stage (phone): the sheet takes the screen while cards are up; an odd last tile spans the row. */
@media (max-width: 900px) {
  .swt.swt-stage { height: calc(100dvh - 24px); }
  .swt.swt-stage .swt-body { flex: 1; min-height: 0; }
  .swt.swt-stage .swt-screen { flex: 1; max-height: none; min-height: 0; }
  .swt-kpis > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Transcript (Off | Side | Full). Off = today's layout: the stagebox is transparent to layout. */
.swt-stagebox { display: contents; }
.swt-seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 12px; background: var(--bg-secondary, var(--surface-2, #e4e3df)); flex: none; }
.swt-seg[hidden], .swt-tx[hidden], .swt-tx-cards[hidden], .swt-tx-latest[hidden] { display: none; }
.swt-seg-opt {
  min-height: 30px; min-width: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent;
  color: var(--text-muted, #6b6c64); font: 500 13px/1 var(--font, system-ui, sans-serif); cursor: pointer; touch-action: manipulation;
  transition: background .15s ease, transform .1s ease-out;
}
.swt-seg-opt[aria-checked="true"] { background: var(--surface, #fff); color: var(--text, #0d0d0b); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.swt-seg-opt:active { transform: scale(.97); }
.swt-seg-opt:focus-visible { outline: 2px solid var(--accent, #b0664a); outline-offset: 1px; }
@media (pointer: coarse) { .swt-seg-opt { min-height: 44px; } }

.swt-tx-on .swt-stagebox { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; }
.swt-tx-on .swt-voice { flex: 1; min-height: 0; }
.swt-tx { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; border: 1px solid var(--border, #d4d2cb); border-radius: 12px; overflow: hidden; background: var(--surface, #fff); }
.swt-tx-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 0 4px 0 12px; background: var(--surface-2, #e4e3df); }
.swt-tx-title { font-size: 15px; font-weight: 700; }
.swt-tx-wrap { position: relative; flex: 1; min-height: 0; display: flex; }
.swt-tx-log { flex: 1; min-width: 0; overflow-y: auto; overscroll-behavior: contain; padding: 10px 12px; display: flex; flex-direction: column; gap: 12px; }
.swt-turn { overflow-wrap: anywhere; }
.swt-turn-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.swt-turn-who { font-size: 14px; font-weight: 700; }
.swt-turn-time { font-size: 12px; color: var(--text-muted, #6b6c64); font-variant-numeric: tabular-nums; }
.swt-turn-text { font-size: 13px; line-height: 1.45; font-weight: 450; color: var(--text, #0d0d0b); }
.swt-turn[data-who="you"] .swt-turn-who, .swt-turn[data-who="you"] .swt-turn-text { color: var(--text-muted, #6b6c64); }
.swt-turn[data-who="you"] .swt-turn-text { font-size: 12px; }
.swt-tx-latest {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); min-height: 32px; padding: 0 14px; border: 0; border-radius: 16px;
  background: var(--accent, #b0664a); color: #fff; font: 600 13px/1 var(--font, system-ui, sans-serif); cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.swt-tx-latest:active { transform: translateX(-50%) scale(.97); }

/* Side on a phone: transcript strip (~40%) above the cards, both scroll on their own. */
.swt-tx-side.swt-tx-withcards .swt-tx { flex: 0 0 40%; }
.swt-tx-side.swt-tx-withcards .swt-screen { flex: 1 1 0; min-height: 0; max-height: none; }
.swt-tx-full .swt-tx { flex: 1 1 0; }

@media (min-width: 901px) {
  .swt.swt-stage.swt-tx-on { width: min(720px, calc(100vw - 32px)); }
  .swt.swt-stage.swt-tx-withcards { width: min(1040px, calc(100vw - 32px)); }
  .swt-tx-withcards .swt-stagebox { flex-direction: row; align-items: stretch; }
  .swt-tx-side.swt-tx-withcards .swt-tx { flex: 0 0 38%; min-width: 0; }
  .swt-tx-side.swt-tx-withcards .swt-screen { flex: 1 1 0; min-width: 0; }
  .swt-seg-opt { min-height: 28px; }
}
@media (prefers-reduced-motion: reduce) { .swt-seg-opt, .swt-tx-latest { transition: none; } .swt-seg-opt:active, .swt-tx-latest:active { transform: none; } .swt-tx-latest:active { transform: translateX(-50%); } }
/* Full transcript fills the window on desktop (phone is already full height); y labels read over the lines. */
@media (min-width: 901px) {
  .swt.swt-stage.swt-tx-on.swt-tx-full { left: 16px; right: 16px; width: auto; max-width: none; top: 16px; bottom: 16px; height: auto; }
  .swt.swt-tx-full .swt-turn { width: 100%; max-width: 820px; margin: 0 auto; }
  .swt.swt-tx-full .swt-turn-text { font-size: 16px; line-height: 1.55; }
  .swt.swt-tx-full .swt-turn[data-who="you"] .swt-turn-text { font-size: 14px; }
}
.swt-chart-lab { paint-order: stroke; stroke: var(--surface, #fff); stroke-width: 3px; stroke-linejoin: round; }

/* ── Round 2: presence orb, live sessions strip, pending read-back, card motion, expand ── */
.swt-orb {
  --orb: var(--success, #15803d); --lvl: 0;
  position: relative; flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--orb) 45%, #fff), var(--orb) 70%);
  box-shadow: 0 0 calc(4px + 12px * var(--lvl)) color-mix(in srgb, var(--orb) 60%, transparent);
  transform: scale(calc(1 + var(--lvl) * .22));
  transition: transform .09s linear, box-shadow .09s linear, background-color .25s ease;
}
.swt-orb[hidden], .swt-act[hidden], .swt-strip[hidden], .swt-pend[hidden], .swt-pend-text[hidden], .swt-pend-hint[hidden] { display: none; }
.swt-orb[data-state="thinking"] { --orb: var(--info, #2f6fd0); }
.swt-orb[data-state="speaking"] { --orb: var(--accent, #b0664a); }
.swt-orb::before, .swt-orb::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; pointer-events: none; }
.swt-orb[data-state="listening"]::before { border: 2px solid color-mix(in srgb, var(--orb) 45%, transparent); animation: swt-breathe 3.2s ease-in-out infinite; }
.swt-orb[data-state="thinking"]::after {
  background: conic-gradient(from 0deg, transparent 0 55%, color-mix(in srgb, var(--orb) 70%, #fff) 85%, transparent 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: swt-spin 1.6s linear infinite;
}
.swt-orb[data-state="speaking"]::before { border: 2px solid color-mix(in srgb, var(--orb) 55%, transparent); animation: swt-pulse 1.1s ease-out infinite; }
@keyframes swt-breathe { 0%, 100% { transform: scale(.92); opacity: .5; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes swt-spin { to { transform: rotate(360deg); } }
@keyframes swt-pulse { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
.swt-act { flex: 0 1 auto; min-width: 0; max-width: 45%; font-size: 13px; font-weight: 500; color: var(--text-muted, #6b6c64); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.swt-strip { display: flex; align-items: center; gap: 8px; min-width: 0; }
.swt-strip-n { flex: none; font-size: 14px; font-weight: 700; color: var(--text, #0d0d0b); font-variant-numeric: tabular-nums; }
.swt-strip-n.is-wait { color: var(--accent, #b0664a); }
.swt-strip-list { display: flex; flex-wrap: nowrap; gap: 6px; min-width: 0; flex: 1; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 2px 0; }
.swt-strip-list::-webkit-scrollbar { display: none; }
.swt-chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; max-width: 220px; padding: 0 12px; border: 0; border-radius: 18px;
  background: var(--surface-2, #e4e3df); color: var(--text-muted, #6b6c64); font: 500 13px/1 var(--font, system-ui, sans-serif);
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: background-color .2s ease, transform .1s ease-out;
}
.swt-chip:active { transform: scale(.97); }
.swt-chip-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .45; }
.swt-chip-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swt-chip-hint { flex: none; font-size: 11px; opacity: .8; white-space: nowrap; }
.swt-chip[data-state="working"] .swt-chip-dot { background: var(--info, #2f6fd0); opacity: 1; }
.swt-chip[data-state="waiting"] { background: color-mix(in srgb, var(--accent, #b0664a) 16%, var(--surface, #fff)); color: var(--text, #0d0d0b); font-weight: 600; }
.swt-chip[data-state="waiting"] .swt-chip-dot { background: var(--accent, #b0664a); opacity: 1; }
.swt-chip[data-stuck] { background: color-mix(in srgb, var(--warning, #d97706) 20%, var(--surface, #fff)); color: var(--text, #0d0d0b); }
.swt-chip[data-stuck] .swt-chip-dot { background: var(--warning, #d97706); opacity: 1; }
.swt-chip.is-asked { animation: swt-asked 1.2s ease; }
@media (pointer: coarse), (max-width: 900px) { .swt-chip { min-height: 44px; } }

.swt-pend {
  position: relative; z-index: 3; padding: 8px 12px 10px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent, #b0664a) 14%, var(--surface, #fff)); box-shadow: 0 1px 6px rgba(0, 0, 0, .12);
  animation: swt-rise .2s cubic-bezier(.2, .8, .2, 1);
}
.swt-pend-title { font-size: 15px; font-weight: 700; }
.swt-pend[data-done="1"] { background: var(--surface-2, #e4e3df); }
.swt-pend[data-outcome="sent"] .swt-pend-title { color: var(--success, #15803d); }
.swt-pend-text { margin-top: 2px; font-size: 13px; line-height: 1.4; font-weight: 450; color: var(--text-muted, #6b6c64); overflow-wrap: anywhere; max-height: 28dvh; overflow-y: auto; }
.swt-pend-hint { margin-top: 4px; font-size: 12px; color: var(--text-muted, #6b6c64); }

/* Cards: enter with a short fade + rise, leave with a fade + collapse. */
.swt-scard.is-new { animation: swt-rise .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes swt-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.swt-scard.is-leaving { opacity: 0; pointer-events: none; margin-bottom: -8px; transition: opacity .2s ease, max-height .24s cubic-bezier(.2, .8, .2, 1), margin-bottom .24s ease; }

/* Expand: one card fills the stage; the rest and the transcript step aside. */
.swt-scard-title { cursor: pointer; }
.swt-scard-exp { min-width: 44px; min-height: 40px; border: 0; background: transparent; color: var(--text-muted, #6b6c64); font-size: 17px; line-height: 1; cursor: pointer; }
.swt-scard-exp:active { opacity: .6; }
.swt-scard-mv { min-width: 44px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; color: var(--text-muted, #6b6c64); cursor: pointer; touch-action: manipulation; }
.swt-scard-mv svg { display: block; pointer-events: none; }
.swt-scard-mv:active { opacity: .6; }
.swt-screen.has-exp > .swt-scard:not(.is-expanded) { display: none; }
.swt-screen.has-exp > .swt-scard.is-expanded { flex: 1 1 auto; }
.swt-expanded .swt-tx { display: none; }
.swt-expanded.swt-tx-on .swt-stagebox { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.swt-expanded .swt-screen { flex: 1 1 0; min-height: 0; max-height: none; }

@media (prefers-reduced-motion: reduce) {
  .swt-orb, .swt-chip, .swt-scard.is-leaving { transition: none; }
  .swt-orb { transform: none; box-shadow: 0 0 8px color-mix(in srgb, var(--orb) 50%, transparent); }
  .swt-orb::before, .swt-orb::after { animation: none; }
  .swt-orb[data-state="speaking"]::before, .swt-orb[data-state="listening"]::before { opacity: .6; }
  .swt-orb[data-state="thinking"]::after { opacity: .7; }
  .swt-chip:active { transform: none; }
  .swt-chip.is-asked, .swt-scard.is-new, .swt-pend { animation: none; }
}

/* ── Final polish: one-row status on phone, icon mode control, strip fades, card age, shortcuts popover, focus rings ── */
.swt-seg-ico { display: none; flex: none; }
.swt-seg-opt { display: inline-flex; align-items: center; justify-content: center; }
.swt-scard-age { flex: none; font-size: 12px; font-weight: 450; color: var(--text-muted, #6b6c64); font-variant-numeric: tabular-nums; white-space: nowrap; }
.swt-keys[hidden] { display: none; }
.swt-keys { display: none; }
.swt-strip-list { scroll-snap-type: x proximity; }
.swt-chip { scroll-snap-align: start; }
.swt-strip-list[data-fade="end"] { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); }
.swt-strip-list[data-fade="start"] { -webkit-mask-image: linear-gradient(90deg, transparent, #000 22px); mask-image: linear-gradient(90deg, transparent, #000 22px); }
.swt-strip-list[data-fade="both"] { -webkit-mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent); }

.swt-chip:focus-visible, .swt-seg-opt:focus-visible, .swt-tx-log:focus-visible, .swt-scard-mv:focus-visible, .swt-scard-exp:focus-visible, .swt-scard-x:focus-visible,
.swt-scard-table tr.is-tap:focus-visible { outline: 2px solid var(--accent, #b0664a); outline-offset: -2px; }

@media (max-width: 900px) {
  .swt-status-row { flex-wrap: nowrap; }
  .swt-act { max-width: 40%; }
  .swt-seg-lbl { display: none; }
  .swt-seg-ico { display: block; }
  .swt-seg-opt { min-width: 44px; min-height: 44px; padding: 0 8px; }
  .swt-padtoggle { min-height: 44px; }
  .swt-scard-mv, .swt-scard-exp, .swt-scard-x { min-height: 44px; }
  .swt-tx-latest { min-height: 44px; }
}
@media (min-width: 901px) {
  .swt-keys:not([hidden]) {
    display: block; position: absolute; top: calc(100% + 6px); right: 0; z-index: 6; min-width: 200px; padding: 0 0 6px; overflow: hidden;
    border: 1px solid var(--border, #d4d2cb); border-radius: 12px; background: var(--surface, #fff); box-shadow: 0 8px 28px rgba(0, 0, 0, .22);
    animation: swt-rise .16s cubic-bezier(.2, .8, .2, 1);
  }
  .swt-keys-title { padding: 6px 12px; background: var(--surface-2, #e4e3df); font-size: 15px; font-weight: 700; }
  .swt-keys-row { display: flex; align-items: center; gap: 10px; padding: 5px 12px 0; font-size: 13px; color: var(--text-muted, #6b6c64); }
  .swt-kbd { flex: none; min-width: 34px; padding: 2px 6px; border-radius: 6px; background: var(--surface-2, #e4e3df); color: var(--text, #0d0d0b); font: 600 12px/1.3 var(--font, system-ui, sans-serif); text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .swt-keys { animation: none; } .swt-strip-list { scroll-behavior: auto; scroll-snap-type: none; } }

/* While Jarvis works the activity line takes the status slot (status stays for screen readers). */
.swt-vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.swt-orb ~ .swt-vh + .swt-act, .swt-vh + .swt-act { flex: 1 1 auto; min-width: 0; max-width: none; }

/* Screen toggle (S): a compact pill beside the transcript control; the slash shows when the screen is off. */
.swt-scr {
  display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 34px; padding: 0 10px; border: 0; border-radius: 12px;
  background: var(--bg-secondary, var(--surface-2, #e4e3df)); color: var(--text, #0d0d0b);
  font: 600 13px/1 var(--font, system-ui, sans-serif); cursor: pointer; touch-action: manipulation; transition: transform .1s ease-out, background .15s ease;
}
.swt-scr[hidden] { display: none; }
.swt-scr:active { transform: scale(.97); }
.swt-scr:focus-visible { outline: 2px solid var(--accent, #b0664a); outline-offset: 1px; }
.swt-scr .swt-scr-slash { opacity: 0; }
.swt-scr.is-off { color: var(--text-muted, #6b6c64); font-weight: 500; }
.swt-scr.is-off .swt-scr-slash { opacity: 1; }
@media (pointer: coarse) { .swt-scr { min-height: 44px; } }
@media (max-width: 520px) { .swt-scr-lbl { display: none; } .swt-scr { min-width: 44px; justify-content: center; padding: 0 8px; } }
@media (min-width: 901px) { .swt-scr { min-height: 30px; } }
/* Volume step: same pill as Screen; the label shows the step, icon only on phones. */
.swt-vol { min-width: 0; }
.swt-vol .swt-scr-lbl { min-width: 3.2em; text-align: left; }
@media (max-width: 520px) { .swt-vol .swt-scr-lbl { display: none; } }

/* Screen off: cards fold away, the orb + captions stay; one quiet tappable line says why. */
.swt-scroff {
  align-self: center; max-width: 100%; min-height: 32px; padding: 0 14px; border: 0; border-radius: 16px; background: transparent;
  color: var(--text-muted, #6b6c64); font: 450 12px/1.3 var(--font, system-ui, sans-serif); text-align: center; cursor: pointer; touch-action: manipulation;
}
.swt-scroff[hidden] { display: none; }
.swt-scroff:active { opacity: .6; }
.swt-scroff:focus-visible { outline: 2px solid var(--accent, #b0664a); outline-offset: 1px; }
.swt-scr-off.swt-tx-side.swt-tx-withcards .swt-tx { flex: 1 1 0; }
/* Desktop, screen off: one column (transcript, the quiet line, any finished pages) at the transcript width; no empty middle. */
@media (min-width: 901px) {
  .swt.swt-stage.swt-scr-off.swt-tx-withcards { width: min(720px, calc(100vw - 32px)); }
  .swt-scr-off.swt-tx-withcards .swt-stagebox { flex-direction: column; }
  .swt-scr-off.swt-tx-side.swt-tx-withcards .swt-tx { flex: 1 1 0; }
  .swt-scr-off.swt-tx-withcards .swt-screen { flex: 0 0 auto; }
}

/* Artifact card: compact title + "Page ready" + Open. */
.swt-scard-art { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 4px 6px 12px; }
.swt-scard-ready { font-size: 13px; font-weight: 450; color: var(--text-muted, #6b6c64); }
.swt-scard-open {
  min-height: 36px; min-width: 64px; padding: 0 16px; border: 0; border-radius: 18px; background: var(--accent, #b0664a); color: #fff;
  font: 600 13px/1 var(--font, system-ui, sans-serif); cursor: pointer; touch-action: manipulation; transition: transform .1s ease-out;
}
.swt-scard-open:active { transform: scale(.97); }
.swt-scard-open:focus-visible { outline: 2px solid var(--accent, #b0664a); outline-offset: 2px; }
@media (pointer: coarse) { .swt-scard-open { min-height: 44px; } }

@media (prefers-reduced-motion: reduce) { .swt-scr, .swt-scard-open { transition: none; } }

/* ── Review round: pulse, Updated tag, Pages list, usage chip, Esc hints ── */
.swt-scard-upd { flex: none; padding: 2px 8px; border-radius: 10px; background: color-mix(in srgb, var(--success, #15803d) 18%, var(--surface, #fff)); color: var(--text, #0d0d0b); font-size: 12px; font-weight: 600; white-space: nowrap; }
.swt-scard.is-pulse { box-shadow: 0 0 0 2px var(--accent, #b0664a); }
.swt-scard.is-pulse .swt-scard-ready { color: var(--text, #0d0d0b); font-weight: 600; animation: swt-ready 1.2s ease-in-out infinite; }
@keyframes swt-ready { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.swt-usage { flex: none; padding: 2px 8px; border-radius: 10px; background: var(--surface-2, #e4e3df); color: var(--text-muted, #6b6c64); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.swt-usage[hidden] { display: none; }
.swt-usage[data-level="high"] { background: color-mix(in srgb, var(--warning, #d97706) 22%, var(--surface, #fff)); color: var(--text, #0d0d0b); }
.swt-usage[data-level="over"] { background: color-mix(in srgb, var(--danger, #dc2626) 20%, var(--surface, #fff)); color: var(--danger, #dc2626); }

.swt-hanghint { text-align: center; font-size: 12px; font-weight: 600; color: var(--danger, #dc2626); margin-bottom: -4px; }
.swt-hanghint[hidden] { display: none; }

.swt-pages-btn { flex: none; background: var(--bg-secondary, var(--surface-2, #e4e3df)); min-height: 34px; padding: 0 10px; border-radius: 12px; white-space: nowrap; }
.swt-pages-btn[hidden], .swt-pagesbox[hidden] { display: none; }
.swt-pages-btn[aria-expanded="true"] { background: color-mix(in srgb, var(--accent, #b0664a) 16%, var(--surface, #fff)); }
.swt-pagesbox { display: flex; flex-direction: column; gap: 4px; }
.swt-prow { display: flex; align-items: center; gap: 8px; padding: 0 0 0 12px; min-height: 36px; border-bottom: 1px solid var(--border, #d4d2cb); }
.swt-prow:last-child { border-bottom: 0; }
.swt-prow-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swt-popen {
  flex: none; min-height: 32px; min-width: 64px; padding: 0 14px; border: 0; border-radius: 16px; background: var(--accent, #b0664a); color: #fff;
  font: 600 13px/1 var(--font, system-ui, sans-serif); cursor: pointer; touch-action: manipulation; transition: transform .1s ease-out;
}
.swt-popen:active { transform: scale(.97); }
.swt-popen:disabled { background: var(--surface-2, #e4e3df); color: var(--text-muted, #6b6c64); cursor: default; }
.swt-popen:focus-visible { outline: 2px solid var(--accent, #b0664a); outline-offset: 2px; }
@media (max-width: 900px) { .swt-status-row:has(.swt-pages-btn:not([hidden])) { flex-wrap: wrap; } }
@media (min-width: 901px) { .swt-pages-btn { min-height: 30px; } }
@media (prefers-reduced-motion: reduce) { .swt-scard.is-pulse .swt-scard-ready { animation: none; } .swt-popen { transition: none; } .swt-popen:active { transform: none; } }

/* Touch: every control is a 44px target, whatever the width (later than the desktop min-width rules on purpose). */
@media (pointer: coarse) {
  .swt-seg-opt, .swt-scr, .swt-tab, .swt-chipbtn, .swt-x, .swt-scard-x, .swt-scard-mv, .swt-scard-exp, .swt-popen, .swt-pages-btn { min-height: 44px; min-width: 44px; }
}

/* Page tiles: pages open inside the call sheet, 1-6 at once, in one grid. Soft surfaces separated by shadow, no borders. */
.swt-workcol { display: contents; }
.swt-sidecol { display: contents; } /* transcript + waiting list; one column beside the pages on desktop, see below */
.swt .swt-sidecol[hidden] { display: none; }
.swt-tiles[hidden] { display: none; }
.swt-has-tiles .swt-voice { flex: 1; min-height: 0; }
.swt.swt-has-tiles .swt-stagebox { display: flex; flex-direction: column; gap: 8px; flex: 1 1 0; min-width: 0; min-height: 0; }
.swt-has-tiles .swt-workcol { display: flex; flex-direction: column; gap: 8px; flex: 1 1 0; min-width: 0; min-height: 0; }
.swt.swt-stage.swt-has-tiles .swt-screen, .swt.swt-stage.swt-tx-side.swt-tx-withcards.swt-has-tiles .swt-screen { flex: 0 1 auto; max-height: 26%; min-height: 0; }
.swt-tiles { display: grid; gap: 10px; flex: 1 1 0; min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; grid-auto-rows: minmax(240px, 1fr); }
.swt-tiles[data-n="1"], .swt-tiles[data-focus="1"] { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.swt-tiles[data-focus="1"] .swt-tile:not(.is-focus) { display: none; }
.swt-tile { display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 0; border-radius: 14px; overflow: hidden; background: var(--surface, #fff); box-shadow: 0 1px 3px rgba(0, 0, 0, .14), 0 0 0 1px rgba(0, 0, 0, .04); }
.swt-tile.is-new { animation: swt-tile-in .16s ease-out; }
@keyframes swt-tile-in { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
.swt-tile-head { flex: none; display: flex; align-items: center; gap: 2px; height: 32px; padding: 0 4px 0 12px; background: var(--surface-2, #e4e3df); }
.swt-tile-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text, #0d0d0b); }
.swt-tile-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--text-muted, #6b6c64); cursor: pointer; touch-action: manipulation; transition: transform .1s ease-out, background-color .12s ease; }
.swt-tile-btn[hidden] { display: none; }
.swt-tile-btn svg { display: block; pointer-events: none; }
.swt-tile-btn:hover { background: color-mix(in srgb, var(--text, #0d0d0b) 8%, transparent); }
.swt-tile-btn:active { transform: scale(.97); }
.swt-tile-btn:focus-visible { outline: 2px solid var(--accent, #b0664a); outline-offset: -2px; }
/* Card tiles: the card's own body (table, chart, KPIs, deck) scrolls inside the tile; a wide table scrolls sideways inside it, never the tile. */
.swt-cbody { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; background: var(--surface, #fff); color: var(--text, #0d0d0b); }
.swt-cbody:focus-visible { outline: 2px solid var(--accent, #b0664a); outline-offset: -2px; }
.swt-ctile .swt-scard-text { max-height: none; overflow-y: visible; }
.swt-ctile .swt-chart-svg { max-height: min(46dvh, 320px); }
.swt-ctile .swt-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.swt-ctile .swt-scard-table thead, .swt-ctile .swt-scard-table th { background: var(--surface-2, #e4e3df); }
.swt-ctile .swt-scard-table th { font-size: 13px; font-weight: 700; line-height: 1.3; color: var(--text, #0d0d0b); }
.swt-ctile[data-kind="board"] .swt-scard-table th { white-space: normal; }
.swt-ctile[data-kind="board"] .swt-scard-table td:last-child { min-width: 110px; }
.swt-ctile[data-kind="board"] .swt-scard-table th, .swt-ctile[data-kind="board"] .swt-scard-table td { padding: 6px 8px; }
.swt-tile-left { margin: 0; padding: 14px 12px; color: var(--text-muted, #6b6c64); font-size: 13px; line-height: 1.4; background: var(--surface, #fff); }
/* Chunked page: loading state (title bar stays; thin progress bar + percentage), stall state, live-data strip. */
.swt-tile-load { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px 20px; background: var(--surface, #fff); color: var(--text-muted, #6b6c64); text-align: center; }
.swt-tile-load-t { margin: 0; max-width: 100%; font-size: 13px; line-height: 1.4; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.swt-tile-load-bar { width: min(220px, 100%); height: 3px; border-radius: 2px; background: var(--surface-2, #e4e3df); overflow: hidden; }
.swt-tile-load-fill { width: 0; height: 100%; border-radius: 2px; background: var(--accent, #b0664a); transition: width .25s ease-out; }
.swt-tile-load.is-stalled .swt-tile-load-bar { display: none; }
.swt-tile-load-retry { min-height: 30px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--accent, #b0664a); color: #fff; font: 600 13px/1 var(--font, system-ui, sans-serif); cursor: pointer; touch-action: manipulation; transition: transform .1s ease-out; }
.swt-tile-load-retry[hidden] { display: none; }
.swt-tile-load-retry:active { transform: scale(.97); }
.swt-tile-load-retry:focus-visible { outline: 2px solid var(--accent, #b0664a); outline-offset: 2px; }
.swt-tile-host { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; padding: 4px 10px; background: var(--surface-2, #e4e3df); color: var(--text-muted, #6b6c64); font-size: 12px; line-height: 1.35; }
.swt-tile-host-t { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.swt-tile-host-open { flex: none; padding: 2px 0; border: 0; background: transparent; color: var(--text, #0d0d0b); font: 600 12px/1.3 var(--font, system-ui, sans-serif); text-decoration: underline; cursor: pointer; touch-action: manipulation; }
.swt-tile-host-open:focus-visible { outline: 2px solid var(--accent, #b0664a); outline-offset: 2px; border-radius: 4px; }
.swt-prow-orig, .swt-spage-orig { flex: none; }
.swt-tile-frame { flex: 1; min-height: 0; width: 100%; border: 0; background: var(--surface, #fff); }
@media (pointer: coarse) { .swt-tile-head { height: 36px; } .swt-tile-btn { width: 36px; height: 36px; } }
@media (max-width: 900px) {
  .swt-tiles[data-n="2"] { grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(2, minmax(170px, 1fr)); }
  /* three or more: one column, each page about 68% of the area, the next one peeks; swipe between them */
  .swt-tiles[data-n="3"], .swt-tiles[data-n="4"], .swt-tiles[data-n="5"], .swt-tiles[data-n="6"] { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 68%; scroll-snap-type: y proximity; }
  .swt-tiles[data-n] .swt-tile { scroll-snap-align: start; }
  .swt-tiles[data-n][data-focus="1"] { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); grid-auto-rows: minmax(0, 1fr); scroll-snap-type: none; }
  .swt.swt-has-tiles .swt-tx { display: none; } /* the pages take the room; the caption line above still shows what is said */
  .swt.swt-stage.swt-has-tiles .swt-screen, .swt.swt-stage.swt-tx-side.swt-tx-withcards.swt-has-tiles .swt-screen { max-height: 18%; }
  .swt.swt-has-tiles .swt-workcol { order: 1; }
  .swt.swt-has-tiles .swt-rail { order: 2; }
}
@media (min-width: 901px) {
  .swt.swt-stage.swt-has-tiles, .swt.swt-stage.swt-tx-on.swt-has-tiles, .swt.swt-stage.swt-tx-withcards.swt-has-tiles,
  .swt.swt-stage.swt-scr-off.swt-tx-withcards.swt-has-tiles { width: min(1320px, calc(100vw - 32px)); height: min(900px, calc(100dvh - 40px)); }
  .swt.swt-has-tiles .swt-stagebox { flex-direction: row; gap: 10px; }
  .swt.swt-stage.swt-has-tiles .swt-screen, .swt.swt-stage.swt-tx-side.swt-tx-withcards.swt-has-tiles .swt-screen { max-height: 30%; }
  /* one side column: the transcript on top, the waiting list under it; no room taken when neither shows */
  .swt.swt-has-tiles .swt-sidecol { display: flex; flex-direction: column; gap: 10px; flex: 0 0 232px; min-width: 0; min-height: 0; }
  .swt.swt-has-tiles .swt-sidecol[hidden] { display: none; }
  .swt.swt-has-tiles .swt-sidecol > .swt-tx { flex: 1 1 0; min-width: 0; }
  .swt.swt-has-tiles .swt-sidecol > .swt-rail { flex: 0 1 auto; max-height: 48%; }
  .swt.swt-has-tiles .swt-sidecol > .swt-tx[hidden] ~ .swt-rail { flex: 1 1 auto; max-height: none; }
  .swt-tiles { grid-auto-rows: minmax(0, 1fr); }
  .swt-tiles[data-n="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); }
  .swt-tiles[data-n="3"] { grid-template-columns: 1.25fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .swt-tiles[data-n="3"] .swt-tile:first-child { grid-row: 1 / span 2; }
  .swt-tiles[data-n="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .swt-tiles[data-n="5"], .swt-tiles[data-n="6"] { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .swt-tiles[data-n][data-focus="1"] { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
}
/* Spotlight: the tile Jarvis is talking about. The top edge is an inset shadow so the header height never changes. */
.swt-tile-head { transition: background-color .18s ease, box-shadow .18s ease; }
.swt-tile.is-spot .swt-tile-head { background: color-mix(in srgb, var(--success, #15803d) 22%, var(--surface, #fff)); box-shadow: inset 0 3px 0 var(--success, #15803d); }
.swt-spot-glyph { display: none; flex: none; align-items: center; gap: 2px; height: 12px; margin-right: 6px; }
.swt-tile.is-spot .swt-spot-glyph { display: inline-flex; }
.swt-spot-glyph i { display: block; width: 2px; height: 12px; border-radius: 1px; background: var(--success, #15803d); transform: scaleY(.45); }
.swt-tile.is-spot-live .swt-spot-glyph i { animation: swt-spot-bar .7s ease-in-out infinite alternate; }
.swt-tile.is-spot-live .swt-spot-glyph i:nth-child(2) { animation-delay: .15s; }
.swt-tile.is-spot-live .swt-spot-glyph i:nth-child(3) { animation-delay: .3s; }
@keyframes swt-spot-bar { from { transform: scaleY(.3); } to { transform: scaleY(1); } }
.swt-rail-row.is-spot { box-shadow: inset 3px 0 0 var(--success, #15803d); background: color-mix(in srgb, var(--success, #15803d) 12%, transparent); }
@media (prefers-reduced-motion: reduce) { .swt-tile-head { transition: none; } .swt-spot-glyph i { animation: none !important; } }
@media (prefers-reduced-motion: reduce) { .swt-tile-load-fill, .swt-tile-load-retry { transition: none; } .swt-tile-load-retry:active { transform: none; } .swt-tile-btn { transition: none; } .swt-tile-btn:active { transform: none; } .swt-tile.is-new { animation: none; } }

/* More than six pages: the extra ones wait in a list (under the transcript on desktop, a collapsed bar below the pages on a phone). */
.swt-tilewrap { display: flex; gap: 8px; flex: 1 1 0; min-width: 0; min-height: 0; }
.swt-tilewrap[hidden], .swt-rail[hidden], .swt-rail-list[hidden] { display: none; }
.swt-tilewrap > .swt-tiles { flex: 1 1 0; }
.swt-rail { display: flex; flex-direction: column; min-height: 0; border: 0; border-radius: 14px; overflow: hidden; background: var(--surface, #fff); box-shadow: 0 1px 3px rgba(0, 0, 0, .14), 0 0 0 1px rgba(0, 0, 0, .04); }
.swt-rail-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 40px; padding: 0 12px; border: 0; background: var(--surface-2, #e4e3df); color: var(--text, #0d0d0b); font: 700 15px/1.2 var(--font, system-ui, sans-serif); text-align: left; }
button.swt-rail-head { cursor: pointer; touch-action: manipulation; }
button.swt-rail-head:focus-visible { outline: 2px solid var(--accent, #b0664a); outline-offset: -2px; }
.swt-rail-chev { flex: none; transition: transform .15s ease; }
.swt-rail-head[aria-expanded="true"] .swt-rail-chev { transform: rotate(180deg); }
.swt-rail-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.swt-rail-row { display: flex; align-items: flex-start; gap: 2px; padding-right: 4px; border-top: 1px solid var(--border, #d4d2cb); transition: background-color .12s ease; }
.swt-rail-row:first-child { border-top: 0; }
.swt-rail-row:hover { background: color-mix(in srgb, var(--text, #0d0d0b) 5%, transparent); }
.swt-rail-open { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 8px 4px 8px 12px; border: 0; background: transparent; color: var(--text, #0d0d0b); font: inherit; text-align: left; cursor: pointer; touch-action: manipulation; transition: transform .1s ease-out; }
.swt-rail-open:active { transform: scale(.98); }
.swt-rail-open:focus-visible, .swt-rail-x:focus-visible { outline: 2px solid var(--accent, #b0664a); outline-offset: -2px; border-radius: 10px; }
.swt-rail-title { display: block; font-size: 14px; font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text, #0d0d0b); }
.swt-rail-sum { display: -webkit-box; font-size: 12px; font-weight: 450; line-height: 1.35; color: var(--text-muted, #6b6c64); -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.swt-rail-x { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-top: 6px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--text-muted, #6b6c64); cursor: pointer; touch-action: manipulation; transition: transform .1s ease-out, background-color .12s ease; }
.swt-rail-x:hover { background: color-mix(in srgb, var(--text, #0d0d0b) 8%, transparent); }
.swt-rail-x:active { transform: scale(.97); }
.swt-rail-x svg { display: block; pointer-events: none; }
@media (pointer: coarse) { .swt-rail-x { width: 44px; height: 44px; margin-top: 0; } .swt-rail-head { min-height: 44px; } }
@media (max-width: 900px) {
  .swt-tilewrap { flex-direction: column; }
  .swt-rail { flex: 0 0 auto; }
  .swt-rail-list { max-height: 168px; }
}
@media (prefers-reduced-motion: reduce) { .swt-rail-chev, .swt-rail-open, .swt-rail-x, .swt-rail-row { transition: none; } .swt-rail-open:active, .swt-rail-x:active { transform: none; } }

/* Session tiles: one live session as a document under the same slim header as a page tile (summary, what it waits on, the
   last things said with real tables, its pages). Titles bold and bigger than their content; section titles sit on a soft band. */
.swt-stile { container-type: inline-size; container-name: stile; }
.swt-stile .swt-tile-head { gap: 6px; }
.swt-stile .swt-tile-title { flex: 1 1 auto; min-width: 45%; }
.swt-spill { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap; color: var(--text-muted, #6b6c64); background: color-mix(in srgb, var(--text-muted, #6b6c64) 16%, transparent); }
.swt-spill-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.swt-spill[data-state="working"] .swt-spill-dot { animation: swt-spill-pulse 1.6s ease-in-out infinite; }
.swt-spill[data-state="waiting"] { color: var(--text, #0d0d0b); background: color-mix(in srgb, var(--accent, #b0664a) 22%, transparent); }
.swt-spill[data-state="waiting"] .swt-spill-dot { background: var(--accent, #b0664a); opacity: 1; }
.swt-spill[data-state="done"] { color: var(--text, #0d0d0b); background: color-mix(in srgb, var(--success, #15803d) 20%, transparent); }
.swt-spill[data-state="done"] .swt-spill-dot { background: var(--success, #15803d); opacity: 1; }
.swt-spill[data-stalled="1"] { color: var(--text, #0d0d0b); background: color-mix(in srgb, var(--warning, #d97706) 24%, transparent); }
.swt-spill[data-stalled="1"] .swt-spill-dot { background: var(--warning, #d97706); opacity: 1; animation: none; }
@keyframes swt-spill-pulse { 0%, 100% { opacity: .85; } 50% { opacity: .25; } }
.swt-sage { flex: none; font-size: 12px; font-weight: 450; line-height: 1; color: var(--text-muted, #6b6c64); white-space: nowrap; font-variant-numeric: tabular-nums; }
.swt-sage[hidden] { display: none; }
@container stile (max-width: 300px) { .swt-sage { display: none; } .swt-spill { padding: 0 7px; } }
.swt-sstat { display: none; margin: 0; padding: 0 12px 8px; font-size: 13px; font-weight: 450; line-height: 1.3; color: var(--text-muted, #6b6c64); font-variant-numeric: tabular-nums; }
.swt-sstat-t { font-weight: 600; }
.swt-sstat[data-state="waiting"] .swt-sstat-t { color: var(--accent, #b0664a); }
.swt-sstat[data-state="done"] .swt-sstat-t { color: var(--success, #15803d); }
.swt-sstat[data-stalled="1"] .swt-sstat-t { color: var(--warning, #d97706); }
/* a narrow tile (phone 3x2): the pill is only its dot, the time moves to the status row, the name keeps the room */
@container stile (max-width: 479px) {
  .swt-spill { padding: 0; width: 10px; height: 10px; min-width: 0; background: transparent; }
  .swt-spill-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .swt-spill-dot { width: 8px; height: 8px; }
  .swt-sage { display: none; }
  .swt-sstat { display: block; }
}
@media (pointer: coarse) { @container stile (max-width: 479px) { .swt-stile .swt-tile-btn { width: 40px; } } }

.swt-sbody { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 8px 0 12px; background: var(--surface, #fff); color: var(--text, #0d0d0b); }
.swt-sbody > * { max-width: 860px; }
.swt-sbody:focus-visible { outline: 2px solid var(--accent, #b0664a); outline-offset: -2px; }
.swt-ss + .swt-ss { margin-top: 12px; }
.swt-ss-title { padding: 6px 12px; font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--text, #0d0d0b); background: color-mix(in srgb, var(--surface-2, #e4e3df) 55%, var(--surface, #fff)); }
.swt-ss-body { min-width: 0; padding: 10px 12px 0; }
.swt-ss-recap { margin: 0; font-size: 14px; font-weight: 400; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.swt-ss-recap.swt-md { white-space: normal; }
.swt-ss-empty { margin: 0; font-size: 13px; line-height: 1.4; color: var(--text-muted, #6b6c64); }
.swt-ss-recap + .swt-ss-ask { margin-top: 10px; }
.swt-sbtns-wrap { margin-top: 10px; min-width: 0; }
.swt-sbtns { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.swt-sbtn { flex: 0 1 auto; max-width: 100%; min-width: 0; min-height: 0; height: 30px; padding: 0 12px; border: 1px solid color-mix(in srgb, var(--accent, #b0664a) 45%, transparent); border-radius: 15px; background: color-mix(in srgb, var(--accent, #b0664a) 10%, var(--surface, #fff)); color: var(--text, #0d0d0b); font: 600 13px/1 var(--font, system-ui, sans-serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; touch-action: manipulation; transition: transform .1s ease-out, background-color .12s ease, opacity .12s ease; }
.swt-sbtn:hover:not(:disabled) { background: color-mix(in srgb, var(--accent, #b0664a) 18%, var(--surface, #fff)); }
.swt-sbtn:active:not(:disabled) { transform: scale(.97); }
.swt-sbtn:focus-visible { outline: 2px solid var(--accent, #b0664a); outline-offset: 2px; }
.swt-sbtn:disabled { opacity: .5; cursor: default; }
.swt-sbtn.is-asked { background: color-mix(in srgb, var(--accent, #b0664a) 26%, var(--surface, #fff)); }
.swt-sbtns-note { margin: 6px 0 0; font-size: 12px; font-weight: 400; line-height: 1.3; color: var(--text-muted, #6b6c64); }
@media (pointer: coarse) { .swt-sbtn { height: 36px; } }
.swt-stile .swt-tile-head.is-nudge { animation: swt-nudge 600ms ease-in-out 2; }
@keyframes swt-nudge { 0%, 100% { background-color: transparent; } 50% { background-color: color-mix(in srgb, var(--warning, #d97706) 32%, transparent); } }
.swt-rail-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; vertical-align: middle; background: var(--warning, #d97706); }
.swt-ss-ask { padding: 8px 12px 10px; border-radius: 10px; background: color-mix(in srgb, var(--accent, #b0664a) 12%, var(--surface, #fff)); }
.swt-ss-ask-t { font-size: 15px; font-weight: 700; line-height: 1.3; }
.swt-ss-ask-x { margin-top: 2px; font-size: 14px; font-weight: 400; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }

.swt-st { min-width: 0; padding: 10px 0; }
.swt-st:first-child { padding-top: 0; }
.swt-st + .swt-st { border-top: 1px solid var(--border, #d4d2cb); }
.swt-st-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; min-width: 0; }
.swt-st-who { min-width: 0; font-size: 13px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text, #0d0d0b); }
.swt-st[data-who="you"] .swt-st-who { color: var(--text-muted, #6b6c64); }
.swt-st-time { flex: none; font-size: 12px; font-weight: 450; line-height: 1.3; color: var(--text-muted, #6b6c64); font-variant-numeric: tabular-nums; white-space: nowrap; }
.swt-st-text { min-width: 0; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.swt-st-you { font-size: 13px; font-weight: 400; color: var(--text-muted, #6b6c64); white-space: pre-wrap; }
.swt-st-you.is-clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.swt-md.is-fold { position: relative; max-height: 220px; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent); }
.swt-more { display: inline-flex; align-items: center; min-height: 28px; margin: 2px 0 -4px; padding: 0 2px; border: 0; background: transparent; color: var(--text-muted, #6b6c64); font: 600 12px/1 var(--font, system-ui, sans-serif); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; touch-action: manipulation; transition: transform .1s ease-out; }
.swt-more[hidden] { display: none; }
.swt-more:active { transform: scale(.97); }
.swt-more:focus-visible { outline: 2px solid var(--accent, #b0664a); outline-offset: 1px; border-radius: 4px; }
@media (pointer: coarse) { .swt-more { min-height: 36px; } }

/* the markdown a session writes */
.swt-md > :first-child { margin-top: 0; }
.swt-md > :last-child { margin-bottom: 0; }
.swt-md-p { margin: 0 0 .6em; font-size: 14px; font-weight: 400; line-height: 1.5; }
.swt-md-h { margin: .9em 0 .35em; font-weight: 700; line-height: 1.3; color: var(--text, #0d0d0b); }
.swt-md-h1 { font-size: 16px; } .swt-md-h2 { font-size: 15px; } .swt-md-h3, .swt-md-h4 { font-size: 14px; }
.swt-md-list { margin: 0 0 .6em; padding-left: 1.35em; font-size: 14px; line-height: 1.5; }
.swt-md-list .swt-md-list { margin: .15em 0 0; }
.swt-md-list li + li { margin-top: .15em; }
.swt-md-quote { margin: 0 0 .6em; padding: 0 0 0 10px; border-left: 3px solid var(--border, #d4d2cb); color: var(--text-muted, #6b6c64); }
.swt-md-hr { height: 0; margin: .8em 0; border: 0; border-top: 1px solid var(--border, #d4d2cb); }
.swt-md-code { padding: 1px 5px; border-radius: 5px; background: color-mix(in srgb, var(--text-muted, #6b6c64) 16%, transparent); font: 500 .9em/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.swt-md-pre { margin: 0 0 .7em; padding: 9px 12px; border-radius: 10px; overflow-x: auto; background: var(--surface-2, #e4e3df); font: 400 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; }
.swt-md-pre code { font: inherit; }
.swt-md-cut { color: var(--text-muted, #6b6c64); }
.swt-md-tblwrap { margin: .2em 0 .8em; max-width: 100%; overflow-x: auto; border-radius: 10px; box-shadow: 0 0 0 1px var(--border, #d4d2cb); -webkit-overflow-scrolling: touch; }
.swt-md-tblwrap:focus-visible { outline: 2px solid var(--accent, #b0664a); outline-offset: 1px; }
.swt-md-tbl { width: 100%; table-layout: auto; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.swt-md-tbl th, .swt-md-tbl td { padding: 6px 10px; text-align: left; vertical-align: top; white-space: normal; overflow-wrap: anywhere; min-width: 88px; max-width: 44ch; }
.swt-md-tbl th { background: var(--surface-2, #e4e3df); font-size: 13px; font-weight: 700; line-height: 1.3; color: var(--text, #0d0d0b); border-bottom: 1px solid var(--border, #d4d2cb); }
.swt-md-tbl td { font-size: 13px; font-weight: 450; line-height: 1.4; overflow-wrap: anywhere; }
.swt-md-tbl td:first-child { font-weight: 600; }
.swt-md-tbl tbody tr + tr td { border-top: 1px solid var(--border, #d4d2cb); }
.swt-md-tbl .is-num { text-align: right; white-space: nowrap; min-width: 0; }
.swt-ss-summary .swt-md-h { margin: .5em 0 .25em; font-size: 14px; }
.swt-md-tbl .is-ctr { text-align: center; }

.swt-spage-row { display: flex; align-items: center; gap: 2px; }
.swt-spage-row + .swt-spage-row { border-top: 1px solid var(--border, #d4d2cb); }
.swt-spage { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 4px 0 0; border: 0; background: transparent; color: var(--text, #0d0d0b); font: 600 14px/1.3 var(--font, system-ui, sans-serif); text-align: left; cursor: pointer; touch-action: manipulation; transition: transform .1s ease-out, background-color .12s ease; }
.swt-spage:hover { background: color-mix(in srgb, var(--text, #0d0d0b) 5%, transparent); }
.swt-spage:active { transform: scale(.98); }
.swt-spage:focus-visible { outline: 2px solid var(--accent, #b0664a); outline-offset: -2px; border-radius: 6px; }
.swt-spage-ic, .swt-spage-ch { flex: none; display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; color: var(--text-muted, #6b6c64); }
.swt-spage.is-big { cursor: default; color: var(--text-muted, #6b6c64); }
.swt-spage.is-big:hover { background: transparent; }
.swt-spage.is-big:active { transform: none; }
.swt-spage-note { flex: none; font-size: 12px; font-weight: 400; color: var(--text-muted, #6b6c64); white-space: nowrap; }
.swt-spage-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swt-ss-pages .swt-ss-body { padding-top: 4px; }
.swt-sfoot { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 12px 12px 0; font-size: 12px; font-weight: 400; line-height: 1.4; color: var(--text-muted, #6b6c64); }
.swt-sfoot span { min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
@media (pointer: coarse) { .swt-spage { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .swt-spill-dot, .swt-stile .swt-tile-head.is-nudge { animation: none !important; } .swt-sbtn { transition: none; } .swt-sbtn:active { transform: none; } .swt-more, .swt-spage { transition: none; } .swt-more:active, .swt-spage:active { transform: none; } }

/* ── The call board (native board card): counts, then sessions grouped by what they need from the owner ── */
.swt-cboard { container: swtboard / inline-size; display: block; min-width: 0; }
.swt-bsum { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--surface-2, #e4e3df); }
.swt-bsum-c { min-width: 0; padding: 8px 6px 9px; text-align: center; }
.swt-bsum-l { font-size: 13px; font-weight: 700; line-height: 1.2; color: var(--text, #0d0d0b); overflow-wrap: anywhere; }
.swt-bsum-v { margin-top: 2px; font-size: 22px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--text-muted, #6b6c64); }
.swt-bsum-c.is-hot .swt-bsum-v { color: var(--accent, #b0664a); }
.swt-bgroup-head { display: flex; align-items: baseline; gap: 8px; padding: 6px 12px; background: color-mix(in srgb, var(--surface-2, #e4e3df) 55%, var(--surface, #fff)); font-size: 13px; font-weight: 700; line-height: 1.3; color: var(--text, #0d0d0b); }
.swt-bgroup-t { min-width: 0; overflow-wrap: anywhere; }
.swt-bgroup-n { flex: none; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--text-muted, #6b6c64); }
.swt-brow { display: flex; align-items: stretch; min-width: 0; }
.swt-brow + .swt-brow { border-top: 1px solid var(--border, #d4d2cb); }
.swt-brow-main { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr) auto; grid-template-areas: "name line age"; align-items: center; column-gap: 10px; padding: 7px 4px 7px 12px; border: 0; border-radius: 0; background: transparent; color: var(--text, #0d0d0b); font: inherit; text-align: left; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: transform .1s ease-out, background-color .12s ease; }
.swt-brow-main:hover { background: color-mix(in srgb, var(--text, #0d0d0b) 5%, transparent); }
.swt-brow-main:active { transform: scale(.99); }
.swt-brow-main:focus-visible, .swt-brow-say:focus-visible { outline: 2px solid var(--accent, #b0664a); outline-offset: -2px; }
.swt-brow-name { grid-area: name; display: flex; align-items: center; gap: 8px; min-width: 0; }
.swt-brow-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted, #6b6c64); opacity: .45; }
.swt-brow[data-state="working"] .swt-brow-dot { background: var(--info, #2f6fd0); opacity: 1; animation: swt-spill-pulse 1.6s ease-in-out infinite; }
.swt-brow[data-state="waiting"] .swt-brow-dot { background: var(--accent, #b0664a); opacity: 1; }
.swt-brow[data-state="done"] .swt-brow-dot { background: var(--success, #15803d); opacity: 1; }
.swt-brow[data-stuck] .swt-brow-dot { background: var(--warning, #d97706); opacity: 1; animation: none; }
.swt-brow-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 700; line-height: 1.3; }
.swt-brow-stuck { flex: none; padding: 1px 7px; border-radius: 10px; background: color-mix(in srgb, var(--warning, #d97706) 24%, transparent); color: var(--text, #0d0d0b); font-size: 12px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.swt-brow-line { grid-area: line; display: flex; align-items: center; gap: 8px; min-width: 0; }
.swt-brow-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 450; line-height: 1.35; color: var(--text-muted, #6b6c64); }
.swt-brow-text[data-ask="1"] { color: var(--text, #0d0d0b); font-weight: 500; }
.swt-brow-ctx { flex: none; font-size: 12px; font-weight: 450; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text-muted, #6b6c64); }
.swt-brow-n { flex: none; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 9px; background: color-mix(in srgb, var(--accent, #b0664a) 20%, transparent); color: var(--text, #0d0d0b); font-size: 12px; font-weight: 600; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.swt-brow-age { grid-area: age; justify-self: end; font-size: 12px; font-weight: 450; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text-muted, #6b6c64); }
.swt-brow-say { flex: none; align-self: center; width: 32px; height: 32px; margin: 0 4px 0 0; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: transparent; color: var(--text-muted, #6b6c64); cursor: pointer; touch-action: manipulation; transition: transform .1s ease-out, background-color .12s ease; }
.swt-brow-say svg { display: block; pointer-events: none; }
.swt-brow-say:hover { background: color-mix(in srgb, var(--text, #0d0d0b) 6%, transparent); color: var(--text, #0d0d0b); }
.swt-brow-say:active { transform: scale(.94); }
.swt-brow.is-asked { animation: swt-asked 1.2s ease; }
/* a narrow card (a phone, or a small tile): the line drops under the name, the age stays on the name's row */
@container swtboard (max-width: 479px) {
  .swt-brow-main { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name age" "line line"; row-gap: 2px; }
  .swt-bsum-v { font-size: 20px; }
}
.swt-brow-main[role="button"] { min-height: 0; }
@media (pointer: coarse) {
  .swt-brow-main { min-height: 44px; }
  .swt-brow-say { width: 44px; height: 44px; margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .swt-brow-main, .swt-brow-say { transition: none; }
  .swt-brow-main:active, .swt-brow-say:active { transform: none; }
  .swt-brow.is-asked, .swt-brow[data-state="working"] .swt-brow-dot { animation: none; }
}

/* an Artifact tag before a page title in a session tile's Pages section */
.swt-spage-tag { flex: none; padding: 1px 7px; border-radius: 10px; background: color-mix(in srgb, var(--accent, #b0664a) 18%, transparent); color: var(--text, #0d0d0b); font-size: 12px; font-weight: 600; line-height: 1.3; white-space: nowrap; }

/* ── Round 19 call screen: state label, one control row (Mute · Volume · ⋯ · Hang up), ⋯ menu, audio paused,
   frozen (ended) call, Mac offline ── */
.swt-status { font-size: 16px; font-weight: 650; line-height: 1.25; }
.swt-status[data-phase="active"][data-state="listening"] { color: var(--success, #15803d); }
.swt-status[data-phase="active"][data-state="thinking"] { color: var(--info, #2f6fd0); }
.swt-status[data-phase="active"][data-state="speaking"] { color: var(--accent, #b0664a); }
.swt-status[data-phase="active"][data-state="muted"] { color: var(--danger, #dc2626); }
.swt-status[data-phase="error"] { white-space: normal; overflow-wrap: anywhere; }
.swt-act { font-size: 13px; font-weight: 450; }

.swt-orb[data-state="muted"] { --orb: var(--text-muted, #6b6c64); }
.swt-orb[data-state="muted"]::after { inset: auto; left: -3px; right: -3px; top: calc(50% - 1px); height: 2px; border-radius: 1px; background: var(--danger, #dc2626); transform: rotate(-45deg); }

.swt-ctl { display: flex; align-items: center; gap: 8px; min-width: 0; }
.swt-ctl[hidden], .swt-menu[hidden], .swt-menu-sec[hidden], .swt-menu-row[hidden], .swt-paused[hidden], .swt-frozen-note[hidden] { display: none; }
.swt-ctl > .swt-scr { flex: none; min-height: 44px; }
.swt-morewrap { position: relative; flex: none; display: flex; }
.swt-morewrap:has(> .swt-morebtn[hidden]) { display: none; }
.swt-morebtn { min-width: 44px; justify-content: center; padding: 0 10px; font-size: 18px; font-weight: 700; letter-spacing: .02em; }
.swt-morebtn[aria-expanded="true"] { background: color-mix(in srgb, var(--accent, #b0664a) 16%, var(--surface, #fff)); }
.swt-mute.is-on { background: color-mix(in srgb, var(--danger, #dc2626) 16%, var(--surface, #fff)); color: var(--danger, #dc2626); }
.swt-ctl .swt-hang { flex: 1 1 0; min-width: 96px; min-height: 44px; padding: 0 16px; border-radius: 22px; font-size: 15px; }
@media (max-width: 520px) { .swt-mute .swt-scr-lbl { display: inline; } .swt-mute { padding: 0 10px; } }
@media (min-width: 901px) { .swt-ctl > .swt-scr, .swt-ctl .swt-hang { min-height: 36px; } }
@media (min-width: 901px) and (pointer: coarse) { .swt-ctl > .swt-scr, .swt-ctl .swt-hang { min-height: 44px; } }

/* The ⋯ menu: a popover placed by JS against its trigger (fixed, so the sheet's overflow never clips it). */
.swt-menu {
  position: fixed; z-index: 20; display: flex; flex-direction: column; gap: 2px; min-width: 236px; max-width: calc(100vw - 16px);
  padding: 0 0 6px; overflow: hidden; border-radius: 14px; background: var(--surface, #fff);
  box-shadow: 0 10px 32px rgba(0, 0, 0, .24), 0 0 0 1px var(--border, #d4d2cb);
  animation: swt-menu-in .16s cubic-bezier(.2, .8, .2, 1);
}
@keyframes swt-menu-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.swt-menu-sec { display: flex; flex-direction: column; gap: 6px; padding: 0 0 4px; }
.swt-menu-title { padding: 7px 12px; background: var(--surface-2, #e4e3df); font-size: 15px; font-weight: 700; line-height: 1.25; color: var(--text, #0d0d0b); }
.swt-menu .swt-seg { display: flex; margin: 0 8px; }
.swt-menu .swt-seg-opt { flex: 1 1 0; min-width: 0; }
.swt-menu .swt-seg-lbl { display: inline; }
.swt-menu .swt-seg-ico { display: none; }
.swt-menu .swt-menu-row {
  display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: calc(100% - 12px); min-width: 0; min-height: 40px; margin: 0 6px; padding: 0 10px;
  border: 0; border-radius: 10px; background: transparent; color: var(--text, #0d0d0b); font: 600 14px/1.2 var(--font, system-ui, sans-serif);
  text-align: left; cursor: pointer; touch-action: manipulation; transition: background-color .12s ease, transform .1s ease-out;
}
.swt-menu .swt-menu-row:hover { background: color-mix(in srgb, var(--text, #0d0d0b) 6%, transparent); }
.swt-menu .swt-menu-row:active { transform: scale(.98); }
.swt-menu .swt-scr-lbl { display: inline; flex: 1 1 auto; }
.swt-menu-state { margin-left: auto; font-size: 13px; font-weight: 450; color: var(--text-muted, #6b6c64); }
@media (pointer: coarse) { .swt-menu .swt-menu-row { min-height: 44px; } }

/* iOS took the audio away (a call, Siri, the lock screen): one tap brings it back. */
.swt-paused {
  min-height: 40px; padding: 0 14px; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--warning, #d97706) 22%, var(--surface, #fff));
  color: var(--text, #0d0d0b); font: 650 14px/1.25 var(--font, system-ui, sans-serif); text-align: center; cursor: pointer; touch-action: manipulation;
  transition: transform .1s ease-out;
}
.swt-paused:active { transform: scale(.98); }
.swt-paused:focus-visible { outline: 2px solid var(--accent, #b0664a); outline-offset: 2px; }

/* A call that dropped or ended: what it showed stays, read-only and clearly over. */
.swt-frozen-note { flex: none; align-self: flex-start; padding: 3px 10px; border-radius: 10px; background: var(--surface-2, #e4e3df); color: var(--text-muted, #6b6c64); font-size: 12px; font-weight: 600; }
.swt-frozen .swt-tile { opacity: .72; filter: saturate(.3); }
.swt-frozen .swt-tile-head { background: var(--bg-secondary, var(--surface-2, #e4e3df)); }

/* Mac offline: sessions are paused; their chips and tiles grey out and their clocks stop. */
.swt-strip-n.is-off { color: var(--text, #0d0d0b); }
.swt-strip-n.is-off::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--warning, #d97706); vertical-align: middle; }
.swt-mac-off .swt-chip, .swt-mac-off .swt-stile { filter: grayscale(1); opacity: .6; }

@media (prefers-reduced-motion: reduce) {
  .swt-menu { animation: none; }
  .swt-menu .swt-menu-row, .swt-paused { transition: none; }
  .swt-menu .swt-menu-row:active, .swt-paused:active { transform: none; }
}
