.tk1-shell { position: fixed; right: var(--space-4); bottom: var(--space-4); z-index: 80; display: flex; flex-direction: column; gap: var(--space-3); width: min(440px, calc(100dvw - var(--space-4))); max-height: calc(100dvh - var(--nav-h)); padding: var(--space-4); color: var(--ink); background: var(--ui-surface-raised); border: 1px solid var(--ink-16); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.tk1-header, .tk1-version-head, .tk1-version-actions, .tk1-confirm { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.tk1-header { justify-content: space-between; }
.tk1-title { margin: 0; font: var(--text-xl)/1.1 var(--display); }
.tk1-scope, .tk1-mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tk1-history { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.tk1-turn { padding-block: var(--space-3); border-top: 1px solid var(--ink-08); }
.tk1-turn:first-child { border-top: 0; }
.tk1-answer, .tk1-dissent, .tk1-citations, .tk1-preview, .tk1-versions, .tk1-confirm { margin-top: var(--space-3); padding: var(--space-3); border: 1px solid var(--ink-12); border-radius: var(--radius-md); background: var(--ink-02); }
.tk1-dissent, .tk1-attention, .tk1-alert { color: var(--amber); border-color: var(--amber); }
.tk1-citation { padding-block: var(--space-2); border-top: 1px solid var(--ink-08); }
.tk1-citation:first-child { border-top: 0; }
.tk1-citation--verified { border-inline-start: 3px solid var(--ink); padding-inline-start: var(--space-2); }
.tk1-citation--unverified { border-inline-start: 3px dashed var(--amber); padding-inline-start: var(--space-2); }
.tk1-preview-copy, .tk1-version-law { color: var(--ink-72); }
.tk1-version-list { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.tk1-version { padding: var(--space-3); border: 1px solid var(--ink-12); border-radius: var(--radius-md); }
.tk1-version--active { border-color: var(--accent); }
.tk1-composer { display: grid; gap: var(--space-2); padding-bottom: max(var(--space-2), var(--safe-bottom)); }
.tk1-composer textarea { width: 100%; min-height: 5rem; resize: vertical; }
.tk1-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tk1-sheet { left: 0; right: 0; bottom: 0; width: 100dvw; max-height: calc(100dvh - var(--nav-h)); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.tk1-shell :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* breakpoint: compact */
@media (max-width: 640px) {
  .tk1-shell { width: 100dvw; max-height: calc(100dvh - var(--nav-h)); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .tk1-version-actions, .tk1-confirm { align-items: stretch; flex-direction: column; }
  .tk1-version-actions > *, .tk1-confirm > * { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .tk1-shell, .tk1-shell * { scroll-behavior: auto; animation: none; transition-duration: 0s; }
}

@media (forced-colors: active) {
  .tk1-shell, .tk1-version, .tk1-citation, .tk1-preview, .tk1-confirm { border: 1px solid CanvasText; }
  .tk1-citation--unverified { border-inline-start-style: dashed; }
  .tk1-shell :focus-visible { outline: 2px solid Highlight; }
}
