/* Product screen styles. Colours come from tokens only. */

html, body, #shell { height: 100%; }

body { overflow: hidden; }

button, input, select, textarea { font-family: inherit; }

button { cursor: pointer; }

h1.page-title,
h2,
.card-title,
.group-title,
.task-title,
.wordmark {
  font-weight: var(--tt-weight-title);
}

.shell {
  display: flex;
  height: 100%;
  min-height: 100vh;
  background: var(--tt-canvas);
}

.rail {
  width: 248px;
  flex: none;
  background: var(--tt-surface-sunken);
  display: flex;
  flex-direction: column;
  min-height: 0;
  z-index: var(--tt-z-sticky);
  border-right: 0;
  transition: width var(--tt-duration-base) var(--tt-ease-standard);
}

.rail {
  height: 100%;
  min-height: 0;
}

.rail-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: var(--tt-space-4) var(--tt-space-3) var(--tt-space-3);
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-2);
}

.rail-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: var(--tt-space-2);
}

.rail-label {
  margin: var(--tt-space-4) 0 var(--tt-space-1);
  padding: 0 var(--tt-space-2);
  font-size: 11px;
  line-height: 16px;
  font-weight: var(--tt-weight-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tt-text-tertiary);
}

.rail-nav .rail-label:first-child { margin-top: var(--tt-space-3); }

.rail-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-3);
  padding-top: var(--tt-space-3);
}

.rail-foot-nav {
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-2);
}

.teetee-nudge {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 0;
  color: var(--tt-text-primary);
}

.teetee-confetti {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

.teetee-mascot,
.teetee-bubble-open,
.teetee-bubble-close {
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.teetee-mascot {
  padding: 0;
  line-height: 0;
}

.teetee-nudge img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  flex: none;
}

.teetee-bubble {
  position: relative;
  width: 100%;
  border-radius: var(--tt-radius-md);
  background: var(--tt-surface);
  filter: drop-shadow(0 2px 4px rgb(30 28 25 / 0.07)) drop-shadow(0 8px 16px rgb(30 28 25 / 0.08));
  font-size: 12px;
  line-height: 16px;
}

.teetee-bubble-open {
  display: block;
  width: 100%;
  padding: 10px 28px 10px 12px;
  text-align: left;
}

.teetee-bubble-close {
  position: absolute;
  z-index: 1;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border-radius: var(--tt-radius-pill);
  color: var(--tt-text-tertiary);
}

.teetee-bubble-close:hover { color: var(--tt-text-primary); background: var(--tt-fill-soft); }

.teetee-bubble-close svg { width: 10px; height: 10px; }

.teetee-bubble::before {
  content: "";
  position: absolute;
  left: 28px;
  top: 100%;
  border-width: 6px 6px 0;
  border-style: solid;
  border-color: var(--tt-surface) transparent transparent;
}

.teetee-bubble-hi {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: var(--tt-weight-label);
}

.teetee-progress-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.teetee-progress-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 16px;
  color: var(--tt-text-secondary);
}

.teetee-progress-check {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  flex: none;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-success-subtle);
  color: var(--tt-success);
}

.teetee-progress-check svg { width: 9px; height: 9px; }

.teetee-progress-check.is-loading {
  background: var(--tt-fill-soft);
  color: var(--tt-text-secondary);
}

.lattice-loader.lattice-loader--mini {
  --ll-cell: 3px;
  --ll-gap: 1.5px;
  gap: 0;
}

.rail.is-collapsed .teetee-nudge {
  width: 40px;
  margin-inline: auto;
  justify-content: center;
  padding: 4px;
}

.rail.is-collapsed .teetee-bubble { display: none; }

.rail.is-collapsed .teetee-nudge img { width: 32px; height: 32px; }

.tee-chat-dialog { width: min(400px, calc(100vw - 32px)); }

.tee-chat-card {
  position: relative;
  width: 100%;
  height: 360px;
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-3);
  padding: var(--tt-space-4);
  border-radius: var(--tt-radius-lg);
  background: var(--tt-surface);
  color: var(--tt-text-primary);
}

.tee-chat-head {
  display: flex;
  align-items: center;
  gap: var(--tt-space-2);
  padding-right: 36px;
}

.tee-chat-head img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex: none;
}

.tee-chat-head h2 {
  margin: 0;
  font-size: var(--tt-size-title);
  line-height: var(--tt-leading-title);
  font-weight: var(--tt-weight-title);
}

.tee-chat-head p {
  margin: 0;
  font-size: 13px;
  line-height: 18px;
  color: var(--tt-text-secondary);
}

.tee-thread {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--tt-space-2);
  min-height: 0;
  overflow: auto;
}

.tee-msg {
  max-width: 85%;
  margin: 0;
  padding: 8px 12px;
  border-radius: var(--tt-radius-md);
  font-size: 14px;
  line-height: 20px;
}

.tee-msg.is-tee { align-self: flex-start; background: var(--tt-fill-soft); }

.tee-msg.is-you {
  align-self: flex-end;
  background: var(--tt-cta-strong);
  color: var(--tt-on-cta-strong);
}

.tee-chips { display: flex; flex-wrap: wrap; flex: none; gap: var(--tt-space-2); }

.tee-chip {
  border: var(--tt-border-thin) solid var(--tt-border-field);
  border-radius: var(--tt-radius-pill);
  padding: 6px 12px;
  background: var(--tt-surface);
  color: var(--tt-text-primary);
  font: inherit;
  font-size: 13px;
  line-height: 18px;
  cursor: pointer;
}

.tee-chip:hover { border-color: var(--tt-border-interactive); }

.tee-chat-compose { display: flex; align-items: center; flex: none; gap: var(--tt-space-2); }

.tee-chat-compose .btn { flex: none; }

.tee-mode {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-fill-soft);
}

.tee-mode-btn {
  flex: 1;
  height: 32px;
  border: 0;
  border-radius: var(--tt-radius-pill);
  background: transparent;
  color: var(--tt-text-secondary);
  font: inherit;
  font-size: 13px;
  line-height: 18px;
  font-weight: var(--tt-weight-label);
  cursor: pointer;
}

.tee-mode-btn.is-on {
  background: var(--tt-surface);
  color: var(--tt-text-primary);
  box-shadow: var(--tt-elevation-1);
}

.tee-chat-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  padding: 0 4px 0 0;
  border-radius: var(--tt-radius-sm);
  border: var(--tt-border-form) solid var(--tt-border-field);
  background: var(--tt-surface);
}

.tee-chat-field .input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.tee-chat-field .home-ask-mic {
  margin-left: 0;
  width: 32px;
  height: 32px;
}

.tee-talk {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: var(--tt-space-3);
  min-height: 0;
  padding: var(--tt-space-3) 0 var(--tt-space-2);
}

.tee-talk-status {
  margin: 0;
  color: var(--tt-text-secondary);
  font-size: 14px;
  line-height: 20px;
}

.tee-talk-live {
  margin: 0;
  align-self: stretch;
  color: var(--tt-text-primary);
  font-size: 15px;
  line-height: 22px;
  text-align: center;
}

.tee-talk .tee-msg { align-self: stretch; max-width: none; }

.tee-talk-mic {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-top: auto;
  border: 0;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-cta-strong);
  color: var(--tt-on-cta-strong);
  cursor: pointer;
}

.tee-talk-mic svg { width: 22px; height: 22px; }

/* Animated mic: the mic turns into a bouncing sound-bar icon and back, on a 3s loop. */
.tee-talk-mic .mic-anim { width: 28px; height: 28px; overflow: visible; }
.mic-anim g, .mic-anim .b { transform-box: fill-box; transform-origin: center; }
.mic-anim__mic { animation: mic-anim-mic 3s ease-in-out infinite; }
.mic-anim__bars { opacity: 0; animation: mic-anim-bars 3s ease-in-out infinite; }
.mic-anim .b { animation: mic-anim-bar 0.7s ease-in-out infinite alternate; }
.mic-anim .b1 { animation-delay: -0.15s; }
.mic-anim .b2 { animation-delay: -0.45s; }
.mic-anim .b3 { animation-delay: -0.3s; }
.mic-anim .b4 { animation-delay: -0.55s; }
.mic-anim .b5 { animation-delay: -0.1s; }
@keyframes mic-anim-mic {
  0%, 18% { opacity: 1; transform: scale(1); }
  28%, 70% { opacity: 0; transform: scale(0.82); }
  80%, 100% { opacity: 1; transform: scale(1); }
}
@keyframes mic-anim-bars {
  0%, 18% { opacity: 0; }
  28%, 70% { opacity: 1; }
  80%, 100% { opacity: 0; }
}
@keyframes mic-anim-bar {
  from { transform: scaleY(0.35); }
  to { transform: scaleY(1); }
}
@media (prefers-reduced-motion: reduce) {
  .mic-anim__mic, .mic-anim__bars, .mic-anim .b { animation: none; }
  .mic-anim__bars { opacity: 0; }
}

.tee-talk-mic.is-listening { background: var(--tt-fill-soft); color: var(--tt-text-primary); }

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--tt-space-2);
  width: 100%;
  min-height: 32px;
  padding: 0 var(--tt-space-2);
  border: 0;
  background: transparent;
  border-radius: var(--tt-radius-sm);
  color: var(--tt-text-secondary);
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  font-weight: var(--tt-weight-body);
  text-align: left;
  cursor: pointer;
}

.nav-item svg {
  width: var(--tt-icon-md);
  height: var(--tt-icon-md);
  flex: none;
}

.rail-conversations {
  margin-top: var(--tt-space-2);
  padding-top: var(--tt-space-3);
  border-top: var(--tt-border-thin) solid var(--tt-border);
}

.rail-conversations-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tt-space-2);
}

.rail-conversations-head .rail-label {
  margin-top: 0;
}

.rail-conversations-new {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  margin-right: var(--tt-space-1);
  border: 0;
  border-radius: var(--tt-radius-sm);
  background: transparent;
  color: var(--tt-text-tertiary);
  cursor: pointer;
}

.rail-conversations-new svg { width: 14px; height: 14px; }

.rail-conversations-new:hover {
  background: var(--tt-fill-soft);
  color: var(--tt-text-primary);
}

.rail-conversation-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail-conversation-row {
  display: flex;
  align-items: center;
  gap: var(--tt-space-2);
  width: 100%;
  padding: var(--tt-space-2);
  border: 0;
  border-radius: var(--tt-radius-sm);
  background: transparent;
  color: var(--tt-text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.rail-conversation-row:hover {
  background: var(--tt-fill-soft);
}

.rail-conversation-unread {
  flex: none;
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-info);
}
.rail-conversation-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 18px;
  font-weight: var(--tt-weight-label);
}

.nav-item:hover {
  background: var(--tt-fill-soft);
  color: var(--tt-text-primary);
}

.nav-item[aria-current="page"] {
  background: var(--tt-surface);
  color: var(--tt-primary-ink);
  font-weight: var(--tt-weight-label);
  box-shadow: var(--tt-elevation-1);
}

.nav-item[aria-current="page"] svg { color: var(--tt-primary); }

:root[data-theme="dark"] .nav-item[aria-current="page"],
:root[data-theme="dark"] .nav-item[aria-current="page"] svg {
  color: var(--tt-text-primary);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav-item[aria-current="page"],
  :root:not([data-theme="light"]) .nav-item[aria-current="page"] svg {
    color: var(--tt-text-primary);
  }
}

.rail-cards {
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-2);
  width: 100%;
}

.know-card {
  background: var(--tt-surface);
  border: var(--tt-border-thin) solid var(--tt-card-border);
  border-radius: var(--tt-radius-md);
  box-shadow: var(--tt-card-shadow);
  padding: var(--tt-space-4);
}

.know-mark {
  width: 20px;
  height: 20px;
  flex: none;
  display: grid;
  place-items: center;
}

.know-mark svg { width: 20px; height: 20px; display: block; }

.know-title {
  flex: 1;
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.02em;
  font-weight: var(--tt-weight-title);
  color: var(--tt-text-primary);
}

.know-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tt-space-2);
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.know-panel { margin-top: var(--tt-space-4); }

.know-card.is-open .chev { transform: rotate(180deg); }

.know-empty {
  margin: 0;
  color: var(--tt-text-secondary);
  font-size: 13px;
  line-height: 20px;
}

.know-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-3);
}

.know-list li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--tt-space-2);
  min-width: 0;
}

.know-ico {
  display: flex;
  color: var(--tt-text-tertiary);
}

.know-ico svg {
  width: 18px;
  height: 18px;
  display: block;
}

.know-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 20px;
  color: var(--tt-text-primary);
}

.know-count {
  font-size: 14px;
  line-height: 20px;
  font-weight: var(--tt-weight-title);
  color: var(--tt-text-primary);
  white-space: nowrap;
}

.know-card.is-open {
  border-color: transparent;
  border-width: var(--tt-border-focus);
  background:
    linear-gradient(var(--tt-surface), var(--tt-surface)) padding-box,
    conic-gradient(
      from var(--know-angle),
      var(--tt-card-border) 0deg,
      var(--tt-caution-border) 28deg,
      color-mix(in srgb, var(--tt-caution-border) 35%, var(--tt-surface)) 56deg,
      var(--tt-card-border) 90deg,
      var(--tt-card-border) 200deg,
      var(--tt-caution-border) 232deg,
      var(--tt-card-border) 270deg
    ) border-box;
  animation: know-border-shine 3.2s linear infinite;
}

@property --know-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes know-border-shine {
  to { --know-angle: 360deg; }
}

.know-ticker {
  overflow: hidden;
  margin-top: var(--tt-space-4);
}

.know-ticker-track {
  display: flex;
  align-items: center;
  gap: var(--tt-space-2);
  width: max-content;
  animation: know-scroll 16s linear infinite;
}

@keyframes know-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.know-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 6px 10px;
  border-radius: var(--tt-radius-pill);
  border: var(--tt-border-thin) solid var(--tt-caution-border);
  background: var(--tt-caution-subtle);
  color: var(--tt-caution);
  font-size: 12px;
  line-height: 16px;
  font-weight: var(--tt-weight-label);
  white-space: nowrap;
}

.know-badge svg { width: 14px; height: 14px; }

@media (prefers-reduced-motion: reduce) {
  .know-card.is-open,
  .know-ticker-track,
  .setup-card.is-shine {
    animation: none;
    border: 0;
    background: var(--tt-surface);
  }
  .orb { animation: none; }
}

.know-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: var(--tt-space-3);
}

.know-dots i {
  width: 6px;
  height: 6px;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-border);
}

.know-dots i.is-on { background: var(--tt-text-primary); }

.rail.is-collapsed .know-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.rail.is-collapsed .know-title,
.rail.is-collapsed .know-panel,
.rail.is-collapsed .know-ticker { display: none; }

.rail.is-collapsed .know-toggle {
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0 auto;
}

.rail .card {
  flex: none;
  background: var(--tt-surface);
  border-color: var(--tt-card-border);
  box-shadow: var(--tt-card-shadow);
}

.rail .card-head { padding: var(--tt-space-3); }

.rail .card-title {
  font-size: 14px;
  line-height: 20px;
}

.rail .card-sub {
  font-size: 12px;
  line-height: 16px;
}

.rail-toggle {
  width: 100%;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: var(--tt-radius-sm);
}

.rail-toggle:hover { background: var(--tt-fill-soft); }

.rail-toggle .card-sub { display: block; }

.chev {
  width: var(--tt-icon-sm);
  height: var(--tt-icon-sm);
  margin-top: 4px;
  flex: none;
  color: var(--tt-text-tertiary);
  transition: transform var(--tt-duration-quick) var(--tt-ease-standard);
}

.card.is-open .chev { transform: rotate(180deg); }

.main {
  flex: 1;
  min-width: 0;
  overflow: auto;
  background: var(--tt-canvas);
}

.main.is-find {
  position: relative;
  background: var(--tt-surface);
}

.page {
  padding: var(--tt-space-8) var(--tt-space-8) var(--tt-space-16);
  max-width: calc(var(--tt-container-lg) + 64px);
}

.is-home .page { padding-bottom: 120px; }

.setup-page-header { margin: 18px 0 var(--tt-space-8); }

.page--find {
  min-height: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 50px var(--tt-space-8) var(--tt-space-8);
  background: transparent;
  position: relative;
  z-index: 1;
}

.find-stack {
  width: min(640px, 100%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.find-stack.is-wide { width: min(960px, 100%); }

.find-title {
  margin: 0;
  text-align: center;
  font-size: var(--tt-size-title);
  line-height: var(--tt-leading-title);
  letter-spacing: -0.015em;
  font-weight: var(--tt-weight-title);
  color: var(--tt-text-primary);
}

.page--hello .find-subtitle { margin-bottom: var(--tt-space-6); }

.find-subtitle {
  margin: var(--tt-space-2) 0 var(--tt-space-6);
  text-align: center;
  font-size: 15px;
  line-height: 23px;
  color: var(--tt-text-secondary);
}

.page--find.is-scroll {
  align-items: center;
  justify-content: flex-start;
}

.page--hello {
  justify-content: center;
}

.page--hello .find-stack {
  padding-top: 50px;
}

.page--hello .find-title {
  font-size: 24px;
}

.step-hit {
  display: flex;
  align-items: center;
  gap: var(--tt-space-2);
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.setup-card .grid-profiles {
  margin-top: var(--tt-space-6);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.setup-card .grid-profiles .card {
  height: 100%;
}

.setup-card .grid-profiles .card-head {
  padding: var(--tt-space-4);
}

.setup-card .check:checked {
  background: var(--tt-primary);
  border-color: var(--tt-primary);
}

.setup-card .check:checked::after {
  border-right-color: var(--tt-on-primary);
  border-bottom-color: var(--tt-on-primary);
}

.setup-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--tt-space-3) var(--tt-space-6);
  list-style: none;
  margin: 0 0 var(--tt-space-5);
  padding: 0;
}

.setup-steps li {
  display: flex;
  align-items: center;
  gap: var(--tt-space-2);
  color: var(--tt-text-tertiary);
  font-size: 14px;
  line-height: 20px;
}

.setup-steps li.is-current {
  color: var(--tt-text-primary);
  font-weight: var(--tt-weight-label);
}

.setup-steps .n {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-fill-soft);
  color: var(--tt-text-secondary);
  font-size: 13px;
  line-height: 1;
  font-weight: var(--tt-weight-label);
  font-variant-numeric: tabular-nums;
}

.setup-steps li.is-current .n {
  background: var(--tt-text-primary);
  color: var(--tt-surface);
}

.setup-card {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  background: var(--tt-surface);
  border-radius: 24px;
  box-shadow: var(--tt-elevation-2);
  padding: var(--tt-space-8);
}

.setup-card.is-hug { max-width: 560px; }

.setup-card.is-shine {
  border: var(--tt-border-focus) solid transparent;
  background:
    linear-gradient(var(--tt-surface), var(--tt-surface)) padding-box,
    conic-gradient(
      from var(--find-angle),
      var(--tt-card-border) 0deg,
      var(--tt-primary-border) 18deg,
      var(--tt-card-border) 44deg,
      var(--tt-card-border) 180deg,
      var(--tt-info-border) 198deg,
      var(--tt-card-border) 224deg,
      var(--tt-card-border) 360deg
    ) border-box;
  animation: find-border-shine 3.2s linear 3;
}

@property --find-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes find-border-shine {
  to { --find-angle: 360deg; }
}

.setup-card.is-highlight .input {
  border-color: var(--tt-focus);
  box-shadow: 0 0 0 2px var(--tt-focus);
}

.page--run {
  max-width: calc(var(--tt-container-lg) + 64px);
}

.rail-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tt-space-2);
  min-height: 32px;
}

.rail-brand-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.theme-switch {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  margin-left: 0;
  border: 0;
  border-radius: var(--tt-radius-sm);
  background: transparent;
  color: var(--tt-text-secondary);
  cursor: pointer;
}

.theme-switch:hover {
  background: var(--tt-fill-soft);
  color: var(--tt-text-primary);
}

.theme-switch svg {
  width: var(--tt-icon-sm);
  height: var(--tt-icon-sm);
}

.lockup {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--tt-text-primary);
  min-height: 32px;
}

.lockup svg { color: var(--tt-primary); display: block; }

.lockup-toggle {
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: var(--tt-radius-sm);
  font: inherit;
}

.lockup-toggle:hover { color: var(--tt-text-secondary); }

.wordmark {
  font-size: 16px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.rail-card-icon {
  width: 20px;
  height: 20px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tt-text-secondary);
}

.rail-card-icon svg { width: 20px; height: 20px; }

.rail.is-collapsed {
  width: 72px;
}

.rail.is-collapsed .rail-scroll {
  padding-left: var(--tt-space-2);
  padding-right: var(--tt-space-2);
}

.rail.is-collapsed .rail-brand {
  flex-direction: column;
  align-items: center;
  gap: var(--tt-space-2);
}

.rail.is-collapsed .rail-brand-actions {
  margin-left: 0;
}

.rail.is-collapsed .lockup {
  justify-content: center;
  width: 40px;
}

.rail.is-collapsed .rail-label,
.rail.is-collapsed .rail-user-name {
  display: none;
}

.rail.is-collapsed .wordmark,
.rail.is-collapsed .nav-item span,
.rail.is-collapsed .rail-cards .head-copy,
.rail.is-collapsed .rail-cards .chev,
.rail.is-collapsed .rail-cards .badge {
  display: none;
}

.rail.is-collapsed .nav-item {
  justify-content: center;
  width: 40px;
  padding: 0;
  margin: 0 auto;
}

.rail.is-collapsed .rail-cards .card-head {
  justify-content: center;
  padding: var(--tt-space-2);
}

.rail.is-collapsed .rail-cards section.is-open .card-head { justify-content: center; }

.rail.is-collapsed .rail-cards .card-body--tight { display: none; }

.rail-tip {
  position: fixed;
  z-index: var(--tt-z-tooltip);
  padding: 4px 8px;
  background: var(--tt-surface);
  color: var(--tt-text-primary);
  border-radius: var(--tt-radius-sm);
  box-shadow: var(--tt-elevation-2);
  font-size: 13px;
  line-height: 18px;
  font-weight: var(--tt-weight-body);
  white-space: nowrap;
  pointer-events: none;
}

.overline {
  font-size: 11px;
  line-height: 12px;
  font-weight: var(--tt-weight-label);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--tt-text-tertiary);
  margin: 0 0 var(--tt-space-3);
}

.page-title {
  font-size: var(--tt-size-title);
  line-height: var(--tt-leading-title);
  letter-spacing: -0.015em;
  max-width: 22ch;
}

.rp-tee {
  margin-top: var(--tt-space-6);
}

.rp-created-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--tt-space-3);
  margin-top: var(--tt-space-8);
}

.page--library .rp-created-head .page-title {
  margin: 0;
}

.rp-created-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  align-self: stretch;
  gap: var(--tt-space-3);
}

.setup-card .page-title {
  font-size: var(--tt-size-heading);
  line-height: var(--tt-leading-heading);
  max-width: none;
}

.know-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 22px;
}

.know-head .page-title { padding-right: 168px; }

.know-head .btn,
.know-head label.btn {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  cursor: pointer;
}

.setup-card .know-section-title {
  margin-top: var(--tt-space-6);
}

.setup-card .know-head .page-title,
.setup-card .know-section-title {
  font-size: 16px;
  line-height: 22px;
}

.know-section-sub {
  margin: var(--tt-space-2) 0 0;
  color: var(--tt-text-tertiary);
  font-size: 13px;
  line-height: 20px;
}

.lede {
  margin: var(--tt-space-3) 0 0;
  max-width: 65ch;
  color: var(--tt-text-secondary);
  font-size: 15px;
  line-height: 23px;
}

.stack { display: flex; flex-direction: column; gap: var(--tt-space-5); }

.field { display: flex; flex-direction: column; gap: var(--tt-space-2); margin-top: var(--tt-space-8); }

.field label, .label {
  font-size: 13px;
  line-height: 20px;
  font-weight: var(--tt-weight-label);
  color: var(--tt-text-secondary);
}

.hint, .error {
  margin: 0;
  font-size: 13px;
  line-height: 20px;
  max-width: 65ch;
}

.hint { color: var(--tt-text-tertiary); }

.error { color: var(--tt-danger); }

.input {
  height: 40px;
  padding: 0 var(--tt-space-3);
  width: 100%;
  font-family: var(--tt-font-ui), sans-serif;
  font-size: 14px;
  line-height: 20px;
  font-weight: var(--tt-weight-body);
  color: var(--tt-text-primary);
  background: var(--tt-surface);
  border-radius: var(--tt-radius-sm);
  border: var(--tt-border-form) solid var(--tt-border-field);
}

textarea.input {
  height: 72px;
  padding: var(--tt-space-3);
  resize: none;
  overflow-y: auto;
  line-height: 23px;
}

select.input { padding-right: var(--tt-space-8); }

.input:hover, .input:focus { border-color: var(--tt-border-interactive); }

.input:focus { outline: none; }

.input::placeholder { color: var(--tt-text-muted); }

.input[aria-invalid="true"] { border-color: var(--tt-danger); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--tt-space-2);
  min-height: 40px;
  padding: 0 var(--tt-space-4);
  font-family: var(--tt-font-ui), sans-serif;
  font-size: 14px;
  line-height: 20px;
  font-weight: var(--tt-weight-cta);
  white-space: nowrap;
  cursor: pointer;
  border: var(--tt-border-thin) solid transparent;
  border-radius: var(--tt-radius-pill);
  transition: background var(--tt-duration-quick) var(--tt-ease-standard);
}

.btn--sm { min-height: 32px; height: 32px; padding: 0 var(--tt-space-3); font-size: 13px; }

.btn--strong { background: var(--tt-cta-strong); color: var(--tt-on-cta-strong); }

.btn--strong:hover { background: var(--tt-cta-strong-hover); }

.btn--primary { background: var(--tt-primary); color: var(--tt-on-primary); }

.btn--primary:hover { background: var(--tt-primary-hover); }

.btn--secondary {
  background: var(--tt-surface);
  color: var(--tt-text-primary);
  border-color: transparent;
  box-shadow: 0 0 1px rgb(0 0 0 / 0.4), 0 1px 1px rgb(0 0 0 / 0.04), 0 2px 4px rgb(0 0 0 / 0.04);
  transition: background-color var(--tt-duration-quick) var(--tt-ease-standard), box-shadow var(--tt-duration-quick) var(--tt-ease-standard), transform var(--tt-duration-quick) var(--tt-ease-standard);
}

.btn--secondary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--tt-text-primary) 3%, var(--tt-surface));
}

.btn--secondary:active:not(:disabled) { transform: scale(0.98); }

.btn--secondary:focus-visible {
  outline: 2px solid var(--tt-focus);
  outline-offset: 2px;
}

:root[data-theme="dark"] .btn--secondary {
  box-shadow: 0 0 1px color-mix(in srgb, var(--tt-text-primary) 45%, transparent), 0 1px 2px rgb(0 0 0 / 0.35);
}

.btn--ghost { background: transparent; color: var(--tt-text-primary); }

.btn--ghost:hover { background: var(--tt-fill-soft); }

.btn--danger {
  background: transparent;
  color: var(--tt-danger);
  border-color: var(--tt-danger-border);
}

.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--tt-fill-soft);
  color: var(--tt-text-muted);
  border-color: transparent;
  cursor: not-allowed;
}

.btn--icon { width: 32px; min-width: 32px; padding: 0; }

.btn svg { width: var(--tt-icon-sm); height: var(--tt-icon-sm); flex: none; }

.spin {
  width: var(--tt-icon-sm);
  height: var(--tt-icon-sm);
  border: var(--tt-border-focus) solid currentColor;
  border-right-color: transparent;
  border-radius: var(--tt-radius-pill);
  animation: spin var(--tt-duration-deliberate) linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.next-list {
  list-style: none;
  margin: var(--tt-space-8) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-3);
}

.next-list li {
  display: flex;
  align-items: baseline;
  gap: var(--tt-space-3);
  color: var(--tt-text-secondary);
  font-size: 15px;
  line-height: 23px;
}

.next-list .n {
  width: 20px;
  color: var(--tt-text-tertiary);
  font-variant-numeric: tabular-nums;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--tt-space-3);
  margin-top: var(--tt-space-8);
}

.setup-card .actions {
  justify-content: flex-end;
}

.setup-card .actions.is-split {
  justify-content: flex-start;
}

.setup-card .actions.is-center { justify-content: center; }

.setup-card .know-actions {
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: var(--tt-space-4);
}

.know-note {
  display: flex;
  align-items: center;
  gap: var(--tt-space-3);
  width: 100%;
  margin: 0;
  max-width: none;
  text-align: left;
  padding: var(--tt-space-4);
  border-radius: var(--tt-radius-md);
  background: var(--tt-caution-subtle);
  border: var(--tt-border-thin) solid var(--tt-caution-border);
  color: var(--tt-text-primary);
  font-size: 15px;
  line-height: 23px;
}

.know-note svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--tt-caution);
}

.know-build-btn {
  align-self: flex-end;
}

.actions-end {
  display: flex;
  align-items: center;
  gap: var(--tt-space-3);
  margin-left: auto;
}

.actions--split { justify-content: space-between; }

.sticky-actions {
  margin-top: var(--tt-space-8);
  padding-bottom: var(--tt-space-8);
}

.status-line {
  margin: 0;
  color: var(--tt-text-secondary);
  font-size: 13px;
  line-height: 20px;
}

.grid-profiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--tt-space-4);
}

.grid-profiles .card-title {
  font-size: 14px;
  line-height: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--tt-surface);
  border-radius: var(--tt-radius-lg);
  border: var(--tt-border-thin) solid var(--tt-card-border);
  box-shadow: var(--tt-card-shadow);
  min-width: 0;
}

.card--selected { background: var(--tt-fill-soft); }

.card--empty {
  border-style: dashed;
  border-color: var(--tt-border-interactive);
  background: transparent;
  box-shadow: none;
  min-height: 220px;
  justify-content: center;
}

.card--add {
  align-items: center;
  justify-content: center;
  gap: var(--tt-space-2);
  border-style: dashed;
  border-color: var(--tt-border-field);
  background: transparent;
  box-shadow: none;
  color: var(--tt-text-secondary);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--tt-duration-quick) var(--tt-ease-standard),
    color var(--tt-duration-quick) var(--tt-ease-standard),
    background var(--tt-duration-quick) var(--tt-ease-standard);
}

.card--add:hover,
.card--add:focus-visible {
  border-color: var(--tt-border-interactive);
  color: var(--tt-text-primary);
  background: var(--tt-fill-soft);
}

.card--add .add-glyph {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

.card--add .add-glyph svg { width: 16px; height: 16px; }

.card--add .card-title { color: var(--tt-primary-ink); }

.card-head {
  padding: var(--tt-space-4) var(--tt-space-4) var(--tt-space-3);
  display: flex;
  align-items: flex-start;
  gap: var(--tt-space-3);
}

.card-body { padding: 0 var(--tt-space-4) var(--tt-space-4); }

.card-body--tight { padding: var(--tt-space-3) var(--tt-space-4) var(--tt-space-4); }

.card-foot {
  margin-top: auto;
  padding: var(--tt-space-3) var(--tt-space-4);
  border-top: var(--tt-border-thin) solid var(--tt-border);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--tt-space-2);
}

.card-title {
  font-size: 17px;
  line-height: 24px;
  letter-spacing: -0.015em;
}

.card-sub {
  margin: 2px 0 0;
  color: var(--tt-text-tertiary);
  font-size: 13px;
  line-height: 20px;
}

.head-copy { flex: 1; min-width: 0; }

.head-copy-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tt-space-2);
}

.head-copy-top .stat-pills { margin-top: 0; flex-shrink: 0; }

.head-copy-end {
  display: flex;
  align-items: center;
  gap: var(--tt-space-3);
  flex-shrink: 0;
}

.profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--tt-radius-pill);
  object-fit: cover;
  background: var(--tt-fill-soft);
  flex: none;
}

.profile-remove {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  padding: 0;
  border: 0;
  border-radius: var(--tt-radius-sm);
  background: transparent;
  color: var(--tt-text-tertiary);
  cursor: pointer;
  flex: none;
}

.profile-remove:hover,
.profile-remove:focus-visible {
  background: var(--tt-fill-soft);
  color: var(--tt-text-primary);
}

.profile-remove svg { width: 14px; height: 14px; }

.removed-block {
  width: 100%;
}

.removed-list {
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-3);
  margin-top: var(--tt-space-3);
}

.removed-card .card-head { align-items: center; }

.removed-card .card-title {
  font-size: 14px;
  line-height: 20px;
}

.tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  margin-top: 2px;
}

.check {
  width: 18px;
  height: 18px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  border: var(--tt-border-form) solid var(--tt-border-field);
  border-radius: var(--tt-radius-xs);
  background: var(--tt-surface);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.check:hover, .check:focus { border-color: var(--tt-border-interactive); }

.check:checked {
  background: var(--tt-cta-strong);
  border-color: var(--tt-cta-strong);
}

.check:checked::after {
  content: "";
  width: 5px;
  height: 9px;
  border-right: 1px solid var(--tt-on-cta-strong);
  border-bottom: 1px solid var(--tt-on-cta-strong);
  rotate: 45deg;
  translate: 0 -1px;
}

.check:disabled { cursor: not-allowed; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--tt-pad-pill-md);
  border-radius: var(--tt-radius-pill);
  font-size: 12px;
  line-height: 16px;
  font-weight: var(--tt-weight-label);
  background: var(--tt-fill-soft);
  color: var(--tt-text-secondary);
  white-space: nowrap;
}

.badge--success { background: var(--tt-success-subtle); color: var(--tt-success); }

.badge--info { background: var(--tt-info-subtle); color: var(--tt-info); }

.badge--caution { background: var(--tt-caution-subtle); color: var(--tt-caution); }

.badge--danger { background: var(--tt-danger-subtle); color: var(--tt-danger); }

.badge--count {
  padding: var(--tt-pad-pill-sm);
  line-height: 16px;
  min-width: 16px;
  justify-content: center;
}

.badges { display: flex; flex-wrap: wrap; gap: var(--tt-space-2); }

.stat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tt-space-2);
  margin-top: var(--tt-space-2);
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: var(--tt-pad-pill-md);
  border-radius: var(--tt-radius-pill);
  border: none;
  background: var(--tt-fill-soft);
  color: var(--tt-text-secondary);
  font-size: 13px;
  line-height: 18px;
  font-weight: var(--tt-weight-label);
  white-space: nowrap;
}

.mock {
  border-radius: var(--tt-radius-sm);
  background: var(--tt-surface-sunken);
  overflow: hidden;
  min-height: 132px;
}

.chrome {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  background: var(--tt-fill-soft);
}

.chrome i {
  width: 8px;
  height: 8px;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-border-field);
}

.chrome em {
  margin-left: 6px;
  font-style: normal;
  font-size: 11px;
  line-height: 16px;
  color: var(--tt-text-tertiary);
}

.mock-h, .mock-s, .mock-name, .mock-meta { margin: 0; }

.mock-pad { padding: var(--tt-space-3) var(--tt-space-3) var(--tt-space-4); }

.mock-h {
  font-size: 14px;
  line-height: 20px;
  font-weight: var(--tt-weight-title);
  letter-spacing: -0.015em;
}

.mock-s, .mock-meta {
  margin-top: 4px;
  font-size: 12px;
  line-height: 16px;
  color: var(--tt-text-secondary);
}

.banner {
  height: 36px;
  background: var(--tt-fill-soft-hover);
}

.who-row {
  display: flex;
  gap: var(--tt-space-3);
  align-items: center;
  margin-top: -14px;
  padding: 0 var(--tt-space-3) var(--tt-space-3);
}

.mono {
  width: 36px;
  height: 36px;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-fill-soft);
  color: var(--tt-text-secondary);
  display: grid;
  place-items: center;
  font-size: 12px;
  line-height: 16px;
  font-weight: var(--tt-weight-label);
  border: var(--tt-border-thin) solid var(--tt-surface);
}

.tiles3, .grid6 {
  display: grid;
  gap: 6px;
  padding: var(--tt-space-3);
}

.tiles3 { grid-template-columns: repeat(3, 1fr); }

.grid6 { grid-template-columns: repeat(3, 1fr); }

.tile, .cell {
  background: var(--tt-fill-soft-hover);
  border-radius: var(--tt-radius-xs);
  min-height: 52px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.tile span, .cell span {
  font-size: 10px;
  line-height: 12px;
  color: var(--tt-text-secondary);
}

.bubbles { display: flex; flex-direction: column; gap: 6px; padding: var(--tt-space-3); }

.bubble {
  align-self: flex-start;
  max-width: 90%;
  background: var(--tt-surface);
  border-radius: var(--tt-radius-sm);
  padding: 8px 10px;
  font-size: 12px;
  line-height: 16px;
  color: var(--tt-text-secondary);
}

.bubble:nth-child(2) { align-self: flex-end; }

.edit-row { display: flex; gap: var(--tt-space-2); align-items: center; }

.edit-row .input { height: 32px; font-size: 13px; }

.permission {
  margin: var(--tt-space-5) 0 0;
  max-width: 65ch;
  color: var(--tt-text-tertiary);
  font-size: 13px;
  line-height: 20px;
}

.section-divider {
  display: flex;
  align-items: center;
  margin-top: var(--tt-space-6);
  min-height: 20px;
}

.section-divider::before {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--tt-border);
}

.know-file-grid { margin-top: var(--tt-space-4); }

.setup-card .know-file-grid .card-head {
  align-items: center;
  padding: 8px 12px;
  gap: var(--tt-space-2);
}

.know-file-grid .file-mark {
  width: 24px;
  height: 24px;
}

.know-file-grid .file-mark svg { width: 14px; height: 14px; }

.know-file-grid .card-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 16px;
}

.know-file-grid .card-sub {
  margin-top: 0;
  font-size: 11px;
  line-height: 14px;
}

.know-file-grid .profile-remove {
  width: 16px;
  height: 16px;
  margin-top: 0;
}

.file-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-fill-soft);
  color: var(--tt-text-secondary);
  flex: none;
}

.file-mark svg { width: 18px; height: 18px; }

.know-upload-files {
  margin: var(--tt-space-3) 0 0;
  padding: 0;
  list-style: none;
  color: var(--tt-text-secondary);
  font-size: 13px;
  line-height: 20px;
}

.know-upload-files li + li { margin-top: 2px; }

.sources-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--tt-space-4);
  margin-top: var(--tt-space-6);
}

.sources-grid:has(.source-card + .source-card) {
  grid-template-columns: 1fr 1fr;
}

.source-card .card-body {
  padding: var(--tt-space-4);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--tt-space-3);
}

.source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tt-space-3);
}

.source-card .card-title {
  display: flex;
  align-items: center;
  gap: var(--tt-space-2);
  font-size: 14px;
  line-height: 20px;
}

.source-ico {
  width: 18px;
  height: 18px;
  flex: none;
  display: inline-flex;
  color: var(--tt-text-primary);
}

.source-ico svg { width: 18px; height: 18px; display: block; }

.source-card p {
  margin: 0;
  color: var(--tt-text-secondary);
  font-size: 13px;
  line-height: 20px;
}

.sources-done {
  grid-column: 1 / -1;
  margin: 0;
}

.source-add {
  grid-column: 1 / -1;
  padding-top: var(--tt-space-4);
  border-top: var(--tt-border-thin) solid var(--tt-border);
}

.source-add .edit-row { width: 100%; }

.source-add .input {
  flex: 1;
  min-width: 0;
  height: 40px;
  font-size: 15px;
}

.source-add .permission { margin-top: var(--tt-space-4); }

.asks {
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-3);
  margin-top: var(--tt-space-5);
  padding: var(--tt-space-4);
  border-radius: var(--tt-radius-md);
  background: var(--tt-caution-subtle);
  border: var(--tt-border-thin) solid var(--tt-caution-border);
}

.asks h2 {
  font-size: 15px;
  line-height: 23px;
  letter-spacing: -0.015em;
}

.asks p { margin: 4px 0 0; color: var(--tt-text-secondary); font-size: 13px; line-height: 20px; }

.ask-row { display: flex; flex-wrap: wrap; gap: var(--tt-space-2); align-items: center; }

.log, .evidence {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.evidence { gap: var(--tt-space-2); }

.log li, .quiet {
  font-size: 13px;
  line-height: 20px;
  color: var(--tt-text-secondary);
}

.log li {
  padding: var(--tt-space-3) 0;
  border-bottom: var(--tt-border-thin) solid var(--tt-border);
}

.log li:last-child { border-bottom: none; padding-bottom: 0; }
.log li:first-child { padding-top: 0; }

.log li b, .log li span { display: block; }

.log li b { font-weight: var(--tt-weight-label); color: var(--tt-text-primary); }

.log .is-now { color: var(--tt-info); }

.pattern {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: var(--tt-radius-sm);
  padding: var(--tt-space-2);
  min-height: 32px;
  color: var(--tt-text-primary);
  font-size: 13px;
  line-height: 20px;
  font-weight: var(--tt-weight-label);
  cursor: pointer;
}

.pattern:hover { background: var(--tt-fill-soft); }

.pattern small {
  display: block;
  font-weight: var(--tt-weight-body);
  color: var(--tt-text-tertiary);
  font-size: 12px;
  line-height: 16px;
}

.evidence { margin: 0 0 var(--tt-space-2) var(--tt-space-2); }

.evidence li { font-size: 12px; line-height: 16px; color: var(--tt-text-secondary); }

.delivery {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: var(--tt-space-3);
  font-size: 13px;
  line-height: 20px;
  color: var(--tt-text-secondary);
}

.mode-list { display: flex; flex-direction: column; gap: var(--tt-space-3); }

.mode {
  padding-bottom: var(--tt-space-3);
  border-bottom: var(--tt-border-thin) solid var(--tt-border);
}

.mode:last-child { border-bottom: 0; padding-bottom: 0; }

.mode p { margin: 2px 0 0; font-size: 13px; line-height: 20px; color: var(--tt-text-secondary); }

.group { margin-top: var(--tt-space-8); }

.group-head { margin-bottom: var(--tt-space-3); max-width: 65ch; }

.group-title { font-size: 17px; line-height: 24px; letter-spacing: -0.015em; }

.group-title + p, .group-head p {
  margin: 4px 0 0;
  color: var(--tt-text-tertiary);
  font-size: 13px;
  line-height: 20px;
}

.sample-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--tt-space-4);
}

.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--tt-surface-sunken);
  border-radius: var(--tt-radius-sm);
  display: grid;
  place-items: center;
}

.play {
  width: 28px;
  height: 28px;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-surface);
  box-shadow: var(--tt-elevation-1);
  display: grid;
  place-items: center;
}

.play::before {
  content: "";
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent var(--tt-text-primary);
  margin-left: 2px;
}

.thumb .badge { position: absolute; left: 8px; top: 8px; }

.sample-meta {
  margin: var(--tt-space-2) 0 0;
  color: var(--tt-text-tertiary);
  font-size: 13px;
  line-height: 20px;
}

.keep-row {
  display: flex;
  align-items: center;
  gap: var(--tt-space-2);
  margin-top: var(--tt-space-3);
  font-size: 13px;
  line-height: 20px;
  color: var(--tt-text-secondary);
}

.empty-block {
  border: var(--tt-border-thin) dashed var(--tt-border-interactive);
  border-radius: var(--tt-radius-md);
  padding: var(--tt-space-6) var(--tt-space-5);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--tt-space-3);
}

.empty-block h3 {
  font-size: 17px;
  line-height: 24px;
  font-weight: var(--tt-weight-title);
  letter-spacing: -0.015em;
}

.chips { display: flex; flex-wrap: wrap; gap: var(--tt-space-2); margin-bottom: var(--tt-space-5); }

.hello {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--tt-space-4);
  align-items: stretch;
}

.cam {
  background: var(--tt-surface-sunken);
  border-radius: var(--tt-radius-md);
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--tt-space-4);
  padding: var(--tt-space-5);
}

.cam-off {
  margin: 0;
  color: var(--tt-text-secondary);
  font-size: 15px;
  line-height: 23px;
}

.face-guide {
  width: 132px;
  height: 168px;
  border: var(--tt-border-thin) dashed var(--tt-border-interactive);
  border-radius: var(--tt-radius-pill);
}

.level {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 28px;
}

.level i {
  display: block;
  width: 4px;
  height: 8px;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-text-tertiary);
}

.cam.is-live .level i {
  animation: lvl 900ms var(--tt-ease-standard) infinite alternate;
}

.cam.is-live .level i:nth-child(2) { animation-delay: 80ms; }
.cam.is-live .level i:nth-child(3) { animation-delay: 160ms; }
.cam.is-live .level i:nth-child(4) { animation-delay: 40ms; }
.cam.is-live .level i:nth-child(5) { animation-delay: 200ms; }

@keyframes lvl {
  from { height: 6px; }
  to { height: 26px; }
}

.rec-row {
  display: flex;
  align-items: center;
  gap: var(--tt-space-2);
  font-size: 13px;
  line-height: 20px;
  color: var(--tt-text-secondary);
  font-variant-numeric: tabular-nums;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-live);
}

.q-card { padding: var(--tt-space-5); }

.q-card h2 {
  font-size: 20px;
  line-height: 26px;
  letter-spacing: -0.015em;
  max-width: 36ch;
}

.source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--tt-space-3);
  font-size: 13px;
  line-height: 20px;
  color: var(--tt-text-secondary);
}

.source i {
  width: 8px;
  height: 8px;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-available);
}

.q-list { list-style: none; margin: var(--tt-space-5) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--tt-space-3); }

.q-list li { font-size: 13px; line-height: 20px; color: var(--tt-text-secondary); }

.type-banner { padding: var(--tt-space-5); }

.type-banner p { margin: var(--tt-space-2) 0 0; max-width: 65ch; font-size: 15px; line-height: 23px; }

.type-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tt-space-3);
  align-items: center;
  margin-top: var(--tt-space-4);
  position: relative;
}

.menu {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  z-index: var(--tt-z-dropdown);
  background: var(--tt-surface-raised);
  box-shadow: var(--tt-elevation-2);
  border-radius: var(--tt-radius-sm);
  padding: var(--tt-space-2);
  min-width: 260px;
}

.menu button {
  display: flex;
  width: 100%;
  text-align: left;
  align-items: center;
  justify-content: space-between;
  gap: var(--tt-space-3);
  min-height: 32px;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--tt-radius-xs);
  background: transparent;
  color: var(--tt-text-primary);
  font-size: 13px;
  line-height: 20px;
}

.menu button:hover, .menu button[aria-current="true"] { background: var(--tt-fill-soft); }

.menu button.is-danger { color: var(--tt-danger); }

.menu-rule {
  height: 1px;
  margin: 4px 6px;
  background: var(--tt-border);
  border: 0;
}

.tier { margin-top: var(--tt-space-8); }

.tier-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--tt-space-3);
  margin-bottom: var(--tt-space-3);
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--tt-space-4);
}

.task-title { font-size: 15px; line-height: 23px; letter-spacing: -0.015em; }

.task-copy {
  margin: var(--tt-space-2) 0 0;
  color: var(--tt-text-secondary);
  font-size: 13px;
  line-height: 20px;
}

.ready {
  display: flex;
  align-items: center;
  gap: var(--tt-space-3);
  margin-top: var(--tt-space-4);
  font-size: 12px;
  line-height: 16px;
  color: var(--tt-text-tertiary);
}

.dots { display: inline-flex; gap: 4px; }

.dot {
  width: 8px;
  height: 8px;
  border-radius: var(--tt-radius-pill);
  border: var(--tt-border-thin) solid var(--tt-border-interactive);
  background: transparent;
}

.dot--on {
  background: var(--tt-text-primary);
  border-color: var(--tt-text-primary);
}

.needs {
  margin: var(--tt-space-2) 0 0;
  font-size: 13px;
  line-height: 20px;
  color: var(--tt-text-tertiary);
}

.flip { min-height: 100%; }

.preview-line {
  margin: 0 0 var(--tt-space-3);
  font-size: 14px;
  line-height: 20px;
  color: var(--tt-text-primary);
}

.preview-line b { font-weight: var(--tt-weight-label); }

.topbar {
  display: flex;
  align-items: center;
  gap: var(--tt-space-3);
  margin-bottom: var(--tt-space-6);
}

.topbar .who {
  margin-left: auto;
  color: var(--tt-text-secondary);
  font-size: 13px;
  line-height: 20px;
}

.main.is-home {
  background:
    radial-gradient(80% 42% at 72% 100%, color-mix(in srgb, var(--tt-primary) 22%, transparent), transparent 72%),
    radial-gradient(55% 36% at 18% 100%, color-mix(in srgb, var(--tt-primary) 8%, transparent), transparent 70%),
    var(--tt-canvas);
  background-attachment: fixed;
}

.page--stage {
  min-height: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  padding-top: 0;
  background: transparent;
}

.page--nav {
  padding-top: var(--tt-space-4);
}

.page--stage.page--nav { padding-top: var(--tt-space-4); }

.screen-title {
  margin: 0;
  align-self: flex-start;
  min-height: 32px;
  display: flex;
  align-items: center;
  text-align: left;
  font-size: 16px;
  line-height: 22px;
  font-weight: var(--tt-weight-title);
  letter-spacing: -0.015em;
  color: var(--tt-text-primary);
}

.nav-body { margin-top: 50px; }

.page--gate {
  min-height: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: var(--tt-space-4) var(--tt-space-8) var(--tt-space-8);
  background: transparent;
}

.gate-stack {
  width: min(420px, 100%);
  margin-top: 50px;
  align-self: center;
}

.stage {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  margin-top: 50px;
  padding: 0 var(--tt-space-6);
}

.stage-title {
  margin: 0;
  font-size: 28px;
  line-height: 36px;
  letter-spacing: -0.02em;
  font-weight: var(--tt-weight-title);
}

.ask-pill {
  display: flex;
  align-items: center;
  gap: var(--tt-space-2);
  width: min(520px, 100%);
  min-height: 48px;
  margin-top: var(--tt-space-6);
  padding: var(--tt-space-1) var(--tt-space-1) var(--tt-space-1) var(--tt-space-4);
  background: var(--tt-surface);
  border: var(--tt-border-thin) solid var(--tt-border-field);
  border-radius: var(--tt-radius-pill);
  box-shadow: var(--tt-elevation-1);
}

.ask-pill-input {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--tt-text-primary);
  font: inherit;
  font-size: 15px;
  line-height: 23px;
  outline: none;
}

.ask-pill-input::placeholder { color: var(--tt-text-tertiary); }

.ask-pill-send {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border: 0;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-fill-soft);
  color: var(--tt-text-secondary);
}

.ask-pill-send:hover { background: var(--tt-fill-soft-hover); color: var(--tt-text-primary); }

.ask-pill-send svg { width: var(--tt-icon-sm); height: var(--tt-icon-sm); }

.stage-note {
  margin: var(--tt-space-3) 0 0;
  color: var(--tt-text-tertiary);
  font-size: 13px;
  line-height: 20px;
}

.stage + .tier {
  margin-top: 0;
  padding-top: 44px;
}

.page--home {
  max-width: 1024px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--tt-space-5) var(--tt-space-16) var(--tt-space-8);
}

.page--home > .lib-head {
  align-self: stretch;
  width: 100%;
}

.page--home > .page-title,
.page--home > .lede,
.page--home > .home-ask-card,
.page--home > .usage-card,
.page--home > .home-section {
  width: 100%;
}

.page--home .page-title { max-width: none; margin-top: var(--tt-space-6); }

.page--home .lede { max-width: none; margin-top: var(--tt-space-1); font-size: 14px; line-height: 20px; }

.home-ask-card {
  margin-top: var(--tt-space-6);
  padding: var(--tt-space-5);
  background: var(--tt-surface-sunken);
  border: var(--tt-border-thin) solid var(--tt-card-border);
  border-radius: var(--tt-radius-lg);
  box-shadow: none;
}

.home-ask-card .group-title { margin: 0; }

.home-topics {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tt-space-2);
  margin-top: var(--tt-space-4);
}

.home-topic {
  padding: var(--tt-pad-pill-lg);
  border: 0;
  border-radius: var(--tt-radius-pill);
  background: color-mix(in srgb, var(--tt-fill-soft) 50%, transparent);
  color: var(--tt-text-secondary);
  font: inherit;
  font-size: 13px;
  line-height: 20px;
  font-weight: var(--tt-weight-label);
  cursor: pointer;
}

.home-topic:hover { background: var(--tt-fill-soft-hover); color: var(--tt-text-primary); }

.home-topic[aria-pressed="true"] {
  background: var(--tt-fill-soft-hover);
  color: var(--tt-text-primary);
}

.home-ask-card .home-ask { margin-top: var(--tt-space-4); }

.home-ask {
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-2);
  min-height: 56px;
  margin-top: var(--tt-space-5);
  padding: 14px 10px 10px 18px;
  background: var(--tt-surface);
  border: var(--tt-border-thin) solid var(--tt-border);
  border-radius: var(--tt-radius-lg);
  box-shadow: 0 2px 4px rgb(30 28 25 / 0.035), 0 8px 20px rgb(30 28 25 / 0.055);
  transition: border-radius var(--tt-duration-quick) var(--tt-ease-standard);
}

.home-ask:focus-within { border-color: var(--tt-border); }

.tee-ask-box:focus-within { border-color: var(--tt-border); }

.home-ask-actions {
  display: flex;
  align-items: center;
  gap: var(--tt-space-2);
}

.home-ask-mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--tt-radius-pill);
  background: transparent;
  color: var(--tt-text-secondary);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  font-weight: var(--tt-weight-label);
  cursor: pointer;
}

.home-ask-mode svg { width: 16px; height: 16px; flex: none; }

.home-ask-mode:hover {
  background: var(--tt-fill-soft);
  color: var(--tt-text-primary);
}

.home-ask-mic {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  margin-left: auto;
  border: 0;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-fill-soft);
  color: var(--tt-text-secondary);
  cursor: pointer;
}

.home-ask-mic svg { width: 16px; height: 16px; }

.home-ask-mic:hover {
  background: var(--tt-fill-soft-hover);
  color: var(--tt-text-primary);
}

.home-ask-mic.is-listening {
  width: auto;
  padding: 0 var(--tt-space-3);
  gap: 8px;
  background: var(--tt-fill-soft);
  color: var(--tt-text-primary);
}

.mic-wave {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 14px;
}

.mic-wave span {
  display: block;
  width: 2px;
  height: 100%;
  border-radius: 1px;
  background: var(--tt-live);
  animation: mic-wave-bounce 900ms ease-in-out infinite;
}

.mic-wave span:nth-child(2) { animation-delay: 120ms; }
.mic-wave span:nth-child(3) { animation-delay: 240ms; }
.mic-wave span:nth-child(4) { animation-delay: 360ms; }

@keyframes mic-wave-bounce {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1); }
}

.mic-listening-text {
  font-size: 13px;
  line-height: 18px;
  font-weight: var(--tt-weight-label);
  white-space: nowrap;
}

.home-ask-input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 23px;
  max-height: 200px;
  margin: 0;
  padding: 0 8px 0 0;
  border: 0;
  background: transparent;
  color: var(--tt-text-primary);
  font: inherit;
  font-size: 15px;
  line-height: 23px;
  outline: none;
  resize: none;
  overflow-y: auto;
}

.home-ask-input::placeholder { color: var(--tt-text-tertiary); opacity: 0.6; }

.home-ask .btn { flex: none; }

.home-ask-submit {
  width: 36px;
  height: 36px;
  min-height: 0;
  min-width: 0;
  padding: 0;
}

.voice-pill {
  --vp-accent: var(--tt-live);
  --vp-icon: var(--tt-text-secondary);
  --vp-bg: var(--tt-fill-soft);
  --vp-bg-hover: var(--tt-fill-soft-hover);
  --vp-size: 36px;
  --vp-radius: 999px;
  --vp-reach: 10px;
  --vp-clock-w: 37px;
  --vp-wave-w: 68px;
  --vp-slide: 0px;
  --vp-cancel: 0;
  --vp-stop: 11px;
  --vp-icon-size: 16px;
  --vp-time-size: 13px;
  --vp-open: 200ms;
  --vp-press: 0.95;
  --vp-hit: 6px;
  --vp-ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  position: relative;
  display: inline-grid;
  place-items: center;
  isolation: isolate;
  flex: none;
  width: var(--vp-size);
  height: var(--vp-size);
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: var(--vp-radius);
  background: transparent;
  color: var(--vp-icon);
  cursor: pointer;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  transition: transform 160ms var(--vp-ease-out), color 150ms ease;
}

.voice-pill::before {
  content: "";
  position: absolute;
  inset: calc(-1 * var(--vp-hit));
}

.voice-pill[data-state="listening"] { z-index: 2; color: var(--vp-accent); }

.voice-pill[data-pressed] { transform: scale(var(--vp-press)); }

.voice-pill:disabled { opacity: 0.55; cursor: default; pointer-events: none; }

.voice-pill__capsule {
  position: absolute;
  inset: 0 0 0 calc(-1 * (var(--vp-reach) + var(--vp-clock-w) + var(--vp-wave-w)));
  border-radius: var(--vp-radius);
  background: var(--vp-bg);
  clip-path: inset(0 0 0 calc(var(--vp-reach) + var(--vp-clock-w) + var(--vp-wave-w)) round var(--vp-radius));
  pointer-events: none;
  transition: clip-path var(--vp-open) var(--vp-ease-out), background-color 150ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .voice-pill[data-state="idle"]:not(:disabled):hover .voice-pill__capsule { background: var(--vp-bg-hover); }
}

.voice-pill[data-state="listening"] .voice-pill__capsule {
  clip-path: inset(0 0 round var(--vp-radius));
}

.voice-pill__time {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 100%;
  display: grid;
  place-items: center;
  width: var(--vp-clock-w);
  box-sizing: border-box;
  color: var(--vp-accent);
  font-size: var(--vp-time-size);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  opacity: 0;
  filter: blur(2px);
  pointer-events: none;
  transition: opacity 200ms ease, filter 200ms ease;
}

.voice-pill[data-state="listening"] .voice-pill__time { opacity: 1; filter: blur(0); }

.voice-pill__wave {
  position: absolute;
  top: 18%;
  right: calc(100% + var(--vp-clock-w));
  width: var(--vp-wave-w);
  height: 64%;
  opacity: 0;
  filter: blur(2px);
  pointer-events: none;
  transition: opacity 200ms ease, filter 200ms ease;
}

.voice-pill[data-state="listening"] .voice-pill__wave { opacity: 1; filter: blur(0); }

.voice-pill__glyph {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--vp-size);
  height: var(--vp-size);
}

.voice-pill__glyph > * {
  grid-area: 1 / 1;
  transition: opacity 200ms ease, filter 200ms ease, transform 200ms var(--vp-ease-out);
}

.voice-pill__mic { display: inline-flex; }

.voice-pill__mic svg { width: var(--vp-icon-size); height: var(--vp-icon-size); }

.voice-pill__stop {
  width: var(--vp-stop);
  height: var(--vp-stop);
  border-radius: 22%;
  background: currentColor;
  opacity: 0;
  filter: blur(2px);
  transform: scale(0.6);
}

.voice-pill[data-state="listening"] .voice-pill__mic { opacity: 0; filter: blur(2px); transform: scale(0.7); }

.voice-pill[data-state="listening"] .voice-pill__stop { opacity: 1; filter: blur(0); transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  .voice-pill { transform: none !important; transition: color 150ms ease; }
  .voice-pill__capsule { transition: background-color 150ms ease; }
  .voice-pill__glyph > * { filter: none !important; transform: none !important; transition: opacity 200ms ease; }
  .voice-pill__time, .voice-pill__wave { filter: none !important; transition-property: opacity; }
}

.home-section { margin-top: var(--tt-space-8); }

.home-section-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--tt-space-3);
}

.home-meta {
  margin: 0;
  color: var(--tt-text-secondary);
  font-size: 14px;
  line-height: 20px;
}

.home-plays {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--tt-space-4);
  margin-top: var(--tt-space-4);
}

.home-reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--tt-space-4); margin-top: var(--tt-space-4); }

.reel-card {
  border-radius: var(--tt-radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 4px rgb(30 28 25 / 0.035), 0 8px 20px rgb(30 28 25 / 0.055);
}

.reel-media { position: relative; aspect-ratio: 3 / 4; background: var(--tt-fill-soft); overflow: hidden; }
.reel-video { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }

.reel-time {
  position: absolute;
  left: var(--tt-space-3);
  top: var(--tt-space-3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--tt-radius-pill);
  background: rgb(0 0 0 / 0.28);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #FFFFFF;
  font-size: 12px;
  line-height: 16px;
  font-weight: var(--tt-weight-label);
  pointer-events: none;
}

.reel-time svg { width: 12px; height: 12px; }

/* The title and buttons sit on the video, over a dark fade at the bottom. */
.reel-body {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-3);
  padding: var(--tt-space-12) var(--tt-space-4) var(--tt-space-4);
  background: linear-gradient(to top, rgb(0 0 0 / 0.78) 0%, rgb(0 0 0 / 0.5) 55%, rgb(0 0 0 / 0) 100%);
}

.reel-title { margin: 0; color: #FFFFFF; font-size: 15px; line-height: 22px; font-weight: var(--tt-weight-title); }
.reel-actions { display: flex; align-items: center; gap: var(--tt-space-2); }
.reel-done { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 var(--tt-space-3); color: #FFFFFF; font-size: 13px; font-weight: var(--tt-weight-label); }
.reel-done svg { width: 14px; height: 14px; }

.page--stage > .tier {
  width: min(var(--tt-container-md), 100%);
  margin-inline: auto;
}

.composer {
  background: var(--tt-surface);
  border: var(--tt-border-thin) solid var(--tt-card-border);
  box-shadow: var(--tt-card-shadow);
  border-radius: var(--tt-radius-lg);
  padding: var(--tt-space-5);
}

.composer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tt-space-3);
  margin-top: var(--tt-space-3);
}

.ai-mark {
  font-size: 12px;
  line-height: 16px;
  color: var(--tt-text-tertiary);
  font-weight: var(--tt-weight-label);
}

.row-scroll {
  display: flex;
  gap: var(--tt-space-4);
  overflow-x: auto;
  padding-bottom: var(--tt-space-2);
}

.task-tile { flex: 0 0 260px; }

.task-tile .card { height: 100%; }

.tile-hit {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--tt-space-2);
  width: 100%;
  min-height: 132px;
  text-align: left;
  background: transparent;
  border: 0;
  padding: var(--tt-space-4);
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.tile-hit:hover { background: var(--tt-fill-soft); }

.reason { margin: var(--tt-space-2) 0 0; color: var(--tt-text-tertiary); font-size: 13px; line-height: 20px; }

.pills {
  position: fixed;
  left: var(--tt-space-5);
  bottom: var(--tt-space-5);
  z-index: var(--tt-z-sticky);
  display: flex;
  gap: var(--tt-space-2);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--tt-space-2);
  min-height: 32px;
  padding: var(--tt-pad-pill-lg);
  border-radius: var(--tt-radius-pill);
  border: var(--tt-border-thin) solid var(--tt-card-border);
  background: var(--tt-surface);
  box-shadow: var(--tt-elevation-2);
  color: var(--tt-text-primary);
  font-size: 13px;
  line-height: 16px;
  font-weight: var(--tt-weight-label);
  cursor: pointer;
}

.pill[aria-expanded="true"] { background: var(--tt-fill-soft); }

.scrim {
  position: fixed;
  inset: 0;
  z-index: var(--tt-z-overlay);
  background: rgb(11 10 9 / .55);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.drawer {
  position: fixed;
  left: var(--tt-space-5);
  bottom: 76px;
  width: min(400px, calc(100vw - 40px));
  max-height: min(72vh, 680px);
  overflow: auto;
  z-index: var(--tt-z-modal);
  background: var(--tt-surface-raised);
  border-radius: var(--tt-radius-lg);
  box-shadow: var(--tt-elevation-3);
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--tt-space-3);
  padding: var(--tt-space-4) var(--tt-space-5);
  border-bottom: var(--tt-border-thin) solid var(--tt-border);
  position: sticky;
  top: 0;
  background: var(--tt-surface-raised);
  z-index: var(--tt-z-raised);
}

.drawer-body { padding: var(--tt-space-4) var(--tt-space-5) var(--tt-space-5); }

.drawer--conversations {
  top: var(--tt-space-4);
  bottom: var(--tt-space-4);
  left: 264px;
  width: min(360px, calc(100vw - 288px));
  max-height: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body:has(.rail.is-collapsed) .drawer--conversations {
  left: 88px;
  width: min(360px, calc(100vw - 112px));
}

.drawer--conversations .drawer-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.conversation-tools {
  position: sticky;
  top: calc(-1 * var(--tt-space-4));
  z-index: var(--tt-z-raised);
  padding-bottom: var(--tt-space-3);
  background: var(--tt-surface-raised);
}

.conversation-search {
  width: 100%;
  min-height: 36px;
  border-radius: var(--tt-radius-pill);
  padding-inline: var(--tt-space-4);
}

.conversation-section {
  margin: 0 0 var(--tt-space-2);
  color: var(--tt-text-tertiary);
  font-size: 11px;
  line-height: 16px;
  font-weight: var(--tt-weight-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.conversation-list {
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-2);
}

.conversation-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  width: 100%;
  min-height: 92px;
  padding: var(--tt-space-3);
  border: var(--tt-border-thin) solid transparent;
  border-radius: var(--tt-radius-sm);
  background: transparent;
  color: var(--tt-text-primary);
  font: inherit;
  text-align: left;
}

.conversation-row:hover {
  background: var(--tt-fill-soft);
  border-color: var(--tt-card-border);
}

.conversation-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tt-space-2);
}

.conversation-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 20px;
  font-weight: var(--tt-weight-label);
}

.conversation-count {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-fill-soft);
  color: var(--tt-text-secondary);
  font-size: 12px;
}

.conversation-source {
  color: var(--tt-text-tertiary);
  font-size: 12px;
  line-height: 16px;
}

.conversation-preview {
  display: -webkit-box;
  overflow: hidden;
  color: var(--tt-text-secondary);
  font-size: 13px;
  line-height: 18px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.conversation-empty {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--tt-space-2);
  text-align: center;
  color: var(--tt-text-secondary);
}

.conversation-empty-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-fill-soft);
  color: var(--tt-primary);
}

.conversation-empty-icon svg {
  width: 22px;
  height: 22px;
}

.conversation-empty h3 {
  margin: var(--tt-space-2) 0 0;
  color: var(--tt-text-primary);
  font-size: 16px;
  line-height: 22px;
  font-weight: var(--tt-weight-title);
}

.conversation-empty p {
  max-width: 240px;
  margin: 0;
  font-size: 13px;
  line-height: 20px;
}

.run-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: var(--tt-space-4);
  align-items: start;
}

.setup-fields { display: flex; flex-direction: column; gap: var(--tt-space-4); padding: var(--tt-space-5); }

.tag-row { display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-2); }

.turn { margin: 0 0 var(--tt-space-4); }

.turn .who {
  display: block;
  font-size: 12px;
  line-height: 16px;
  font-weight: var(--tt-weight-label);
  color: var(--tt-text-tertiary);
  margin-bottom: 2px;
}

.turn p { margin: 0; font-size: 15px; line-height: 23px; max-width: 65ch; }

.alert {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--tt-space-3) var(--tt-space-4);
  border-radius: var(--tt-radius-sm);
  border: var(--tt-border-thin) solid var(--tt-info-border);
  background: var(--tt-info-subtle);
  margin: 0 0 var(--tt-space-4);
}

.alert b { color: var(--tt-info); font-size: 12px; line-height: 16px; font-weight: var(--tt-weight-label); }

.alert--caution {
  border-color: var(--tt-caution-border);
  background: var(--tt-caution-subtle);
  color: var(--tt-caution);
}

.alert p, .action-note p { margin: 0; font-size: 14px; line-height: 20px; }

.progress-list {
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-2);
  margin-top: var(--tt-space-6);
}

.progress-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--tt-space-3);
  padding: var(--tt-space-3) var(--tt-space-4);
  border-radius: var(--tt-radius-md);
  border: var(--tt-border-thin) solid var(--tt-card-border);
  background: var(--tt-surface);
}

.progress-row-copy { min-width: 0; }

.progress-row-title {
  margin: 0;
  font-size: 15px;
  line-height: 22px;
  font-weight: var(--tt-weight-label);
  color: var(--tt-text-primary);
}

.progress-row-sub {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 20px;
  color: var(--tt-text-tertiary);
}

.progress-check { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--tt-primary); }

.progress-row .spin { flex: none; margin-top: 3px; }

.progress-pending {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 3px;
  border-radius: var(--tt-radius-pill);
  border: var(--tt-border-thin) solid var(--tt-border-field);
}

.rail-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tt-space-2);
  width: 100%;
  margin: 0;
  padding: var(--tt-space-2) 0 0;
  border: 0;
  border-top: var(--tt-border-thin) solid var(--tt-border);
  background: transparent;
  color: var(--tt-text-primary);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  text-align: left;
  cursor: pointer;
}

.rail.is-collapsed .rail-user { justify-content: center; padding-top: var(--tt-space-2); border-top: 0; }

.user-avatar {
  width: 28px;
  height: 28px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-fill-soft);
  color: var(--tt-text-secondary);
  font-size: 12px;
  font-weight: var(--tt-weight-label);
}

.user-avatar:hover { background: var(--tt-fill-soft-hover); }

.gate-card {
  --gate-hero-a: #AFD1F5;
  --gate-hero-b: #D9C4F0;
  --gate-hero-c: #F4C7D6;
  width: 100%;
  border-radius: var(--tt-radius-lg);
  overflow: hidden;
  background: var(--tt-surface);
  border: var(--tt-border-thin) solid var(--tt-border);
  box-shadow: none;
  text-align: center;
}

.gate-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 36px;
  background: linear-gradient(135deg, var(--gate-hero-a), var(--gate-hero-b) 55%, var(--gate-hero-c));
}

.gate-illustration {
  display: block;
  width: 50%;
  height: auto;
  background: var(--tt-surface);
  border: none;
  border-radius: 16px;
  box-shadow: none;
}

.gate-body { padding: var(--tt-space-6); }

.gate-title {
  font-size: 16px;
  line-height: 22px;
}

.gate-actions {
  display: flex;
  justify-content: center;
  gap: var(--tt-space-2);
  margin-top: var(--tt-space-5);
}

.review-head {
  display: flex;
  align-items: center;
  gap: var(--tt-space-2);
}

.review-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-primary);
}

.review-title {
  margin: 0;
  font-size: var(--tt-size-title);
  line-height: var(--tt-leading-title);
  font-weight: var(--tt-weight-title);
  letter-spacing: -0.015em;
}

.review-count {
  color: var(--tt-text-tertiary);
  font-size: 14px;
  line-height: 20px;
}

.credit-card { margin-top: var(--tt-space-2); }

.credit-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--tt-space-4);
}

.credit-used {
  margin: 2px 0 0;
  flex: none;
  color: var(--tt-text-secondary);
  font-size: 14px;
  line-height: 20px;
  font-weight: var(--tt-weight-label);
}

.credit-bar {
  height: 8px;
  margin-top: var(--tt-space-4);
  border-radius: var(--tt-radius-pill);
  background: var(--tt-fill-soft);
  overflow: hidden;
}

.credit-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--tt-primary);
}

.build-row {
  border: var(--tt-border-thin) solid var(--tt-card-border);
  border-radius: var(--tt-radius-md);
  background: var(--tt-surface);
}

.build-row-hit {
  display: flex;
  align-items: center;
  gap: var(--tt-space-3);
  width: 100%;
  padding: var(--tt-space-4);
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.build-copy { flex: 1; min-width: 0; }

.build-title {
  display: block;
  font-size: 15px;
  line-height: 22px;
  font-weight: var(--tt-weight-title);
}

.build-sub {
  display: block;
  margin-top: 2px;
  color: var(--tt-text-tertiary);
  font-size: 13px;
  line-height: 20px;
}

.build-check {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: var(--tt-radius-pill);
  border: var(--tt-border-thin) solid var(--tt-border-field);
  color: transparent;
}

.build-check svg { width: 12px; height: 12px; }

.build-check.is-done {
  border-color: var(--tt-success);
  background: var(--tt-success);
  color: var(--tt-surface);
}

.build-row-hit .lattice-loader,
.build-row-hit .build-check { flex: none; margin-left: auto; }

.lattice-loader {
  --ll-n: 3;
  --ll-cell: 4px;
  --ll-gap: 2px;
  --ll-font: 14px;
  --ll-color: currentColor;
  --ll-idle: 0.15;
  --ll-peak: 1;
  --ll-cycle: 810ms;
  --ll-ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: calc(var(--ll-font) * 0.625);
  color: var(--tt-text-secondary);
  font-size: var(--ll-font);
  line-height: 1;
}

.lattice-loader__grid { display: grid; flex: none; }

.lattice-loader__layer {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: repeat(var(--ll-n), var(--ll-cell));
  gap: var(--ll-gap);
}

.lattice-loader__cell {
  width: var(--ll-cell);
  height: var(--ll-cell);
  border-radius: max(1px, calc(var(--ll-cell) * 0.25));
  background: var(--ll-color);
  opacity: var(--ll-idle);
}

.lattice-loader__run .lattice-loader__cell {
  animation: lattice-on var(--ll-cycle) var(--ll-ease-in-out) infinite;
}

.lattice-loader__run .lattice-loader__cell[data-hole] {
  animation: none;
  opacity: calc(var(--ll-idle) * 0.47);
}

.lattice-loader__label { font-weight: var(--tt-weight-label); }

.lattice-loader__timer {
  font-size: calc(var(--ll-font) * 0.875);
  font-variant-numeric: tabular-nums;
  opacity: 0.6;
}

.lattice-loader__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@keyframes lattice-on {
  0%, 100% { opacity: var(--ll-idle); }
  18%, 42% { opacity: var(--ll-peak); }
  62% { opacity: var(--ll-idle); }
}

@media (prefers-reduced-motion: reduce) {
  .lattice-loader { --ll-peak: 0.7; }
  .lattice-loader__run .lattice-loader__cell {
    animation-delay: 0ms !important;
    animation-duration: 1400ms !important;
  }
}

.build-chevron {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--tt-text-tertiary);
}

.build-row.is-open .build-chevron { transform: rotate(180deg); }

.build-row .seen-details { margin: 0; padding: 0 var(--tt-space-4) var(--tt-space-4); }

.line-list {
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-3);
  margin-top: var(--tt-space-6);
}

.line-card {
  padding: var(--tt-space-4);
  border: var(--tt-border-thin) solid var(--tt-card-border);
  border-radius: var(--tt-radius-lg);
  background: var(--tt-surface);
}

.line-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--tt-space-4);
}

.line-top > .flow-line-platform { flex: 1; min-width: 0; }

.line-title {
  margin: 0;
  font-size: 15px;
  line-height: 22px;
  font-weight: var(--tt-weight-title);
}

.line-confirmed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  color: var(--tt-success);
  font-size: 14px;
  line-height: 20px;
  font-weight: var(--tt-weight-label);
}

.line-confirmed svg { width: 16px; height: 16px; }

.seen-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: var(--tt-space-3);
  padding: 4px 10px 4px 12px;
  border: 0;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-fill-soft);
  color: var(--tt-text-secondary);
  font: inherit;
  font-size: 13px;
  line-height: 18px;
  font-weight: var(--tt-weight-label);
  cursor: pointer;
}

:root[data-theme="dark"] .seen-pill {
  background: var(--tt-fill-soft-hover);
  color: var(--tt-text-secondary);
}

.seen-pill svg { width: 12px; height: 12px; }

.seen-pill.is-open svg { transform: rotate(180deg); }

.seen-details {
  list-style: none;
  margin: var(--tt-space-3) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-2);
}

.seen-detail {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: var(--tt-space-3);
  align-items: start;
  padding: var(--tt-space-3);
  border-radius: var(--tt-radius-md);
  background: var(--tt-fill-soft);
}

:root[data-theme="dark"] .seen-detail {
  background: var(--tt-fill-soft-hover);
}

.seen-source {
  color: var(--tt-text-secondary);
  font-size: 13px;
  line-height: 20px;
  font-weight: var(--tt-weight-label);
}

.seen-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.seen-copy b {
  font-size: 14px;
  line-height: 20px;
  font-weight: var(--tt-weight-title);
  color: var(--tt-text-primary);
}

.seen-copy span {
  font-size: 14px;
  line-height: 20px;
  color: var(--tt-text-secondary);
}

.line-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--tt-space-2);
  flex: none;
}

.line-actions .btn svg { width: 14px; height: 14px; }

.btn--success {
  background: var(--tt-success);
  color: var(--tt-surface);
}

.btn--success:hover:not(:disabled) {
  background: color-mix(in srgb, var(--tt-text-primary) 12%, var(--tt-success));
}

:root[data-theme="dark"] .btn--success { color: var(--tt-success-subtle); }

.line-edit {
  display: flex;
  align-items: center;
  gap: var(--tt-space-2);
}

.line-edit .input { flex: 1; }

.line-dismissed {
  display: inline-flex;
  align-items: center;
  gap: var(--tt-space-2);
  margin-top: var(--tt-space-6);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--tt-text-secondary);
  font: inherit;
  font-size: 12px;
  line-height: 16px;
  font-weight: var(--tt-weight-label);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.line-dismissed svg { width: 12px; height: 12px; }

.line-dismissed[aria-expanded="true"] svg { transform: rotate(90deg); }

.progress-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tt-space-3);
  margin-top: var(--tt-space-6);
}

.action-note {
  padding: var(--tt-space-3) var(--tt-space-4);
  border-radius: var(--tt-radius-sm);
  border: var(--tt-border-thin) solid var(--tt-success-border);
  background: var(--tt-success-subtle);
  margin: 0 0 var(--tt-space-4);
}

.action-note b { color: var(--tt-success); font-size: 12px; line-height: 16px; font-weight: var(--tt-weight-label); }

.share {
  margin: var(--tt-space-3) 0 0;
  font-size: 13px;
  line-height: 20px;
  color: var(--tt-text-tertiary);
  font-variant-numeric: tabular-nums;
}

.transcript { padding: var(--tt-space-5); }

.link {
  color: var(--tt-primary-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  font-weight: var(--tt-weight-label);
  background: none;
  border: 0;
  padding: 0;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
}

.link:hover { text-decoration-thickness: 2px; }

.auth-dialog {
  width: min(420px, calc(100vw - 32px));
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.auth-dialog:focus { outline: none; }

.auth-dialog::backdrop { background: rgb(11 10 9 / 0.55); }

.auth-card {
  position: relative;
  overflow: hidden;
  background: var(--tt-surface-raised);
  border-radius: 24px;
  box-shadow: var(--tt-elevation-3);
  padding: var(--tt-space-8) var(--tt-space-8) var(--tt-space-6);
  text-align: center;
}

.auth-close {
  position: absolute;
  top: var(--tt-space-3);
  right: var(--tt-space-3);
  z-index: 2;
}

.auth-dialog--split {
  width: min(760px, calc(100vw - 32px));
}

.auth-card--split {
  display: flex;
  align-items: stretch;
  min-height: 520px;
  padding: 0;
  text-align: left;
}

.auth-form-panel {
  flex: 1 1 50%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--tt-space-8) var(--tt-space-8);
  background: #FFFFFF;
  color: #1C1B1B;
  --tt-surface: #FFFFFF;
  --tt-surface-raised: #FFFFFF;
  --tt-text-primary: #1C1B1B;
  --tt-text-secondary: #4A4A4A;
  --tt-text-tertiary: #656565;
  --tt-text-muted: #828282;
  --tt-border: #E9E9E9;
  --tt-border-field: #C4C4C4;
  --tt-fill-soft: #F0F0F0;
}

:root[data-theme="dark"] .auth-form-panel .btn--secondary {
  background: #FFFFFF;
  color: #1C1B1B;
  box-shadow: 0 0 1px rgb(0 0 0 / 0.4), 0 1px 1px rgb(0 0 0 / 0.04), 0 2px 4px rgb(0 0 0 / 0.04);
}

.auth-illustration-panel {
  flex: 1 1 50%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--tt-space-8) var(--tt-space-6);
  background:
    radial-gradient(90% 70% at 85% 12%, rgb(25 54 76 / 72%), transparent 58%),
    linear-gradient(165deg, #050505 0%, #07090d 42%, #0c1823 100%);
}

.auth-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--tt-space-5);
  width: 100%;
  height: 100%;
  min-height: 0;
  text-align: center;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  flex: none;
}

.auth-brand svg,
.auth-brand .wordmark {
  color: #ffffff;
}

.auth-side-copy {
  margin: 0;
  max-width: 28ch;
  color: #f5f5f5;
  font-size: 14px;
  line-height: 20px;
  flex: none;
}

.auth-dialog--split .auth-close {
  color: #f5f5f5;
}

.auth-dialog--split .auth-close:hover {
  background: rgb(255 255 255 / 0.12);
}

.auth-meet {
  width: 100%;
  height: auto;
  max-height: 58%;
  object-fit: contain;
  display: block;
  mix-blend-mode: lighten;
  min-height: 0;
}

@media (max-width: 640px) {
  .auth-card--split { flex-direction: column; }
  .auth-illustration-panel { display: none; }
}

.add-dialog { width: min(440px, calc(100vw - 32px)); }

.add-card {
  text-align: left;
  padding: var(--tt-space-6);
}

.add-card .edit-row { width: 100%; margin-top: var(--tt-space-2); }
.add-card .permission { margin-top: var(--tt-space-4); }

.add-sub {
  margin: 0 0 var(--tt-space-2);
  color: var(--tt-text-secondary);
  font-size: 13px;
  line-height: 19px;
}

.auth-confetti {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.auth-copy { position: relative; z-index: 2; }

.auth-title {
  margin: 0;
  font-size: var(--tt-size-title);
  line-height: var(--tt-leading-title);
  letter-spacing: -0.02em;
  font-weight: var(--tt-weight-title);
  color: var(--tt-text-primary);
}

.auth-form-panel .auth-title,
.auth-form-panel .auth-sub {
  text-align: center;
}

.auth-sub {
  margin: var(--tt-space-2) 0 0;
  color: var(--tt-text-secondary);
  font-size: 15px;
  line-height: 22px;
}

.auth-google,
.auth-submit {
  width: 100%;
  height: 38px;
  min-height: 38px;
  margin-top: var(--tt-space-6);
  font-size: 15px;
}

.auth-or {
  display: flex;
  align-items: center;
  gap: var(--tt-space-3);
  margin: var(--tt-space-5) 0 var(--tt-space-2);
  color: var(--tt-text-tertiary);
  font-size: 13px;
  line-height: 20px;
}

.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--tt-border);
}

.auth-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--tt-space-2);
  margin-top: var(--tt-space-4);
  text-align: left;
}

.auth-input {
  height: 38px;
  border-radius: var(--tt-radius-pill);
  padding: 0 var(--tt-space-4);
  font-size: 15px;
}

.auth-pass { position: relative; }

.auth-pass .auth-input { padding-right: 44px; }

.auth-eye {
  position: absolute;
  top: 0;
  right: 4px;
  width: 40px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--tt-text-tertiary);
  cursor: pointer;
}

.auth-eye svg { width: 16px; height: 16px; }

.auth-error {
  margin-top: var(--tt-space-3);
  text-align: left;
}

.auth-error[hidden] { display: none; }

.auth-copy .auth-submit { margin-top: var(--tt-space-6); }

.toast {
  --toast-c: var(--tt-info);
  --toast-bg: var(--tt-info-subtle);
  position: fixed;
  right: var(--tt-space-5);
  bottom: var(--tt-space-5);
  z-index: var(--tt-z-toast);
  display: flex;
  align-items: center;
  gap: var(--tt-space-3);
  width: min(380px, calc(100vw - 32px));
  padding: var(--tt-space-3) var(--tt-space-3) var(--tt-space-3) var(--tt-space-3);
  overflow: hidden;
  background: var(--toast-bg);
  border: 0;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgb(30 28 25 / 0.12), 0 2px 6px rgb(30 28 25 / 0.06);
  color: var(--tt-text-primary);
}
.toast--fresh { animation: toast-in 380ms cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
.toast--success { --toast-c: var(--tt-success); --toast-bg: var(--tt-success-subtle); }
.toast--info { --toast-c: var(--tt-info); --toast-bg: var(--tt-info-subtle); }
.toast--warning { --toast-c: var(--tt-caution); --toast-bg: var(--tt-caution-subtle); }
.toast--error { --toast-c: var(--tt-danger); --toast-bg: var(--tt-danger-subtle); }
.toast-ico { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--toast-c); color: #fff; }
.toast-ico svg { width: 18px; height: 18px; }
.toast-copy { flex: 1; min-width: 0; }
.toast-title { margin: 0; font-size: 14px; line-height: 20px; font-weight: var(--tt-weight-title); }
.toast-text { margin: 0; font-size: 13px; line-height: 18px; color: var(--tt-text-secondary); }
.toast-close { flex: none; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--tt-text-secondary); cursor: pointer; }
.toast-close svg { width: 14px; height: 14px; }
.toast-close:hover { background: rgb(255 255 255 / 0.7); color: var(--tt-text-primary); }
.toast-close:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }
.toast-timer { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--toast-c); opacity: 0.55; transform-origin: left; animation: toast-timer var(--toast-ms, 4500ms) linear forwards; animation-delay: calc(var(--toast-elapsed, 0ms) * -1); }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes toast-timer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .toast--fresh { animation: none; } .toast-timer { animation: none; display: none; } }
@media (max-width: 640px) { .toast { right: 16px; left: 16px; width: auto; bottom: 16px; } }

.ready-toast {
  position: fixed;
  right: var(--tt-space-5);
  bottom: var(--tt-space-5);
  z-index: var(--tt-z-toast);
  display: flex;
  align-items: stretch;
  width: min(336px, calc(100vw - 32px));
  border-radius: var(--tt-radius-md);
  background: #27272a;
  color: #f5f5f5;
  box-shadow: var(--tt-elevation-3);
  overflow: hidden;
  animation: ready-toast-in 320ms var(--tt-ease-standard);
}

@keyframes ready-toast-in {
  from { opacity: 0; transform: translateY(12px); }
}

.ready-toast-hit {
  display: flex;
  align-items: center;
  gap: var(--tt-space-3);
  flex: 1;
  min-width: 0;
  padding: var(--tt-space-4);
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.ready-toast-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: var(--tt-radius-pill);
  background: rgb(255 255 255 / 0.1);
  color: #f5f5f5;
}

.ready-toast-icon svg { width: 16px; height: 16px; }

.ready-toast-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.ready-toast-title {
  font-size: 13px;
  line-height: 18px;
  font-weight: var(--tt-weight-title);
}

.ready-toast-desc {
  font-size: 12px;
  line-height: 16px;
  color: rgb(245 245 245 / 0.66);
}

.ready-toast-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  margin: var(--tt-space-3) var(--tt-space-3) var(--tt-space-3) 0;
  border: 0;
  border-radius: var(--tt-radius-sm);
  background: transparent;
  color: rgb(245 245 245 / 0.7);
  cursor: pointer;
}

.ready-toast-close:hover { background: rgb(255 255 255 / 0.1); }

.ready-toast-close svg { width: 12px; height: 12px; }

.ready-toast-fuse {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgb(255 255 255 / 0.45);
  transform-origin: left center;
  animation: ready-toast-fuse 6000ms linear forwards;
}

@keyframes ready-toast-fuse {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.presence-block { margin-top: var(--tt-space-6); }

.presence-heading {
  margin: 0;
  font-size: 16px;
  line-height: 22px;
  font-weight: var(--tt-weight-title);
  letter-spacing: -0.015em;
}

.presence-block > .presence-heading { margin-bottom: var(--tt-space-3); }

.avatar-strip {
  display: flex;
  align-items: center;
  gap: var(--tt-space-4);
}

.avatar-intro {
  flex: 0 0 148px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--tt-space-2);
}

.avatar-intro .hint { margin: 0; }

.avatar-row {
  display: flex;
  align-items: stretch;
  gap: var(--tt-space-3);
  flex: 1;
  min-width: 0;
  overflow-x: auto;
}

.look-tile {
  position: relative;
  flex: 0 0 128px;
  width: 128px;
  height: 148px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--tt-radius-md);
  background: var(--tt-fill-soft);
  cursor: pointer;
  font: inherit;
}

.look-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}

.look-tile::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46%;
  background: linear-gradient(to top, color-mix(in srgb, var(--tt-text-primary) 62%, transparent), transparent);
  pointer-events: none;
}

.look-tile span {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 10px;
  z-index: 1;
  margin: 0;
  text-align: center;
  color: var(--tt-surface);
  font-size: 13px;
  line-height: 18px;
  font-weight: var(--tt-weight-label);
}

.look-tile.is-selected { box-shadow: inset 0 0 0 2px var(--tt-text-primary); }

.voice-picks,
.library-voices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--tt-space-3);
}

.voice-picks { grid-template-columns: 1fr; }

.library-voices {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: var(--tt-space-3);
}

.voice-pick,
.library-voice {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: var(--tt-space-4);
  border-radius: var(--tt-radius-lg);
  border: var(--tt-border-thin) solid var(--tt-border);
  background: var(--tt-surface);
  color: var(--tt-text-primary);
  font: inherit;
  cursor: pointer;
}

.voice-pick {
  flex-direction: row;
  align-items: center;
  gap: var(--tt-space-4);
  cursor: default;
}

.voice-copy { flex: 1; min-width: 0; }

.voice-pick .voice-ico { margin-bottom: 0; flex: none; }

.voice-pick .btn { margin-top: 0; flex: none; }

.voice-radio {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 18px;
  height: 18px;
  border-radius: var(--tt-radius-pill);
  border: 1.5px solid var(--tt-border-field);
  background: var(--tt-surface);
  box-sizing: border-box;
}

.voice-pick.is-selected .voice-radio {
  border-color: var(--tt-cta-strong);
  background: var(--tt-cta-strong);
  box-shadow: inset 0 0 0 4px var(--tt-surface);
}

.voice-pick.is-selected,
.library-voice.is-selected {
  border-color: color-mix(in srgb, var(--tt-text-secondary) 55%, var(--tt-border));
  background: var(--tt-surface);
}

.voice-hit {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.voice-listen {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--tt-space-4);
  padding: 6px 12px;
  border: 0;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-fill-soft);
  color: var(--tt-text-primary);
  font: inherit;
  font-size: 13px;
  line-height: 18px;
  font-weight: var(--tt-weight-label);
  cursor: pointer;
}

.voice-listen svg { width: 14px; height: 14px; }


.voice-ico {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: var(--tt-space-3);
  border: var(--tt-border-thin) dashed var(--tt-border-field);
  border-radius: var(--tt-radius-pill);
  color: var(--tt-text-primary);
}

.voice-ico svg { width: 14px; height: 14px; }

.voice-pick b,
.library-voice b {
  display: block;
  font-size: 16px;
  line-height: 22px;
  font-weight: var(--tt-weight-title);
}

.voice-pick p,
.library-voice p {
  margin: var(--tt-space-1) 0 0;
  color: var(--tt-text-secondary);
  font-size: 14px;
  line-height: 20px;
}

.voice-chip {
  display: inline-flex;
  margin-top: var(--tt-space-4);
  padding: 6px 12px;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-fill-soft);
  color: var(--tt-text-primary);
  font-size: 13px;
  line-height: 18px;
  font-weight: var(--tt-weight-label);
}

.voice-pick.is-selected .voice-chip { background: var(--tt-surface); }

.voice-card {
  --tt-surface: #FFFFFF;
  --tt-surface-sunken: #F7F7F7;
  --tt-text-primary: #1C1B1B;
  --tt-text-secondary: #4A4A4A;
  --tt-fill-soft: #F0F0F0;
  --tt-border: #E9E9E9;
  --tt-card-border: #F0F0F0;
  --tt-elevation-1: 0 1px 2px rgb(30 28 25 / 0.06);
  width: min(520px, 100%);
  background: var(--tt-surface);
  color: var(--tt-text-primary);
}

.seg {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-surface-sunken);
}

.seg button {
  border: 0;
  border-radius: var(--tt-radius-pill);
  padding: 6px 16px;
  background: transparent;
  color: var(--tt-text-secondary);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  font-weight: var(--tt-weight-label);
  cursor: pointer;
}

.seg button[aria-pressed="true"] {
  background: var(--tt-surface);
  color: var(--tt-text-primary);
  box-shadow: var(--tt-elevation-1);
}

.seg--icons button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 32px;
  padding: 0;
}

.seg--icons svg {
  width: 16px;
  height: 16px;
}

.voice-list {
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-2);
  margin-top: var(--tt-space-4);
}

.voice-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tt-space-3);
  padding: var(--tt-space-3) var(--tt-space-4);
  border: var(--tt-border-thin) solid var(--tt-border);
  border-radius: var(--tt-radius-lg);
  background: var(--tt-surface);
}

.voice-row.is-selected {
  border-color: color-mix(in srgb, var(--tt-text-secondary) 55%, var(--tt-border));
}

.voice-row-copy { min-width: 0; }

.voice-row-copy b {
  display: block;
  font-size: 15px;
  line-height: 22px;
  font-weight: var(--tt-weight-title);
}

.voice-row-copy span {
  display: block;
  margin-top: 2px;
  color: var(--tt-text-secondary);
  font-size: 13px;
  line-height: 18px;
}

.voice-row-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--tt-space-2);
}

.voice-row-actions svg { width: 14px; height: 14px; }

.library-voice span {
  display: block;
  margin-top: 2px;
  color: var(--tt-text-secondary);
  font-size: 13px;
  line-height: 18px;
}

.call-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--tt-space-2) 0 var(--tt-space-5);
  perspective: 800px;
}

.call-avatar {
  width: 88px;
  height: 88px;
  border-radius: var(--tt-radius-pill);
  overflow: hidden;
  background: var(--tt-fill-soft);
}

.call-avatar.is-video {
  width: 160px;
  height: 160px;
  border-radius: var(--tt-radius-lg);
}

.call-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}

.refine-frame__info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 36px 16px 16px;
  background: linear-gradient(to top, rgb(0 0 0 / 0.85) 0%, rgb(0 0 0 / 0) 100%);
  text-align: center;
  opacity: 0;
  transition: opacity 500ms ease;
  pointer-events: none;
}

.refine-frame[data-resolved] .refine-frame__info { opacity: 1; }

.refine-frame__name {
  margin: 0;
  font-size: 17px;
  line-height: 24px;
  font-weight: var(--tt-weight-title);
  color: #fff;
}

.refine-frame__role {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 18px;
  font-weight: var(--tt-weight-body);
  color: rgb(255 255 255 / 0.75);
}

/* Video frame pins its own paper and ink so the reveal stays light on the picture. */
.refine-frame {
  --rf-w: 280px;
  --rf-aspect: 9 / 16;
  --rf-radius: var(--tt-radius-lg);
  --rf-bg: #27272a;
  --rf-ink: #f5f5f5;
  --rf-stage: 400ms;
  --rf-blur: 4px;
  --rf-sat: 0.6;
  --rf-scale: 1.04;
  --rf-opacity: 0.55;
  --rf-error: #ef4444;
  --rf-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  isolation: isolate;
  width: min(var(--rf-w), 100%);
  aspect-ratio: var(--rf-aspect);
  border-radius: var(--rf-radius);
  overflow: hidden;
  box-shadow: var(--tt-elevation-2);
  background: var(--rf-bg);
  color: var(--rf-ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: var(--tt-weight-label);
  line-height: 1;
  transform-style: preserve-3d;
  will-change: transform;
}

.refine-frame[data-tilt-ready] { cursor: pointer; }

.refine-frame__media {
  position: absolute;
  inset: 0;
  opacity: var(--rf-opacity);
  filter: blur(var(--rf-blur)) saturate(var(--rf-sat));
  transform: scale(var(--rf-scale));
  transition:
    opacity var(--rf-stage) var(--rf-ease-out),
    filter var(--rf-stage) var(--rf-ease-out),
    transform var(--rf-stage) var(--rf-ease-out);
}

.refine-frame[data-status="queued"] .refine-frame__media {
  animation: refine-frame-wait 2.4s ease-in-out infinite;
}

@keyframes refine-frame-wait {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.65; }
}

.refine-frame__print {
  width: 100%;
  height: 100%;
  transition: opacity var(--rf-stage) ease;
}

.refine-frame__print > * {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.refine-frame[data-mosaic] .refine-frame__print { opacity: 0; }
.refine-frame[data-resolved] .refine-frame__print { opacity: 1; }

.refine-frame__mosaic {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--rf-stage) ease;
}

.refine-frame[data-mosaic] .refine-frame__mosaic { opacity: 1; }
.refine-frame[data-resolved] .refine-frame__mosaic { opacity: 0; }

.refine-frame__sweep {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 38%, color-mix(in srgb, var(--rf-ink) 14%, transparent) 50%, transparent 62%);
  background-size: 260% 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--rf-stage) ease;
}

.refine-frame[data-sweep]:not([data-mosaic]) .refine-frame__sweep {
  opacity: 1;
  animation: refine-frame-sweep 2.2s linear infinite;
}

@keyframes refine-frame-sweep {
  from { background-position: 130% 0; }
  to { background-position: -130% 0; }
}

.refine-frame__chip {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px 0 8px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--rf-bg) 72%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
}

.refine-frame__chip[hidden] { display: none; }

.refine-frame__mark {
  display: inline-flex;
  color: color-mix(in srgb, var(--rf-ink) 80%, transparent);
}

.refine-frame__mark svg { width: 13px; height: 13px; display: block; }

.refine-frame__mark[data-kind="spin"] { animation: refine-frame-spin 1.1s linear infinite; }

@keyframes refine-frame-spin { to { transform: rotate(360deg); } }

.refine-frame__label { animation: refine-frame-label 200ms ease both; }

@keyframes refine-frame-label {
  from { opacity: 0; filter: blur(2px); }
}

.refine-frame__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .refine-frame__media { transition: opacity var(--rf-stage) ease; }
  .refine-frame[data-sweep] .refine-frame__sweep { animation: none; opacity: 0; }
  .refine-frame[data-status="queued"] .refine-frame__media { animation: none; }
  .refine-frame__mark[data-kind="spin"] { animation: none; }
}

.call-live {
  display: inline-flex;
  align-items: center;
  gap: var(--tt-space-2);
  margin: var(--tt-space-2) 0 0;
  color: var(--tt-text-secondary);
  font-size: 13px;
  line-height: 18px;
  font-weight: var(--tt-weight-label);
}

.call-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--tt-space-3);
  margin-top: var(--tt-space-6);
}

.call-thread { margin-top: var(--tt-space-2); }

.call-skip {
  display: block;
  margin: var(--tt-space-4) auto 0;
  font-size: 13px;
}

.call-thread .card-body {
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-4);
  padding-top: var(--tt-space-4);
}

.call-thread .turn { margin: 0; }

.celebrate {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.celebrate .page-title,
.celebrate .lede,
.celebrate .hint,
.celebrate-ask {
  max-width: none;
  text-align: center;
}

.celebrate-art { align-self: stretch; width: 100%; }

.celebrate-confetti {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.celebrate-art {
  --orb-a: #7c5cff;
  --orb-b: #ff4d8d;
  --orb-c: #3ecbff;
  --orb-d: #ffb15a;
  position: relative;
  height: 180px;
  margin-bottom: var(--tt-space-6);
  border-radius: var(--tt-radius-lg);
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 120%, #1a1030 0%, #0c0a12 70%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(26px);
  opacity: 0.92;
}

.orb-a { width: 190px; height: 190px; left: 6%; top: -30%; background: var(--orb-a); animation: orb-drift 9s ease-in-out infinite; }
.orb-b { width: 160px; height: 160px; right: 4%; top: 8%; background: var(--orb-b); animation: orb-drift 11s ease-in-out infinite reverse; }
.orb-c { width: 150px; height: 150px; left: 28%; bottom: -40%; background: var(--orb-c); animation: orb-drift 10s ease-in-out infinite; }
.orb-d { width: 120px; height: 120px; right: 22%; bottom: -20%; background: var(--orb-d); animation: orb-drift 8s ease-in-out infinite reverse; }

.celebrate-wave {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 140px;
  height: 48px;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 8px 18px rgb(0 0 0 / 0.35));
}

.celebrate-ask {
  margin: var(--tt-space-4) 0 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: var(--tt-weight-title);
  color: var(--tt-text-primary);
}

@keyframes orb-drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(12px, -10px, 0) scale(1.08); }
}

.turn-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tt-space-2);
  margin-top: var(--tt-space-2);
}

.turn-actions .btn[aria-pressed="true"] {
  box-shadow: inset 0 0 0 1.5px var(--tt-text-primary), 0 0 1px rgb(0 0 0 / 0.4);
}

.turn-note {
  margin: var(--tt-space-2) 0 0;
  color: var(--tt-text-secondary);
  font-size: 13px;
  line-height: 18px;
}

.issue-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: calc(100vw - 32px);
}

.issue-dialog:focus { outline: none; }

.issue-dialog::backdrop { background: rgb(11 10 9 / 0.55); }

.issue-card {
  --tt-surface: #FFFFFF;
  --tt-text-primary: #1C1B1B;
  --tt-text-secondary: #4A4A4A;
  --tt-fill-soft: #F0F0F0;
  --tt-border: #E9E9E9;
  position: relative;
  width: min(440px, 100%);
  padding: var(--tt-space-4);
  border-radius: var(--tt-radius-lg);
  background: var(--tt-surface);
  color: var(--tt-text-primary);
}

.issue-card.voice-card {
  width: min(520px, 100%);
  background: var(--tt-surface);
  color: var(--tt-text-primary);
}

.issue-close { position: absolute; top: 12px; right: 12px; }

.upsell-dialog { width: min(420px, calc(100vw - 32px)); }

.upsell-card {
  width: 100%;
  padding: var(--tt-space-8) var(--tt-space-6) var(--tt-space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.upsell-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: var(--tt-space-4);
  border-radius: var(--tt-radius-pill);
  background: var(--tt-fill-soft);
  color: var(--tt-text-primary);
}

.upsell-icon svg {
  width: 20px;
  height: 20px;
  color: inherit;
  margin: 0;
}

.upsell-title {
  margin: 0;
  font-size: var(--tt-size-title);
  line-height: var(--tt-leading-title);
  letter-spacing: -0.015em;
  font-weight: var(--tt-weight-title);
}

.upsell-sub {
  margin-top: -6px;
  color: var(--tt-text-tertiary);
  font-size: 14px;
  line-height: 21px;
}

.upsell-topics-label {
  align-self: flex-start;
  margin-top: var(--tt-space-5);
  color: var(--tt-text-tertiary);
  font-size: 12px;
  line-height: 16px;
  font-weight: var(--tt-weight-label);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.upsell-topics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
  margin-top: var(--tt-space-2);
  width: 100%;
}

.upsell-actions {
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-2);
  width: 100%;
  margin-top: var(--tt-space-6);
}

.upsell-actions .btn { width: 100%; }

.upsell-note {
  display: flex;
  align-items: flex-start;
  gap: var(--tt-space-2);
  width: 100%;
  margin-top: var(--tt-space-4);
  padding: var(--tt-space-3);
  border-radius: var(--tt-radius-sm);
  border: var(--tt-border-thin) solid var(--tt-info-border);
  background: var(--tt-info-subtle);
  text-align: left;
}

.upsell-note-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: var(--tt-info);
}

.upsell-note-icon svg { width: 16px; height: 16px; }

.upsell-note p {
  margin: 0;
  color: var(--tt-info);
  font-size: 13px;
  line-height: 18px;
}

.issue-title {
  margin: 0 36px var(--tt-space-3) 0;
  font-size: 16px;
  line-height: 22px;
  font-weight: var(--tt-weight-title);
}

.issue-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--tt-space-2);
}

.issue-why {
  color: var(--tt-text-secondary);
  font-size: 15px;
  line-height: 22px;
}

.issue-chip {
  padding: 8px 14px;
  border: var(--tt-border-thin) solid var(--tt-border);
  border-radius: var(--tt-radius-md);
  background: var(--tt-surface);
  color: var(--tt-text-secondary);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}

.issue-chip:hover { border-color: var(--tt-border-interactive); color: var(--tt-text-primary); }

.page--library {
  max-width: 1024px;
  margin: 0 auto;
  padding: var(--tt-space-5) var(--tt-space-16) var(--tt-space-8);
}

.lib-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tt-space-4);
  min-height: 40px;
}

.lib-title {
  display: flex;
  align-items: center;
  gap: var(--tt-space-2);
  margin: 0;
  font-size: 16px;
  line-height: 22px;
  font-weight: var(--tt-weight-title);
  letter-spacing: -0.015em;
}

.lib-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: var(--tt-radius-sm);
  color: var(--tt-text-secondary);
}

.lib-mark svg { width: 18px; height: 18px; }

.lib-mark--button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.lib-mark--button:hover { background: var(--tt-surface-sunken); }

.lib-tools {
  display: flex;
  align-items: center;
  gap: var(--tt-space-3);
}

.lib-search {
  display: flex;
  align-items: center;
  gap: var(--tt-space-2);
  height: 36px;
  padding: 0 12px;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-surface);
  box-shadow: 0 0 0 1px var(--tt-border);
  color: var(--tt-text-tertiary);
}

.lib-search svg { width: 16px; height: 16px; flex: none; }

.lib-search input {
  width: 148px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--tt-text-primary);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  outline: none;
}

.lib-search input::placeholder { color: var(--tt-text-muted); }

.page--library .page-title {
  max-width: none;
  margin-top: var(--tt-space-8);
}

.rp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--tt-space-4);
  margin-top: var(--tt-space-5);
}

.rp-grid .rp-card,
.home-plays .rp-card {
  width: auto;
  flex: initial;
}

.rp-table-card {
  margin-top: var(--tt-space-5);
  background: var(--tt-surface);
  border: var(--tt-border-thin) solid var(--tt-card-border);
  border-radius: var(--tt-radius-md);
  box-shadow: var(--tt-card-shadow);
  overflow: hidden;
}

.rp-table-scroll {
  overflow: auto;
  max-height: calc(100vh - 240px);
}

.rp-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  table-layout: fixed;
}

.rp-table th,
.rp-table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: middle;
  border-bottom: var(--tt-border-thin) solid var(--tt-border);
  font-size: 13px;
  line-height: 20px;
  font-weight: var(--tt-weight-body);
  color: var(--tt-text-primary);
}

.rp-table thead th {
  position: sticky;
  top: 0;
  z-index: var(--tt-z-raised);
  background: var(--tt-surface);
  font-weight: var(--tt-weight-label);
  color: var(--tt-text-tertiary);
  white-space: nowrap;
}

.rp-table tbody tr:last-child th,
.rp-table tbody tr:last-child td { border-bottom: 0; }

.rp-table tbody tr:hover th,
.rp-table tbody tr:hover td { background: var(--tt-fill-soft); }

.rp-table .num { text-align: right; font-variant-numeric: tabular-nums; }

.rp-table th.rp-table-name,
.rp-table-empty .rp-table-name {
  font-size: 15px;
  line-height: 23px;
  font-weight: var(--tt-weight-title);
  letter-spacing: -0.015em;
  white-space: normal;
}

.rp-table-title {
  display: block;
  font-size: 15px;
  line-height: 23px;
  font-weight: var(--tt-weight-title);
  letter-spacing: -0.015em;
}

.rp-table thead th:first-child,
.rp-table th.rp-table-name {
  width: 32%;
}

.rp-table th.rp-table-name .rp-table-desc {
  display: block;
  width: 260px;
  max-width: 100%;
  margin-top: 2px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--tt-text-secondary);
  font-size: 13px;
  line-height: 20px;
  font-weight: var(--tt-weight-body);
  letter-spacing: 0;
}

.rp-hover-tip {
  position: fixed;
  z-index: var(--tt-z-tooltip);
  max-width: 280px;
  padding: 8px 10px;
  background: var(--tt-surface);
  color: var(--tt-text-primary);
  border-radius: var(--tt-radius-sm);
  box-shadow: var(--tt-elevation-2);
  font-size: 13px;
  line-height: 18px;
  font-weight: var(--tt-weight-body);
  pointer-events: none;
}

.rp-hover-tip b {
  display: block;
  font-weight: var(--tt-weight-title);
}

.rp-hover-tip .rp-tip-role {
  display: block;
  margin-top: 2px;
  color: var(--tt-text-secondary);
}

.rp-hover-tip span:last-child {
  display: block;
  margin-top: 2px;
}

.rp-table tbody tr.rp-table-row { cursor: pointer; }

.rp-table tbody tr.rp-table-row:focus-visible {
  outline: 2px solid var(--tt-focus);
  outline-offset: -2px;
}

.rp-detail-back { margin-bottom: var(--tt-space-6); }

.rp-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: var(--tt-space-4);
  align-items: start;
}

.rp-detail {
  max-width: none;
  margin: 0;
  padding: var(--tt-space-6);
  text-align: left;
  background: var(--tt-surface);
  border: var(--tt-border-thin) solid var(--tt-card-border);
  border-radius: var(--tt-radius-lg);
  box-shadow: var(--tt-card-shadow);
}

.rp-detail .page-title {
  margin-top: 0;
  margin-inline: 0;
  max-width: none;
}

.rp-detail-kicker {
  margin-top: var(--tt-space-6);
  margin-bottom: var(--tt-space-2);
}

.rp-detail-twin {
  margin: 0;
  font-size: 20px;
  line-height: 26px;
  font-weight: var(--tt-weight-title);
  letter-spacing: -0.015em;
}

.rp-detail-scenario {
  margin: 0;
  max-width: 65ch;
  color: var(--tt-text-secondary);
  font-size: 15px;
  line-height: 23px;
}

.rp-detail-stats {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: var(--tt-space-3);
  margin-top: var(--tt-space-6);
}

.rp-stat {
  min-width: 132px;
  padding: var(--tt-space-4);
  border-radius: var(--tt-radius-md);
  text-align: left;
}

.rp-stat .overline {
  margin: 0 0 var(--tt-space-2);
  color: inherit;
}

.rp-stat--sessions {
  background: var(--tt-success-subtle);
  color: var(--tt-success);
}

.rp-stat--score {
  background: var(--tt-info-subtle);
  color: var(--tt-info);
}

.rp-detail-stat {
  margin: 0;
  font-size: 24px;
  line-height: 30px;
  font-weight: var(--tt-weight-title);
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
  color: inherit;
}

.rp-detail-actions {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: var(--tt-space-3);
  margin-top: var(--tt-space-6);
}

.rp-analytics {
  padding: var(--tt-space-5);
  background: var(--tt-surface);
  border: var(--tt-border-thin) solid var(--tt-card-border);
  border-radius: var(--tt-radius-lg);
  box-shadow: var(--tt-card-shadow);
}

.rp-analytics-title {
  margin: 0 0 var(--tt-space-4);
  font-size: 17px;
  line-height: 24px;
  font-weight: var(--tt-weight-title);
  letter-spacing: -0.015em;
}

.rp-analytics-label {
  margin: var(--tt-space-5) 0 var(--tt-space-2);
  font-size: 13px;
  line-height: 20px;
  font-weight: var(--tt-weight-label);
  color: var(--tt-text-secondary);
}

.rp-chart {
  display: block;
  width: 100%;
  height: auto;
  max-height: 120px;
}

.rp-chart-bar { fill: var(--tt-info); }

.rp-chart-line {
  fill: none;
  stroke: var(--tt-success);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.rp-chart-dot { fill: var(--tt-success); }

.rp-chart-label {
  fill: var(--tt-text-tertiary);
  font-size: 11px;
  font-family: var(--tt-font-ui), sans-serif;
}

.rp-history {
  list-style: none;
  margin: var(--tt-space-4) 0 0;
  padding: 0;
}

.rp-history button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: var(--tt-space-3) 0;
  border: 0;
  border-bottom: var(--tt-border-thin) solid var(--tt-border);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.rp-history li:last-child button { border-bottom: 0; }

.rp-history button:hover { background: var(--tt-fill-soft); }

.rp-history-who {
  font-size: 15px;
  line-height: 23px;
  font-weight: var(--tt-weight-title);
}

.rp-history-line {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--tt-text-secondary);
  font-size: 13px;
  line-height: 20px;
  font-weight: var(--tt-weight-body);
}

.rp-history-line b {
  font-weight: var(--tt-weight-label);
  color: var(--tt-text-primary);
}

.rp-history-meta {
  margin: var(--tt-space-2) 0 0;
  color: var(--tt-text-secondary);
  font-size: 13px;
  line-height: 20px;
}

.rp-chat-view {
  margin-top: var(--tt-space-4);
}

.rp-chat-back {
  display: flex;
  align-items: center;
  gap: var(--tt-space-2);
  width: fit-content;
  margin: 0 0 var(--tt-space-3);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--tt-text-primary);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  font-weight: var(--tt-weight-regular);
  cursor: pointer;
}

.rp-chat-back svg { width: 16px; height: 16px; }

.rp-chat {
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-3);
  margin-top: var(--tt-space-4);
  padding: var(--tt-space-4);
  background: var(--tt-fill-soft);
  border-radius: var(--tt-radius-md);
}

.rp-chat-line {
  max-width: 78%;
  padding: var(--tt-space-3);
  background: var(--tt-surface);
  border-radius: var(--tt-radius-md);
  box-shadow: var(--tt-elevation-1);
}

.rp-chat-line--twin { align-self: flex-start; }

.rp-chat-line--learner { align-self: flex-end; }

.rp-chat-line b {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
  line-height: 18px;
  font-weight: var(--tt-weight-label);
}

.rp-chat-line p {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
}

[data-theme="dark"] .rp-chat { background: var(--tt-surface-sunken); }

[data-theme="dark"] .rp-chat-line { background: var(--tt-surface-raised); }

@media (max-width: 1100px) {
  .rp-detail-layout { grid-template-columns: 1fr; }
}

.rp-row-menu {
  position: fixed;
  z-index: var(--tt-z-dropdown);
  min-width: 180px;
}

.rp-table-empty,
.rp-table-empty-note {
  padding: var(--tt-space-8) var(--tt-space-5);
}

.rp-table-empty .card-sub,
.rp-table-empty-note {
  margin-top: var(--tt-space-2);
  color: var(--tt-text-secondary);
}

.rp-card {
  display: flex;
  flex-direction: column;
  width: 300px;
  flex: 0 0 300px;
  padding: 0;
  overflow: visible;
  border: var(--tt-border-thin) solid var(--tt-card-border);
  border-radius: var(--tt-radius-lg);
  background: var(--tt-surface);
  box-shadow: var(--tt-card-shadow);
  text-align: left;
  color: inherit;
  font: inherit;
  transition: box-shadow var(--tt-duration-quick) var(--tt-ease-standard);
}

.rp-card:hover { box-shadow: var(--tt-elevation-2); }

.home-plays .rp-art,
.rp-grid .rp-art {
  height: auto;
  min-height: 168px;
}

.rp-quote {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-2);
  padding: var(--tt-space-4) var(--tt-space-4) 36px;
  color: var(--tt-text-primary);
  text-align: left;
}

.rp-who {
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: var(--tt-weight-label);
  color: rgb(28 27 27 / 0.72);
}

.rp-quote-bubble {
  position: relative;
  background: var(--tt-surface);
  color: var(--tt-text-primary);
  border-radius: var(--tt-radius-md);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.08);
  padding: var(--tt-space-3);
  font-size: 13px;
  line-height: 18px;
}

.rp-quote-bubble::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -10px;
  height: 16px;
  border-radius: 0 0 var(--tt-radius-md) var(--tt-radius-md);
  background: color-mix(in srgb, var(--tt-surface) 28%, transparent);
  z-index: -1;
}

.rp-art {
  position: relative;
  display: block;
  height: 148px;
  overflow: hidden;
  border-radius: var(--tt-radius-lg) var(--tt-radius-lg) 0 0;
}

.rp-art--0 {
  background: linear-gradient(135deg, #a8c6ec 0%, #d2c3e8 50%, #f1c6d7 100%);
}

.rp-art--1 {
  background: linear-gradient(135deg, #a8e0c9 0%, #bfe0e8 50%, #c7cdf2 100%);
}

.rp-art--2 {
  background: linear-gradient(135deg, #f3cfa0 0%, #f0bcc7 50%, #ddb8ea 100%);
}

.rp-art--3 {
  background: linear-gradient(135deg, #cbe3a8 0%, #bfe6cf 50%, #a8e0e0 100%);
}

.rp-art--4 {
  background: linear-gradient(135deg, #f6d9a0 0%, #f2c2b0 50%, #ecb6cc 100%);
}

.rp-art--5 {
  background: linear-gradient(135deg, #b8cdf0 0%, #c8c4ec 50%, #e0c0e8 100%);
}

.rp-art--6 {
  background: linear-gradient(135deg, #f0e3a0 0%, #ecd0b0 50%, #e8bcc4 100%);
}

.rp-art--7 {
  background: linear-gradient(135deg, #a0e4e0 0%, #b8d4ec 50%, #ccc8f0 100%);
}

.rp-art--8 {
  background: linear-gradient(135deg, #f0c8a8 0%, #eec0d0 50%, #d8bce8 100%);
}

.rp-art--9 {
  background: linear-gradient(135deg, #bcead0 0%, #c4e0e4 50%, #d4d0f0 100%);
}

.rp-status {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 2px 8px;
  border-radius: var(--tt-radius-pill);
  font-size: 12px;
  line-height: 16px;
  font-weight: var(--tt-weight-label);
}

.rp-status.is-published {
  background: var(--tt-success-subtle);
  color: var(--tt-success);
}

.rp-status.is-draft {
  background: var(--tt-caution-subtle);
  color: var(--tt-caution);
}

.rp-body {
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-2);
  padding: 14px 16px 0;
}

.rp-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tt-space-2);
  margin-top: auto;
  padding: var(--tt-space-4) 16px 16px;
}

.rp-actions .rp-row-more { margin-left: auto; }

.rp-icon-actions {
  display: flex;
  align-items: center;
  gap: var(--tt-space-1);
}

.rp-sessions {
  color: var(--tt-text-secondary);
  font-size: 13px;
  line-height: 20px;
}

.rp-learners {
  display: flex;
  align-items: center;
}

.rp-learner-avatar {
  display: block;
  width: 28px;
  height: 28px;
  flex: none;
  margin-left: -8px;
  border: 2px solid var(--tt-surface);
  border-radius: var(--tt-radius-pill);
  background: var(--tt-fill-soft);
  object-fit: cover;
}

.rp-learner-avatar:first-child { margin-left: 0; }

.rp-learner-avatar--more {
  display: grid;
  place-items: center;
  background: var(--tt-fill-soft-hover);
  color: var(--tt-text-secondary);
  font-size: 11px;
  font-weight: var(--tt-weight-label);
}

.rp-icon-btn {
  position: relative;
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--tt-radius-pill);
  background: transparent;
  color: var(--tt-text-secondary);
  cursor: pointer;
}

.rp-icon-btn:hover { background: var(--tt-fill-soft); }

.rp-icon-btn svg { width: 16px; height: 16px; }

.rp-icon-btn::after {
  content: attr(aria-label);
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: var(--tt-surface);
  color: var(--tt-text-primary);
  font-size: 13px;
  line-height: 18px;
  font-weight: var(--tt-weight-body);
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: var(--tt-radius-sm);
  box-shadow: var(--tt-elevation-2);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--tt-duration-quick) var(--tt-ease-standard);
  z-index: var(--tt-z-tooltip);
}

.rp-icon-btn:hover::after,
.rp-icon-btn:focus-visible::after {
  opacity: 1;
}

.rp-title {
  font-size: 15px;
  line-height: 22px;
  font-weight: var(--tt-weight-title);
  letter-spacing: -0.015em;
  color: var(--tt-text-primary);
}

.rp-copy {
  color: var(--tt-text-secondary);
  font-size: 13px;
  line-height: 20px;
}

@media (max-width: 1100px) {
  .rp-grid, .home-plays { grid-template-columns: 1fr 1fr; }
  .lib-head { flex-wrap: wrap; }
}

@media (max-width: 900px) {
  .hello, .run-grid, .call-stage { grid-template-columns: 1fr; }
  .library-voices { grid-template-columns: 1fr 1fr; }
  .avatar-strip { flex-direction: column; align-items: stretch; }
  .avatar-intro { flex-basis: auto; }
}

@media (max-width: 767px) {
  .home-plays .rp-card, .rp-grid .rp-card { width: 100%; }
  .rp-grid, .home-plays { grid-template-columns: 1fr; }
  .home-reels { grid-template-columns: 1fr; }
  body { overflow: auto; }
  .shell { display: block; height: auto; min-height: 100vh; }
  .rail { display: none; }
  .main { overflow: visible; height: auto; }
  .page, .page--find { padding: var(--tt-space-5) var(--tt-space-4) var(--tt-space-8); max-width: none; }
  .shell:not(.is-home) .main { padding-bottom: 0; }
  .shell.has-tabbar .main { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

  /* Header: no divider, it sits straight on the canvas. */
  .mobile-head {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 var(--tt-space-4);
    background: var(--tt-canvas);
  }
  .mobile-head-logo { display: inline-flex; align-items: center; gap: var(--tt-space-2); padding: 0; border: 0; background: transparent; color: var(--tt-text-primary); font: inherit; cursor: pointer; }
  .mobile-head-logo .wordmark { font-size: 16px; }
  .mobile-head-actions { display: flex; align-items: center; gap: var(--tt-space-1); }
  .mobile-head-btn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--tt-radius-pill); background: transparent; color: var(--tt-text-secondary); cursor: pointer; }
  .mobile-head-btn svg { width: 20px; height: 20px; }
  .mobile-head-btn:hover { background: var(--tt-fill-soft); color: var(--tt-text-primary); }
  .mobile-head-avatar .user-avatar { width: 32px; height: 32px; }

  /* Footer tab bar. */
  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    justify-content: space-around;
    padding: var(--tt-space-2) var(--tt-space-2) calc(var(--tt-space-2) + env(safe-area-inset-bottom));
    background: var(--tt-surface);
    box-shadow: 0 -4px 16px rgb(30 28 25 / 0.06);
  }
  .tabbar-item { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0; border: 0; border-radius: var(--tt-radius-md); background: transparent; color: var(--tt-text-secondary); font: inherit; font-size: 11px; line-height: 14px; font-weight: var(--tt-weight-label); cursor: pointer; }
  .tabbar-item svg { width: 22px; height: 22px; }
  .tabbar-item[aria-current="page"] { color: var(--tt-primary-ink); }
  .tabbar-item[aria-current="page"] svg { color: var(--tt-primary); }
  .is-home .page { padding-bottom: 96px; }
  .pills { left: var(--tt-space-3); right: var(--tt-space-3); bottom: var(--tt-space-3); flex-wrap: wrap; }
  .drawer { left: var(--tt-space-3); right: var(--tt-space-3); width: auto; }
  .drawer--conversations { top: var(--tt-space-3); bottom: var(--tt-space-3); max-height: none; }
}

/* Dark theme only: the default card border blends into the dark surface,
   so these two grids need a slightly stronger, still-soft border to stay legible. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .setup-card .grid-profiles .card,
  :root:not([data-theme="light"]) .source-card,
  :root:not([data-theme="light"]) .line-card,
  :root:not([data-theme="light"]) .build-row {
    border-color: var(--tt-border);
    background: #262424;
  }
}

:root[data-theme="dark"] .setup-card .grid-profiles .card,
:root[data-theme="dark"] .source-card,
:root[data-theme="dark"] .setup-card .card--add,
:root[data-theme="dark"] .setup-card .card--add:hover,
:root[data-theme="dark"] .line-card,
:root[data-theme="dark"] .build-row {
  border-color: var(--tt-border);
  background: #262424;
}

/* Full-screen twin practice-call room (Home → Interactive twin cards).
   Layout structurally follows the team's Paper reference (session exp /
   93G-0), rebuilt with TrainerTwin's own tokens — palette here is a
   placeholder dark room, to be reconciled with the design system later. */
.demo-room {
  --demo-bg: #14161A;
  --demo-surface: #1C1F26;
  --demo-border: rgba(255, 255, 255, 0.1);
  --demo-text: #F5F5F7;
  --demo-text-secondary: rgba(245, 245, 247, 0.65);
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--demo-bg);
  color: var(--demo-text);
  font-family: var(--tt-font-ui), sans-serif;
}

.demo-top {
  flex: none;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tt-space-4);
  padding: 0 var(--tt-space-6);
}

.demo-brand { flex: 0 0 240px; display: flex; align-items: center; gap: 8px; color: var(--demo-text); }
.demo-brand svg { color: var(--demo-text); }
.demo-top .wordmark { font-size: 16px; }

.demo-title { flex: 1; text-align: center; font-size: 15px; font-weight: var(--tt-weight-label); color: var(--demo-text); }

.demo-top-end { flex: 0 0 240px; display: flex; justify-content: flex-end; }

.demo-pill-btn {
  display: flex;
  align-items: center;
  gap: var(--tt-space-2);
  height: 36px;
  padding: 0 var(--tt-space-4);
  border-radius: var(--tt-radius-pill);
  border: 1px solid var(--demo-border);
  background: transparent;
  color: var(--demo-text-secondary);
  font-size: 13px;
  font-weight: var(--tt-weight-label);
  cursor: pointer;
}

.demo-pill-btn svg { width: 16px; height: 16px; flex: none; }
.demo-pill-btn:hover { color: var(--demo-text); border-color: rgba(255, 255, 255, 0.24); }

.demo-body {
  flex: 1;
  display: flex;
  gap: var(--tt-space-5);
  min-height: 0;
  padding: var(--tt-space-4) var(--tt-space-6) 0;
}

.demo-stage {
  position: relative;
  flex: 1;
  border-radius: 24px;
  background: var(--demo-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.demo-aurora {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
  opacity: 0.55;
}

.demo-avatar-wrap { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: var(--tt-space-3); }

.demo-avatar {
  width: 216px;
  height: 216px;
  border-radius: var(--tt-radius-pill);
  overflow: hidden;
  box-shadow: 0 0 80px rgba(52, 211, 153, 0.22);
}

.demo-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.demo-speaking {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 14px;
  color: var(--demo-text-secondary);
}

.demo-caption {
  margin: var(--tt-space-3) 0 0;
  max-width: 420px;
  text-align: center;
  font-size: 15px;
  line-height: 22px;
  color: var(--demo-text);
}

.demo-mode-btn {
  height: 36px;
  padding: 0 var(--tt-space-4);
  border-radius: var(--tt-radius-pill);
  border: 0;
  background: transparent;
  color: var(--demo-text-secondary);
  font-size: 13px;
  font-weight: var(--tt-weight-label);
  cursor: pointer;
}

.demo-mode-btn.is-active { background: rgba(255, 255, 255, 0.14); color: var(--demo-text); }

.demo-speaker-name {
  position: absolute;
  left: var(--tt-space-5);
  bottom: var(--tt-space-4);
  margin: 0;
  font-size: 13px;
  color: var(--demo-text);
}

.demo-self {
  position: absolute;
  right: var(--tt-space-4);
  bottom: var(--tt-space-4);
  width: 176px;
  height: 112px;
  border-radius: var(--tt-radius-xl, 16px);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-self-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--tt-radius-pill);
  background: rgba(255, 255, 255, 0.14);
  color: var(--demo-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: var(--tt-weight-label);
}

.demo-self-avatar--student { background: rgba(76, 141, 232, 0.3); color: #BFD9FF; }
.demo-self-avatar--olga { background: rgba(255, 90, 0, 0.24); color: var(--tt-primary); }

.demo-self-label {
  position: absolute;
  left: var(--tt-space-2);
  bottom: var(--tt-space-2);
  font-size: 12px;
  color: var(--demo-text);
}

.demo-self-mic {
  position: absolute;
  right: var(--tt-space-2);
  bottom: var(--tt-space-2);
  width: 22px;
  height: 22px;
  color: var(--demo-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-self-mic svg { width: 16px; height: 16px; }

.demo-share ~ .demo-pip-stack .demo-self:not(.demo-self--twin) {
  background: var(--demo-surface);
}

.demo-pip-stack {
  position: absolute;
  right: var(--tt-space-4);
  bottom: var(--tt-space-4);
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-2);
}

.demo-self--stacked {
  position: relative;
  width: 176px;
  height: 100px;
}

.demo-self--twin { overflow: hidden; }

.demo-self--twin .demo-self-label {
  background: rgba(0, 0, 0, 0.45);
  padding: 3px 8px;
  border-radius: var(--tt-radius-pill);
}

.demo-self-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.demo-share {
  --tt-canvas: #FEFEFF;
  --tt-surface: #FFFFFF;
  --tt-text-primary: #1C1B1B;
  --tt-text-secondary: #4A4A4A;
  --tt-text-tertiary: #656565;
  --tt-border: #E9E9E9;
  --tt-elevation-1: 0 1px 2px rgba(30, 28, 25, .06);
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-4);
  padding: var(--tt-space-5);
  background: var(--tt-canvas);
  color: var(--tt-text-primary);
}

.demo-share-toolbar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tt-space-3);
}

.demo-share-icon,
.demo-share-tools button {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: var(--tt-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: var(--tt-text-secondary);
}

.demo-share-icon svg,
.demo-share-tools svg,
.demo-share-lib svg { width: 16px; height: 16px; }

.demo-share-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: var(--tt-space-1);
  border-radius: var(--tt-radius-pill);
  border: 1px solid var(--tt-border);
  background: var(--tt-surface);
}

.demo-share-lib {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 var(--tt-space-3);
  border-radius: var(--tt-radius-pill);
  border: 1px solid var(--tt-border);
  background: var(--tt-surface);
  color: var(--tt-text-primary);
  font-size: 13px;
}

.demo-share-prompt { flex: none; margin: 0; font-size: 14px; color: var(--tt-text-secondary); }

.demo-share-canvas {
  flex: 1;
  min-height: 0;
  border-radius: var(--tt-radius-lg);
  background: var(--tt-surface);
  border: var(--tt-border-thin) solid var(--tt-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-flow {
  display: flex;
  align-items: center;
  gap: var(--tt-space-3);
  flex-wrap: wrap;
  justify-content: center;
  padding: var(--tt-space-4);
}

.demo-flow-node {
  padding: var(--tt-space-3) var(--tt-space-4);
  border-radius: var(--tt-radius-md);
  border: 1px solid var(--tt-border);
  background: var(--tt-surface);
  color: var(--tt-text-primary);
  box-shadow: var(--tt-elevation-1);
  font-size: 13px;
  font-weight: var(--tt-weight-label);
  white-space: nowrap;
}

.demo-flow-arrow { color: var(--tt-text-tertiary); font-size: 18px; }

.demo-issue-layer { z-index: 6; }

.demo-prompt-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: var(--tt-space-6);
  background: rgb(0 0 0 / 0.45);
}

.demo-prompt {
  width: min(440px, 100%);
  padding: var(--tt-space-6);
  border-radius: 24px;
  background: var(--demo-surface);
  text-align: left;
  box-shadow: var(--tt-elevation-3);
}

.demo-prompt h2 {
  margin: 0;
  font-size: 22px;
  line-height: 28px;
  font-weight: var(--tt-weight-title);
  letter-spacing: -0.015em;
}

.demo-prompt p {
  margin: var(--tt-space-3) 0 0;
  color: var(--demo-text-secondary);
  font-size: 15px;
  line-height: 22px;
}

.demo-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tt-space-3);
  margin-top: var(--tt-space-5);
  justify-content: flex-start;
}

.demo-chat {
  flex: 0 0 400px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: 24px;
  background: var(--demo-surface);
  overflow: hidden;
}

.demo-chat.is-hidden { display: none; }

.demo-chat-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 var(--tt-space-4);
  border-bottom: 1px solid var(--demo-border);
}

.demo-chat-title { margin: 0; font-size: 16px; font-weight: var(--tt-weight-label); color: var(--demo-text); }

.demo-chat-close {
  width: 32px;
  height: 32px;
  border-radius: var(--tt-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: var(--demo-text-secondary);
  cursor: pointer;
}

.demo-chat-close svg { width: 16px; height: 16px; }
.demo-chat-close:hover { color: var(--demo-text); background: rgba(255, 255, 255, 0.08); }

.demo-chat-body {
  flex: 1;
  overflow: auto;
  padding: var(--tt-space-4);
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-4);
}

.demo-who {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 16px;
  color: var(--demo-text-secondary);
}

.demo-line.is-lead { display: flex; flex-direction: column; align-items: flex-end; }
.demo-line.is-twin { display: flex; flex-direction: column; align-items: flex-start; }

.demo-bubble {
  margin: 0;
  max-width: 100%;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--demo-text);
  font-size: 15px;
  line-height: 22px;
}

.demo-line.is-lead .demo-bubble { max-width: 88%; }

.demo-votes {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 4px;
}

.demo-vote {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  cursor: pointer;
}

.demo-vote svg { width: 16px; height: 16px; }

.demo-vote:hover { color: #fff; }

.demo-vote.is-on { color: #fff; }

.demo-source {
  margin: 6px 0 0;
  color: var(--demo-text-secondary);
  font-size: 12px;
  line-height: 16px;
}

.demo-chat-input-row {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--tt-space-2);
  padding: var(--tt-space-4);
  border-top: 1px solid var(--demo-border);
}

.demo-chat-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border-radius: var(--tt-radius-pill);
  border: 1px solid var(--demo-border);
  background: var(--demo-bg);
  color: var(--demo-text);
  padding: 0 var(--tt-space-4);
  font-size: 14px;
  font-family: inherit;
}

.demo-chat-input::placeholder { color: var(--demo-text-secondary); }
.demo-chat-input:focus { outline: none; border-color: var(--tt-primary); }

.demo-send {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: var(--tt-radius-pill);
  background: #FFFFFF;
  color: var(--demo-bg);
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.demo-send svg { width: 16px; height: 16px; }
.demo-send:hover { opacity: 0.9; }

.demo-controls {
  flex: none;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--tt-space-4) var(--tt-space-8);
}

.demo-timer {
  flex: 0 0 auto;
  min-width: 100px;
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  font-weight: var(--tt-weight-label);
  color: var(--demo-text);
}

.demo-cluster {
  display: flex;
  align-items: center;
  gap: var(--tt-space-2);
  padding: var(--tt-space-2);
  border-radius: var(--tt-radius-pill);
  background: var(--demo-surface);
}

.demo-ctrl {
  width: 40px;
  height: 40px;
  border-radius: var(--tt-radius-pill);
  border: 0;
  background: transparent;
  color: var(--demo-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.demo-ctrl svg { width: 18px; height: 18px; }
.demo-ctrl.is-off { background: var(--tt-danger); color: #FFFFFF; }
.demo-ctrl.is-active { background: rgba(255, 255, 255, 0.16); }
.demo-ctrl:not(.is-off):not(.is-active):hover { background: rgba(255, 255, 255, 0.1); }

.demo-end {
  flex: 0 0 auto;
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--tt-space-2);
  height: 40px;
  padding: 0 var(--tt-space-5);
  border-radius: var(--tt-radius-pill);
  border: 0;
  background: var(--tt-danger);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: var(--tt-weight-label);
  cursor: pointer;
}

.demo-end svg { width: 16px; height: 16px; }
.demo-end:hover { opacity: 0.9; }

/* Talk to my twin — a page inside the product shell (light). The demo-*
   chat / issue-popup classes are reused, so their colour vars are set here. */
.talk-page {
  --demo-bg: var(--tt-surface);
  --demo-surface: var(--tt-fill-soft);
  --demo-border: var(--tt-border);
  --demo-text: var(--tt-text-primary);
  --demo-text-secondary: var(--tt-text-secondary);
  display: flex;
  flex-direction: column;
  max-width: none;
  position: relative;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  padding: 0 0 var(--tt-space-6);
}

.talk-body { flex: 1; display: flex; gap: var(--tt-space-5); min-height: 0; padding: 0 var(--tt-space-8); }

.talk-stage {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: var(--tt-space-6) 0 0;
}

.talk-col { width: 480px; max-width: 100%; min-height: 0; display: flex; flex-direction: column; align-items: center; }

.talk-card {
  flex: none;
  position: relative;
  width: 320px;
  height: 320px;
  border-radius: 32px;
  overflow: hidden;
  background: var(--tt-fill-soft);
  box-shadow: var(--tt-elevation-2);
  will-change: transform;
}

/* Soft brand glow rising from the bottom edge while the twin speaks. */
.talk-glow {
  position: absolute;
  inset: auto -24px -28px -24px;
  height: 66%;
  pointer-events: none;
  background:
    radial-gradient(65% 100% at 18% 105%, var(--tt-orange-500) 0%, transparent 80%),
    radial-gradient(65% 95% at 82% 108%, var(--tt-orange-500) 0%, transparent 80%),
    radial-gradient(50% 70% at 50% 112%, var(--tt-orange-300) 0%, transparent 82%);
  filter: blur(8px);
  opacity: 1;
  transform-origin: 50% 100%;
  animation: talk-glow-in 400ms ease-out, talk-glow-drift 3.2s ease-in-out 400ms infinite alternate;
}

@keyframes talk-glow-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes talk-glow-drift { from { opacity: 0.75; transform: scaleX(1) scaleY(0.92); } to { opacity: 1; transform: scaleX(1.08) scaleY(1.06); } }

@media (prefers-reduced-motion: reduce) { .talk-glow { animation: none; } }
.talk-card img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; display: block; }
.talk-card video { width: 100%; height: 100%; object-fit: cover; display: block; }

.talk-name {
  position: absolute;
  left: var(--tt-space-3);
  bottom: var(--tt-space-3);
  display: flex;
  align-items: center;
  gap: var(--tt-space-2);
  padding: 4px 10px;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-surface);
  color: var(--tt-text-primary);
  font-size: 13px;
  line-height: 18px;
  font-weight: var(--tt-weight-label);
  box-shadow: 0 0 0 1px var(--tt-border);
}

.talk-clock {
  position: absolute;
  right: var(--tt-space-3);
  bottom: var(--tt-space-3);
  padding: 4px 10px;
  border-radius: var(--tt-radius-pill);
  background: rgb(0 0 0 / 0.28);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #FFFFFF;
  font-size: 13px;
  line-height: 18px;
  font-weight: var(--tt-weight-label);
  font-variant-numeric: tabular-nums;
}

.talk-status { display: flex; align-items: center; gap: var(--tt-space-2); margin: 0; font-size: 13px; line-height: 18px; font-weight: var(--tt-weight-label); color: var(--tt-text-secondary); }
.talk-status.is-idle { visibility: hidden; }
.talk-status.is-fading { animation: talk-status-out 1.6s ease-in-out forwards; }
@keyframes talk-status-out { from { opacity: 1; } to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .talk-status.is-fading { animation-duration: 1ms; } }
.talk-live-dot { width: 8px; height: 8px; border-radius: var(--tt-radius-pill); background: var(--tt-live); box-shadow: 0 0 0 0 var(--tt-live); animation: talk-live-glow 1.6s ease-out infinite; }
@keyframes talk-live-glow { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tt-live) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
@media (prefers-reduced-motion: reduce) { .talk-live-dot { animation: none; box-shadow: 0 0 6px var(--tt-live); } }

/* Thread: the latest two messages, right under the twin card. */
.talk-thread {
  flex: 1;
  min-height: 0;
  width: 100%;
  margin-top: var(--tt-space-8);
  padding-bottom: var(--tt-space-14, 56px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--tt-space-4);
}

.talk-msg { flex: none; display: flex; flex-direction: column; gap: var(--tt-space-2); max-width: 100%; }
.talk-msg.is-twin { align-items: flex-start; }
.talk-msg.is-olga { align-items: flex-end; }

.talk-bubble {
  max-width: 88%;
  min-height: 40px;
  box-sizing: border-box;
  padding: 10px var(--tt-space-4);
  border-radius: 20px;
  background: var(--tt-fill-soft);
  color: var(--tt-text-primary);
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
}

.talk-bubble--olga {
  padding: 10px var(--tt-space-5);
  border-radius: 20px;
  background: var(--tt-surface);
  box-shadow: inset 0 0 0 1px var(--tt-border);
}

.talk-feedback { position: relative; display: flex; align-items: center; gap: var(--tt-space-2); }
.talk-feedback { min-height: 32px; }
.talk-feedback .btn svg { width: 16px; height: 16px; flex: none; }
.talk-feedback .btn { height: 32px; min-height: 32px; padding: 0 18px; }

.talk-mark { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--tt-text-secondary); }
.talk-mark svg { width: 16px; height: 16px; }

.talk-confetti-layer {
  position: fixed;
  z-index: 40;
  width: 300px;
  height: 320px;
  pointer-events: none;
}

.talk-confetti { width: 100%; height: 100%; display: block; }

.talk-controls {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--tt-space-3);
  padding-top: var(--tt-space-4);
}

.talk-history {
  position: absolute;
  right: var(--tt-space-6);
  bottom: var(--tt-space-6);
  height: min(450px, calc(100% - 96px));
  z-index: 10;
  width: 360px;
  max-width: calc(100% - 48px);
  display: flex;
  flex-direction: column;
  border-radius: var(--tt-radius-lg);
  background: var(--tt-surface);
  /* --tt-elevation-3 at 75% opacity */
  box-shadow: 0 0 0 1px var(--tt-border), 0 4px 8px rgb(30 28 25 / 0.0675), 0 16px 40px rgb(30 28 25 / 0.12);
  overflow: hidden;
}

.talk-history .demo-chat-title { font-weight: 600; }
.talk-history .demo-chat-head { height: 44px; background: var(--tt-surface-sunken); }
.talk-history .demo-chat-body { scrollbar-width: none; -ms-overflow-style: none; }
.talk-history .demo-chat-body::-webkit-scrollbar { display: none; }

.talk-history.is-hidden { display: none; }
.talk-history .demo-line.is-lead .demo-bubble { background: var(--tt-surface); box-shadow: inset 0 0 0 1px var(--tt-border); border-radius: 20px; padding: 10px var(--tt-space-5); }
.talk-pick { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 12px; line-height: 16px; color: var(--tt-text-secondary); }
.talk-pick svg { width: 14px; height: 14px; }
.talk-page .demo-chat-close:hover { background: var(--tt-fill-soft); }
.talk-page .demo-bubble { background: var(--tt-fill-soft); }
.talk-page .demo-ctrl.is-active { background: var(--tt-border); }
.talk-page .demo-ctrl:not(.is-off):not(.is-active):hover { background: var(--tt-border); }
.talk-page .demo-prompt-layer { position: fixed; background: rgb(0 0 0 / 0.35); z-index: 20; }
.talk-page .demo-feedback-card { background: var(--tt-surface); box-shadow: var(--tt-elevation-3); }
.talk-page .demo-feedback-card .input { background: var(--tt-surface); }


.demo-room--feedback {
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-feedback-card {
  width: min(520px, calc(100% - 48px));
  padding: var(--tt-space-6);
  border-radius: 24px;
  background: var(--demo-surface);
  color: var(--demo-text);
  text-align: left;
}

.demo-feedback-card .card-title { color: var(--demo-text); }
.demo-feedback-card .card-sub { color: var(--demo-text-secondary); margin-top: var(--tt-space-2); }

.demo-feedback-options,
.demo-feedback-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tt-space-2);
  margin-top: var(--tt-space-4);
}

.demo-feedback-ask {
  margin: var(--tt-space-5) 0 0;
  color: var(--demo-text);
  font-size: 15px;
  line-height: 22px;
  font-weight: var(--tt-weight-title);
}

.demo-feedback-hint {
  margin: var(--tt-space-1) 0 0;
  color: var(--demo-text-secondary);
  font-size: 14px;
  line-height: 20px;
}

.demo-feedback-card .input {
  background: transparent;
  color: var(--demo-text);
  border-color: var(--demo-border);
}

.demo-feedback-card .input::placeholder { color: var(--demo-text-secondary); }

.demo-feedback-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--tt-space-3);
  margin-top: var(--tt-space-5);
}

/* The room is always dark, regardless of the page's light/dark theme toggle —
   buttons inside it must not follow the page's theme tokens or they can end
   up nearly invisible against the forced-dark background. */
.demo-room .btn--strong {
  background: #FFFFFF;
  color: var(--demo-bg);
}

.demo-room .btn--strong:hover { background: #E5E5E5; }

.demo-room .btn--secondary {
  background: rgba(255, 255, 255, 0.12);
  color: var(--demo-text);
}

.demo-room .btn--secondary:hover { background: rgba(255, 255, 255, 0.18); }

.demo-room .btn--ghost {
  color: var(--demo-text-secondary);
}

.demo-room .btn--ghost:hover {
  color: var(--demo-text);
  background: rgba(255, 255, 255, 0.08);
}

.main:has(.page--flow) {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.page--flow {
  max-width: none;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.flow-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  gap: var(--tt-space-4);
}

.flow-toolbar {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.flow-toolbar > * { pointer-events: auto; }

.flow-toolbar .btn {
  height: 35px;
  min-height: 35px;
}

.flow-palette {
  width: 232px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-2);
  padding: var(--tt-space-4);
  background: var(--tt-surface);
  border: 1px solid var(--tt-card-border);
  border-radius: var(--tt-radius-lg);
  box-shadow: var(--tt-elevation-1);
}

.flow-stage-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--tt-radius-md);
  background: transparent;
  color: var(--tt-text-primary);
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.flow-stage-btn:hover,
.flow-stage-btn.is-on { background: var(--tt-fill-soft); }

.flow-stage-name {
  font-size: 14px;
  line-height: 20px;
  font-weight: var(--tt-weight-title);
}

.flow-stage-note {
  font-size: 13px;
  line-height: 18px;
  color: var(--tt-text-secondary);
}

.flow-canvas {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  overflow: auto;
  border: 0;
  background-color: var(--tt-surface);
  background-image: radial-gradient(circle, var(--tt-border) 1.15px, transparent 1.15px);
  background-size: 18px 18px;
}

.flow-board {
  position: relative;
  flex: none;
  margin: auto;
  transform-origin: center center;
}

.flow-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.flow-links path {
  fill: none;
  stroke: var(--tt-text-tertiary);
  stroke-width: 1.5;
}

.flow-links circle {
  fill: var(--tt-surface);
  stroke: var(--tt-text-tertiary);
  stroke-width: 1.5;
}

.flow-tag {
  position: absolute;
  padding: 4px 10px;
  border-radius: var(--tt-radius-pill);
  font-size: 12px;
  line-height: 16px;
  font-weight: var(--tt-weight-label);
  white-space: nowrap;
  z-index: 2;
}

.flow-tag--info { background: var(--tt-info-subtle); color: var(--tt-info); }

.flow-tag--caution { background: var(--tt-caution-subtle); color: var(--tt-caution); }

.flow-tag--success { background: var(--tt-success-subtle); color: var(--tt-success); }

.flow-node {
  position: absolute;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--tt-card-border);
  border-radius: var(--tt-radius-lg);
  background: var(--tt-surface);
  box-shadow: 0 2px 4px rgb(30 28 25 / 0.0525), 0 8px 20px rgb(30 28 25 / 0.0825);
  color: var(--tt-text-primary);
  text-align: left;
  z-index: 1;
  box-sizing: border-box;
}

.flow-node.is-on {
  border-color: var(--tt-border-interactive);
  box-shadow: var(--tt-elevation-2);
}

.flow-node--start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-cta-strong);
  color: var(--tt-on-cta-strong);
  font-size: 14px;
  line-height: 20px;
  font-weight: var(--tt-weight-cta);
  cursor: pointer;
}

.flow-node--start svg { width: 14px; height: 14px; }

.flow-hit {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.flow-hit--center {
  align-items: center;
  text-align: center;
}

.flow-wave {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--tt-space-2);
}

.flow-wave-play {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-fill-soft);
  color: var(--tt-text-secondary);
}

.flow-wave-play svg { width: 12px; height: 12px; }

.flow-wave-bars {
  display: flex;
  align-items: center;
  gap: 3px;
}

.flow-wave-bars i {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: var(--tt-text-tertiary);
}

.flow-wave-bars i:nth-child(1) { height: 8px; }
.flow-wave-bars i:nth-child(2) { height: 14px; }
.flow-wave-bars i:nth-child(3) { height: 6px; }
.flow-wave-bars i:nth-child(4) { height: 18px; }
.flow-wave-bars i:nth-child(5) { height: 10px; }
.flow-wave-bars i:nth-child(6) { height: 16px; }
.flow-wave-bars i:nth-child(7) { height: 7px; }
.flow-wave-bars i:nth-child(8) { height: 12px; }

.flow-kicker {
  font-size: 11px;
  line-height: 12px;
  font-weight: var(--tt-weight-label);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--tt-text-tertiary);
}

.flow-node-title {
  font-size: 15px;
  line-height: 22px;
  font-weight: var(--tt-weight-title);
}

.flow-node-note {
  font-size: 13px;
  line-height: 18px;
  color: var(--tt-text-secondary);
}

.flow-topic-chip {
  padding: 5px 10px;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-surface);
  border: 1px solid var(--tt-border);
  color: var(--tt-text-secondary);
  font-size: 12px;
  line-height: 16px;
}

.flow-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}

.flow-lines > span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  line-height: 18px;
  color: var(--tt-text-secondary);
}

.flow-lines--stack > span { display: block; }

.flow-line-platform {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.line-ico {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 3px;
  color: var(--tt-text-tertiary);
}

.flow-line-ico {
  width: 18px;
  height: 18px;
  border-radius: var(--tt-radius-pill);
  object-fit: cover;
  flex: none;
  background: var(--tt-fill-soft);
}

.flow-sources {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
}

.flow-source {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 8px 8px 10px;
  border-radius: var(--tt-radius-md);
  background: var(--tt-fill-soft);
  color: var(--tt-text-primary);
  font-size: 13px;
  line-height: 18px;
}

.flow-source .source-ico,
.flow-source .source-ico svg {
  width: 16px;
  height: 16px;
}

.flow-connected {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px 2px 5px;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-success-subtle);
  color: var(--tt-success);
  font-size: 11px;
  line-height: 16px;
  font-weight: var(--tt-weight-label);
  white-space: nowrap;
}

.flow-connected svg {
  width: 12px;
  height: 12px;
  flex: none;
}

.flow-portrait {
  width: 100%;
  height: 96px;
  border-radius: var(--tt-radius-md);
  overflow: hidden;
  background: var(--tt-fill-soft);
}

.flow-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}

.flow-portrait--round {
  width: 72px;
  height: 72px;
  border-radius: var(--tt-radius-pill);
}

.flow-portrait--md {
  width: 56px;
  height: 56px;
  border-radius: var(--tt-radius-pill);
}

.flow-zoom {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-surface);
  border: 1px solid var(--tt-card-border);
  box-shadow: var(--tt-elevation-1);
}

.flow-zoom span {
  min-width: 40px;
  text-align: center;
  font-size: 13px;
  line-height: 18px;
  color: var(--tt-text-secondary);
}

.flow-thumb {
  width: 100%;
  height: 112px;
  border-radius: var(--tt-radius-md);
  overflow: hidden;
  background: var(--tt-fill-soft);
}

.flow-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}

.flow-url {
  font-size: 13px;
  line-height: 18px;
  color: var(--tt-text-secondary);
  word-break: break-all;
}

.flow-node--actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.flow-node--actions .flow-hit { height: auto; flex: 1; min-height: 0; }

.flow-presence {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.flow-presence .flow-portrait--round { flex: none; }

.studio-layer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: var(--tt-space-6);
  background: rgb(11 10 9 / 0.55);
}

.studio-card {
  width: min(520px, 100%);
  max-height: min(720px, calc(100vh - 48px));
  overflow: auto;
  padding: var(--tt-space-6);
  border-radius: 24px;
  background: var(--tt-surface);
  color: var(--tt-text-primary);
  box-shadow: var(--tt-elevation-3);
}

.studio-card--wide { width: min(760px, 100%); }

.studio-card .card-sub { margin-top: var(--tt-space-2); }

.studio-lines {
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-3);
  margin-top: var(--tt-space-4);
}

.studio-line {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  line-height: 18px;
  color: var(--tt-text-secondary);
}

.studio-label {
  margin: var(--tt-space-4) 0 var(--tt-space-2);
  font-size: 13px;
  line-height: 18px;
  font-weight: var(--tt-weight-label);
  color: var(--tt-text-secondary);
}

.studio-looks {
  display: flex;
  gap: var(--tt-space-3);
  overflow-x: auto;
  padding-bottom: 4px;
}

.studio-voices {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tt-space-2);
}

.studio-voice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 160px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--tt-radius-md);
  background: var(--tt-fill-soft);
  color: var(--tt-text-primary);
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.studio-voice b { font-weight: var(--tt-weight-title); font-size: 14px; line-height: 20px; }
.studio-voice span { font-size: 13px; line-height: 18px; color: var(--tt-text-secondary); }
.studio-voice.is-on { box-shadow: inset 0 0 0 1.5px var(--tt-text-primary); }

.studio-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--tt-space-3);
  margin-top: var(--tt-space-5);
}

.flow-node.is-editing {
  align-items: stretch;
  overflow-y: auto;
  box-shadow: var(--tt-elevation-3);
}

.flow-node.is-editing .studio-lines,
.flow-node.is-editing .studio-foot { margin-top: 0; }

.flow-node.is-editing .studio-looks--compact .look-tile {
  flex: 0 0 72px;
  width: 72px;
  height: 88px;
}

.flow-node.is-editing .studio-voices--compact .studio-voice { min-width: 0; flex: 1 1 140px; }

.flow-edit-rows {
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-2);
  width: 100%;
}

.flow-edit-row {
  display: flex;
  align-items: center;
  gap: var(--tt-space-3);
  padding: var(--tt-space-2);
  border: 1px solid var(--tt-card-border);
  border-radius: var(--tt-radius-md);
  background: var(--tt-surface);
  color: inherit;
  font: inherit;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.flow-edit-row--add {
  color: var(--tt-primary-ink);
  border-style: dashed;
}

.flow-edit-row-add-ico {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-fill-soft);
  color: var(--tt-primary-ink);
}

.flow-edit-row-add-ico svg { width: 14px; height: 14px; }

.flow-edit-row-copy {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 18px;
}

.flow-edit-row-copy b { font-size: 14px; font-weight: var(--tt-weight-title); }
.flow-edit-row-copy span { color: var(--tt-text-secondary); }

.profile-avatar--sm { width: 28px; height: 28px; }

.main:has(.page--create) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.page--create {
  flex: 1;
  min-height: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.create-bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tt-space-3);
  min-height: 64px;
  padding: 0 var(--tt-space-8);
  background: var(--tt-canvas);
}

.create-bar-back {
  display: inline-flex;
  align-items: center;
  gap: var(--tt-space-2);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--tt-text-primary);
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  font-weight: var(--tt-weight-regular);
  cursor: pointer;
}

.create-bar-back svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.create-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 44px var(--tt-space-8) var(--tt-space-8);
}

.create-column {
  max-width: 720px;
  margin-inline: auto;
}

.create-column > .card { border-radius: 24px; }

.page--create .seg {
  display: flex;
  width: fit-content;
  margin: 0 auto var(--tt-space-5);
}

.role-card-title {
  max-width: none;
  margin: 0;
}

/* 50% of elevation-2: the same soft shadow the Home ask card and Analytics cards use. */
.page--create .card { box-shadow: 0 2px 4px rgb(30 28 25 / 0.035), 0 8px 20px rgb(30 28 25 / 0.055); }

.create-foot {
  flex: none;
  border-top: 1px solid var(--tt-border);
  background: var(--tt-surface);
  padding: var(--tt-space-3) var(--tt-space-8);
}

.role-card { padding-top: var(--tt-space-5); display: flex; flex-direction: column; gap: var(--tt-space-3); }

.tee-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  grid-template-areas: "copy mascot" "box box";
  gap: var(--tt-space-3);
  align-items: center;
  padding: var(--tt-space-4);
  border: 1px solid var(--tt-border);
  border-radius: var(--tt-radius-lg);
  background: var(--tt-fill-soft);
  overflow: hidden;
}

.tee-waves {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.tee-copy { position: relative; z-index: 1; grid-area: copy; }

.tee-title {
  margin: 0;
  font-size: 15px;
  line-height: 22px;
  font-weight: var(--tt-weight-title);
}

.tee-lead {
  margin: 2px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--tt-text-secondary);
}

.tee-suggestions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--tt-space-2);
  margin-top: var(--tt-space-3);
}

.tee-suggest {
  display: inline-flex;
  align-items: center;
  gap: var(--tt-space-2);
  max-width: 100%;
  padding: 6px 12px;
  border: 0;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-surface);
  color: var(--tt-text-primary);
  box-shadow: 0 0 0 1px var(--tt-border);
  font-family: inherit;
  font-size: 13px;
  line-height: 18px;
  text-align: left;
  cursor: pointer;
}

.tee-suggest[aria-pressed="true"] {
  box-shadow: inset 0 0 0 1px var(--tt-border-field);
}

.tee-card .line-ico {
  width: 14px;
  height: 14px;
  margin: 0;
  color: var(--tt-text-secondary);
}

.tee-ask-box {
  position: relative;
  z-index: 1;
  grid-area: box;
  margin-top: var(--tt-space-3);
}

.tee-mascot {
  position: relative;
  z-index: 1;
  grid-area: mascot;
  width: 92px;
  height: 92px;
  margin-top: -14px;
  object-fit: contain;
  justify-self: center;
}

.role-label {
  margin: var(--tt-space-4) 0 0;
  font-size: 15px;
  line-height: 22px;
  font-weight: var(--tt-weight-title);
}

.role-card > .role-label:first-child { margin-top: 0; }

.role-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tt-space-3);
  margin-top: var(--tt-space-4);
}

.role-card > .role-label-row:first-child { margin-top: 0; }

.role-label-row .role-label { margin: 0; }

.role-label-row .role-examples-toggle { flex: none; }

#role-scenario {
  height: 90px;
  max-height: 150px;
  resize: none;
  overflow-y: auto;
}

.role-examples-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--tt-space-2);
  align-self: flex-start;
  border: 0;
  background: transparent;
  color: var(--tt-text-secondary);
  font-family: inherit;
  font-size: 13px;
  line-height: 18px;
  font-weight: var(--tt-weight-label);
  cursor: pointer;
  padding: 0;
}

.role-examples-toggle .line-ico { margin: 0; color: var(--tt-text-secondary); }

.role-field { margin-top: var(--tt-space-2); }

.role-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tt-space-3);
}

.role-traits {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tt-space-2);
}

.role-trait {
  padding: var(--tt-pad-pill-lg);
  border: 0;
  border-radius: var(--tt-radius-pill);
  background: var(--tt-fill-soft);
  color: var(--tt-text-secondary);
  font: inherit;
  font-size: 13px;
  line-height: 20px;
  font-weight: var(--tt-weight-label);
  cursor: pointer;
}

.role-trait:hover { background: var(--tt-fill-soft-hover); color: var(--tt-text-primary); }

.role-trait[aria-pressed="true"] {
  background: var(--tt-surface);
  color: var(--tt-text-primary);
  box-shadow: inset 0 0 0 1px var(--tt-border-field);
}
.role-field.is-first { margin-top: 0; }

.role-appearance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tt-space-3);
  padding: var(--tt-space-2);
  border: 1px solid var(--tt-border);
  border-radius: var(--tt-radius-md);
}

.role-who {
  display: flex;
  align-items: center;
  gap: var(--tt-space-3);
  min-width: 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: var(--tt-weight-label);
}

.role-appearance-actions {
  display: flex;
  align-items: center;
  gap: var(--tt-space-2);
  flex: none;
}

.role-who img {
  width: 36px;
  height: 36px;
  border-radius: var(--tt-radius-pill);
  object-fit: cover;
  object-position: center 18%;
}

.role-tips {
  margin-top: var(--tt-space-2);
  padding: var(--tt-space-3);
  border-radius: var(--tt-radius-md);
  background: var(--tt-fill-soft);
  font-size: 13px;
  line-height: 18px;
  color: var(--tt-text-secondary);
}

.role-tips summary { cursor: pointer; font-weight: var(--tt-weight-label); color: var(--tt-text-primary); }

.role-tips ol { margin: var(--tt-space-2) 0 0; padding-left: 1.2em; }

.role-goals { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--tt-space-2); }

.role-goals li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tt-space-3);
  font-size: 14px;
  line-height: 20px;
}

.role-goal-add { display: flex; flex-direction: column; align-items: flex-start; gap: var(--tt-space-3); }

.create-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 720px;
  margin-inline: auto;
}

.create-actions-end {
  display: flex;
  align-items: center;
  gap: var(--tt-space-2);
}

.create-actions .btn .line-ico {
  width: var(--tt-icon-sm);
  height: var(--tt-icon-sm);
  margin-top: 0;
  color: currentColor;
}

.role-avatar-dialog { width: min(320px, calc(100vw - 32px)); }

.role-avatar-card { width: 100%; padding: var(--tt-space-4); }

.role-avatar-head { display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-3); }

.role-avatar-head h2 { margin: 0; font-size: var(--tt-size-title); line-height: var(--tt-leading-title); font-weight: var(--tt-weight-title); }

.role-looks { display: grid; grid-template-columns: 1fr 1fr; gap: var(--tt-space-2); margin-top: var(--tt-space-3); }

.role-look {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--tt-space-2);
  padding: var(--tt-space-2);
  border: 1px solid var(--tt-border);
  border-radius: var(--tt-radius-md);
  background: var(--tt-surface);
  color: var(--tt-text-primary);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.role-look.is-selected { background: var(--tt-fill-soft); border-color: var(--tt-text-primary); }

.role-look img {
  width: 100%;
  height: 60px;
  object-fit: cover;
  object-position: center 18%;
  border-radius: var(--tt-radius-sm);
  background: var(--tt-fill-soft);
}

.role-look-name {
  display: flex;
  align-items: center;
  gap: var(--tt-space-2);
  font-size: 14px;
  line-height: 20px;
  font-weight: var(--tt-weight-label);
}

.role-dot {
  width: 16px;
  height: 16px;
  border-radius: var(--tt-radius-pill);
  border: 1.5px solid var(--tt-text-tertiary);
  box-sizing: border-box;
}

.role-look.is-selected .role-dot {
  border-color: var(--tt-cta-strong);
  background: radial-gradient(circle, var(--tt-cta-strong) 0 4px, transparent 5px);
}

.role-avatar-foot {
  display: flex;
  justify-content: flex-end;
  gap: var(--tt-space-2);
  margin-top: var(--tt-space-4);
}

@media (max-width: 960px) {
  .create-actions { gap: var(--tt-space-3); }
}

.twin-hero {
  display: flex;
  flex-direction: column;
  gap: var(--tt-space-4);
  margin-top: var(--tt-space-6);
  padding: var(--tt-space-4);
  border-radius: var(--tt-radius-lg);
  background: linear-gradient(to bottom, rgb(240 240 240 / 0.75) 0%, rgb(240 240 240 / 0) 100%);
}

.twin-hero-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--tt-space-3);
  margin-top: var(--tt-space-3);
  text-align: center;
}

.twin-hero-avatar {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: var(--tt-radius-pill);
  object-fit: cover;
  object-position: center 18%;
  display: block;
}

.twin-hero-copy h2 {
  margin: 0;
  font-size: var(--tt-size-title);
  line-height: var(--tt-leading-title);
  font-weight: var(--tt-weight-title);
}

.twin-hero-copy p {
  max-width: 560px;
  margin: var(--tt-space-2) auto 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--tt-text-tertiary);
  text-wrap: balance;
}

.twin-hero-prompt { font-weight: var(--tt-weight-semibold); }

.twin-hero-name {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--tt-space-1);
}

.twin-hero-info-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: var(--tt-radius-pill);
  background: transparent;
  color: var(--tt-text-tertiary);
  cursor: pointer;
}

.twin-hero-info-btn svg {
  width: 16px;
  height: 16px;
  transition: transform var(--tt-duration-quick) var(--tt-ease-standard);
}

.twin-hero-info-btn:hover { background: var(--tt-fill-soft); color: var(--tt-text-primary); }

.twin-hero-info-btn[aria-expanded="true"] svg { transform: rotate(180deg); }

.twin-hero-info {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: var(--tt-z-tooltip);
  width: max-content;
  max-width: min(420px, 90vw);
  padding: 10px 12px;
  transform: translateX(-50%);
  background: var(--tt-surface);
  color: var(--tt-text-primary);
  border: var(--tt-border-thin) solid var(--tt-card-border);
  border-radius: var(--tt-radius-sm);
  box-shadow: var(--tt-elevation-2);
  font-size: 13px;
  line-height: 20px;
  font-weight: var(--tt-weight-body);
  text-align: left;
}

.twin-ask-field { position: relative; }

.twin-ask-field .home-ask-input::placeholder { color: transparent; }

.twin-ask-ghost {
  position: absolute;
  inset: 0 8px 0 0;
  overflow: hidden;
  color: var(--tt-text-tertiary);
  font-size: 15px;
  line-height: 23px;
  opacity: 0.6;
  white-space: nowrap;
  text-overflow: ellipsis;
  pointer-events: none;
}

.twin-ask-topic { font-weight: var(--tt-weight-semibold); }

.twin-hero-ask {
  width: min(640px, 100%);
  min-height: 120px;
  align-self: center;
}

.twin-hero-ask-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tt-space-2);
  margin-top: auto;
}

.twin-hero-ask-type {
  position: relative;
}

.home-ask-mode svg { width: 12px; height: 12px; flex: none; }

.twin-hero-ask-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: var(--tt-z-tooltip);
  width: max-content;
  min-width: 140px;
  padding: var(--tt-space-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--tt-surface);
  border: var(--tt-border-thin) solid var(--tt-card-border);
  border-radius: var(--tt-radius-md);
  box-shadow: var(--tt-elevation-2);
}

.twin-hero-ask-opt {
  display: flex;
  align-items: center;
  gap: var(--tt-space-2);
  padding: var(--tt-space-2) var(--tt-space-2);
  border: 0;
  border-radius: var(--tt-radius-sm);
  background: transparent;
  color: var(--tt-text-primary);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.twin-hero-ask-opt:hover { background: var(--tt-fill-soft); }

.twin-hero-ask-opt.is-selected {
  background: var(--tt-fill-soft);
  font-weight: var(--tt-weight-label);
}

.twin-hero-ask-opt-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--tt-text-secondary);
}

.twin-hero-ask-opt-ico svg { width: 16px; height: 16px; }

.twin-hero-ask-opt.is-selected .twin-hero-ask-opt-ico { color: var(--tt-text-primary); }

.twin-bots-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tt-space-3);
  margin-top: var(--tt-space-10);
}

.twin-bots-head .page-title { margin: 0; }

.rp-status.is-neutral {
  background: var(--tt-fill-soft);
  color: var(--tt-text-secondary);
}

/* Call controls: no grey tray, so the icon buttons line up with End call (40px). */
.talk-controls .demo-cluster { padding: 0; background: transparent; }
.talk-controls .demo-ctrl { box-sizing: border-box; border: 1px solid var(--tt-border); }
/* Mic off is dark, not red, so it can't be mistaken for End call. */
.talk-controls .demo-ctrl.is-off { background: var(--tt-cta-strong); border-color: var(--tt-cta-strong); color: var(--tt-on-cta-strong); }
.talk-controls .demo-ctrl,
.talk-controls .demo-end--icon { width: 54px; height: 54px; min-width: 0; padding: 0; }
.talk-controls .demo-ctrl svg,
.talk-controls .demo-end--icon svg { width: 22px; height: 22px; }

/* Call ended */
.talk-end-body { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 var(--tt-space-8) var(--tt-space-12); text-align: center; }
.talk-end-label { display: inline-flex; align-items: center; gap: var(--tt-space-2); padding: 6px var(--tt-space-4); border-radius: var(--tt-radius-pill); background: var(--tt-fill-soft); color: var(--tt-text-secondary); font-size: 14px; line-height: 20px; font-weight: var(--tt-weight-label); }
.talk-end-label svg { width: 16px; height: 16px; flex: none; }
.talk-end-photo { width: 240px; height: 240px; margin-top: var(--tt-space-6); border-radius: 48px; overflow: hidden; background: var(--tt-fill-soft); box-shadow: var(--tt-elevation-2); }
.talk-end-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; display: block; }
.talk-end-photo video { width: 100%; height: 100%; object-fit: cover; display: block; }
.talk-end-name { margin: var(--tt-space-5) 0 0; font-size: var(--tt-size-title); line-height: var(--tt-leading-title); font-weight: var(--tt-weight-title); letter-spacing: -0.015em; }
.talk-end-time { margin: var(--tt-space-1) 0 0; font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.talk-end-link { display: inline-flex; align-items: center; gap: 6px; margin: var(--tt-space-5) 0 0; padding: 0; border: 0; background: transparent; color: var(--tt-text-secondary); font: inherit; font-size: 14px; line-height: 20px; font-weight: var(--tt-weight-label); cursor: pointer; }
.talk-end-link svg { width: 16px; height: 16px; }
.talk-end-link:hover { color: var(--tt-text-primary); }
.talk-end-actions { display: flex; gap: var(--tt-space-3); margin-top: var(--tt-space-8); }

/* End-call confirmation */
.talk-confirm-actions { flex-direction: row; }
.talk-confirm-actions .btn { flex: 1; width: auto; }
.talk-end-actions .btn svg { width: 16px; height: 16px; flex: none; }

/* Analytics (home theme) */
.an-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--tt-space-4); margin-top: var(--tt-space-4); }
.an-stat { padding: var(--tt-space-5); background: var(--tt-surface); border: var(--tt-border-thin) solid var(--tt-card-border); border-radius: var(--tt-radius-lg); box-shadow: 0 2px 4px rgb(30 28 25 / 0.035), 0 8px 20px rgb(30 28 25 / 0.055); }
.an-stat .overline { margin: 0; }
.an-value { margin: var(--tt-space-2) 0 0; font-size: 28px; line-height: 34px; font-weight: 600; letter-spacing: -0.015em; }
.an-note { margin: var(--tt-space-1) 0 0; color: var(--tt-text-secondary); font-size: 13px; line-height: 18px; }
.an-table { margin-top: var(--tt-space-4); background: var(--tt-surface); border: var(--tt-border-thin) solid var(--tt-card-border); border-radius: var(--tt-radius-lg); overflow: hidden; box-shadow: 0 2px 4px rgb(30 28 25 / 0.035), 0 8px 20px rgb(30 28 25 / 0.055); }
.an-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px 110px 100px; align-items: center; gap: var(--tt-space-3); padding: 14px var(--tt-space-5); font-size: 14px; line-height: 20px; }
.an-row + .an-row { border-top: 1px solid var(--tt-border); }
.an-row--head { padding-top: 10px; padding-bottom: 10px; background: var(--tt-surface-sunken); color: var(--tt-text-secondary); font-size: 12px; font-weight: var(--tt-weight-label); letter-spacing: 0.04em; text-transform: uppercase; }
.an-row--note { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; }
.an-name { font-weight: var(--tt-weight-title); }
.an-muted { color: var(--tt-text-secondary); }
.an-answer { margin-top: var(--tt-space-4); padding: var(--tt-space-4) var(--tt-space-5); background: var(--tt-surface); border: var(--tt-border-thin) solid var(--tt-border); border-radius: var(--tt-radius-lg); }
.an-answer-q { margin: 0; color: var(--tt-text-secondary); font-size: 13px; line-height: 18px; }
.an-answer-a { margin: var(--tt-space-1) 0 0; font-size: 15px; line-height: 22px; font-weight: 600; }
@media (max-width: 900px) {
  .an-grid { grid-template-columns: repeat(2, 1fr); }
  .an-row { grid-template-columns: minmax(0, 1fr) 70px 90px 70px; }
}
/* One-line ask bar: the field and the send button share a row. */
.page--analytics .home-ask { flex-direction: row; align-items: center; gap: var(--tt-space-3); min-height: 0; padding: 8px 8px 8px 18px; }
.page--analytics .home-ask-input { flex: 1; min-width: 0; }
.page--analytics .home-ask-actions { flex: none; margin: 0; }
.an-row--bots { grid-template-columns: minmax(0, 1fr) 100px 110px 72px; }
.an-row--bots .an-end { justify-self: end; }
.an-row--head .an-end { text-align: right; }
.an-row--bots .rp-row-more { margin: -8px -8px -8px 0; }
.an-row--empty { grid-template-columns: 1fr; }

/* The "Twin is ready" card is 3:4 portrait to suit the clip. */
.call-identity .refine-frame { --rf-aspect: 3 / 4; }

/* Twin Studio tabs + calibrations */
.twin-tabs { margin-top: var(--tt-space-10); }
.twin-tabs + .twin-bots-head, .twin-tabs + .rp-grid { margin-top: var(--tt-space-5); }
.cal-list { margin-top: var(--tt-space-4); background: var(--tt-surface); border: var(--tt-border-thin) solid var(--tt-card-border); border-radius: var(--tt-radius-lg); overflow: hidden; box-shadow: 0 2px 4px rgb(30 28 25 / 0.035), 0 8px 20px rgb(30 28 25 / 0.055); }
.cal-row { display: flex; align-items: center; gap: var(--tt-space-4); width: 100%; padding: 14px var(--tt-space-5); border: 0; background: transparent; color: var(--tt-text-primary); font: inherit; text-align: left; cursor: pointer; }
.cal-row + .cal-row { border-top: 1px solid var(--tt-border); }
.cal-row:hover { background: var(--tt-surface-sunken); }
.cal-row:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: -2px; }
.cal-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cal-title { font-size: 14px; line-height: 20px; font-weight: var(--tt-weight-title); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-meta { color: var(--tt-text-secondary); font-size: 13px; line-height: 18px; }
.cal-go { flex: none; display: grid; place-items: center; width: 28px; height: 28px; color: var(--tt-text-secondary); }
.cal-go svg { width: 16px; height: 16px; }
.cal-row:hover .cal-go { color: var(--tt-text-primary); }

.page--cal { max-width: none; min-height: 100%; padding: 0; display: flex; flex-direction: column; }
.cal-detail { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: var(--tt-space-6) var(--tt-space-8) var(--tt-space-8); box-sizing: border-box; }
.cal-who { display: flex; flex-direction: column; align-items: center; text-align: center; }
.cal-avatar { width: 64px; height: 64px; border-radius: 16px; overflow: hidden; background: var(--tt-fill-soft); box-shadow: var(--tt-elevation-2); }
.cal-avatar img, .cal-avatar video { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; display: block; }
.cal-name { margin: var(--tt-space-3) 0 0; font-size: var(--tt-size-title); line-height: var(--tt-leading-title); font-weight: var(--tt-weight-title); letter-spacing: -0.015em; }
.cal-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--tt-space-4); margin-top: var(--tt-space-6); }
.cal-foot { position: sticky; bottom: 0; z-index: 2; display: flex; justify-content: center; padding: var(--tt-space-8) var(--tt-space-6) var(--tt-space-6); background: linear-gradient(to bottom, transparent, var(--tt-canvas) 45%); pointer-events: none; }
.cal-foot .btn { pointer-events: auto; }
.cal-foot .btn svg { width: 16px; height: 16px; flex: none; }
.cal-when { margin: var(--tt-space-8) 0 var(--tt-space-4); text-align: center; color: var(--tt-text-secondary); font-size: 13px; line-height: 18px; font-weight: var(--tt-weight-label); }
.cal-thread { display: flex; flex-direction: column; gap: var(--tt-space-4); }

/* ===== EXPERIMENT: brand-orange CTAs =====
   Replaces the dark "strong" button with the brand orange everywhere, to judge it
   across the product. Delete this whole block to go back to the dark CTAs. */
.btn--strong,
.demo-room .btn--strong,
.tee-talk-mic,
.flow-node--start { background: var(--tt-primary); color: var(--tt-on-primary); }
.btn--strong:hover:not(:disabled),
.demo-room .btn--strong:hover:not(:disabled) { background: var(--tt-primary-hover); }
/* ===== /EXPERIMENT ===== */

/* Phone-only chrome stays hidden on larger screens. */
.mobile-head, .tabbar { display: none; }
@media (max-width: 767px) { .mobile-head { display: flex; } .tabbar { display: flex; } }

/* Phones: TeeTee card (kept last so it wins over the base .tee-* rules above). */
@media (max-width: 767px) {
  .tee-card { grid-template-columns: minmax(0, 1fr); grid-template-areas: "mascot" "copy" "box"; align-items: start; }
  .tee-mascot { margin-top: 0; justify-self: start; }
  .tee-suggestions { align-items: stretch; }
  .tee-suggest { width: 100%; max-width: none; }
}

/* Phones: the Roleplay header is one row, title on the left, "Search | + New" on the right.
   The search loses its pill so it reads as just an icon and a word. */
@media (max-width: 767px) {
  .lib-head { flex-wrap: nowrap; gap: var(--tt-space-3); }
  .lib-tools { flex: none; gap: var(--tt-space-3); }
  .lib-search { height: 36px; padding: 0; background: transparent; box-shadow: none; }
  .lib-search input { width: 64px; }

  /* Tapping the search opens it across the whole header so there's room to type. */
  .lib-head:has(.lib-search:focus-within) .lib-title,
  .lib-head:has(.lib-search:focus-within) .lib-tools > .btn { display: none; }
  .lib-head:has(.lib-search:focus-within) .lib-tools { flex: 1; min-width: 0; }
  .lib-head:has(.lib-search:focus-within) .lib-search {
    flex: 1;
    min-width: 0;
    padding: 0 var(--tt-space-4);
    background: var(--tt-surface);
    box-shadow: 0 0 0 1px var(--tt-border-interactive);
  }
  .lib-head:has(.lib-search:focus-within) .lib-search input { width: 100%; font-size: 16px; }
}

/* Desktop: the page body is a white panel with rounded left corners and a soft shadow, so it reads as
   separate from the grey left nav. */
@media (min-width: 768px) {
  .shell { background: var(--tt-surface-sunken); }
  .main {
    position: relative;
    z-index: calc(var(--tt-z-sticky) + 1);
    border-radius: var(--tt-radius-lg) 0 0 var(--tt-radius-lg);
    box-shadow: -4px 0 16px rgb(30 28 25 / 0.06);
  }
}

/* Analytics sections: flat cards and tables, no shadow. */
.an-flat .an-stat, .an-flat .an-table { box-shadow: none; }

/* Analytics: the ask bar floats at the top while the page scrolls (it takes over as the ask field reaches the top). */
.an-float { position: sticky; top: 12px; z-index: 6; width: 100%; height: 0; visibility: hidden; opacity: 0; transition: opacity 160ms ease; }
.an-float.is-on { visibility: visible; opacity: 1; }
.an-float-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  margin: 0;
  border-radius: var(--tt-radius-pill);
  /* See-through, with a deeper shadow so it lifts clear of the page. */
  background: color-mix(in srgb, var(--tt-surface) 78%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-color: transparent;
  box-shadow: var(--tt-elevation-3), 0 24px 48px rgb(30 28 25 / 0.1);
}
.an-float-bar:focus-within { border-color: transparent; }
@media (max-width: 767px) { .an-float { top: 64px; } }
.page--analytics .an-float-bar { padding-left: var(--tt-space-6); }

/* Section header link on the right ("View roleplay"). */
.home-section-head .home-section-link { margin-left: auto; align-self: center; display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; color: var(--tt-text-secondary); font: inherit; font-size: 14px; line-height: 20px; font-weight: var(--tt-weight-label); cursor: pointer; }
.home-section-head .home-section-link svg { width: 14px; height: 14px; }
.home-section-head .home-section-link:hover { color: var(--tt-text-primary); }
.home-section-head .home-section-link:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; border-radius: var(--tt-radius-xs); }

.rp-card.is-clickable { cursor: pointer; }
.rp-card.is-clickable:hover { box-shadow: var(--tt-elevation-2); }
.rp-card.is-clickable:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }
/* Help text sits directly under its field; the spacing comes from the container, not a top margin. */
.hint-below { margin: 0; }

/* Icon-only header button: no container at rest, soft grey circle on hover. */
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--tt-radius-pill); background: transparent; color: var(--tt-text-primary); cursor: pointer; transition: background-color 120ms ease; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { background: var(--tt-fill-soft); }
.icon-btn:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }

/* Twin configuration field labels read as the section labels do (15px, semibold). */
.role-field > label, .role-field > .label, .role-field-head > label { color: var(--tt-text-primary); font-size: 15px; line-height: 22px; font-weight: var(--tt-weight-title); }

/* Twin Studio buttons (Knowledge, Share, Ask my twin, Create bot) use medium weight, not the default semibold. */
.page--twin-profile .lib-tools .btn,
.page--twin-profile .twin-bots-head .btn { font-weight: var(--tt-weight-medium); }

.twin-hero-ask-row--end { justify-content: flex-end; }

/* Builder: scenario / learner role / goals sit in a collapsed card under TeeTee. */
/* Two cards: TeeTee on top, the situation details in their own card below. */
.create-column > .card + .card { margin-top: var(--tt-space-4); }
.role-card--details { padding: 0; }
.role-manual { background: var(--tt-surface); }
.role-manual-head { display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-3); width: 100%; padding: var(--tt-space-5) var(--tt-space-4); border: 0; background: transparent; color: var(--tt-text-primary); font: inherit; text-align: left; cursor: pointer; }
.role-manual-head:hover { background: var(--tt-surface-sunken); }
.role-manual-text { display: flex; flex-direction: column; gap: 2px; }
.role-manual-title { font-size: 16px; line-height: 24px; font-weight: var(--tt-weight-title); }
.role-manual-sub { color: var(--tt-text-secondary); font-size: 13px; line-height: 18px; }
.role-manual-head svg { width: 16px; height: 16px; flex: none; color: var(--tt-text-secondary); transition: transform 160ms ease; }
.role-manual.is-open .role-manual-head svg { transform: rotate(180deg); }
.role-manual-body { display: flex; flex-direction: column; gap: var(--tt-space-3); padding: 0 var(--tt-space-4) var(--tt-space-5); }
.role-manual-body > .role-label-row:first-child { margin-top: 0; }

/* TeeTee card fills its white card edge to edge. */
.role-card--tee { padding: 0; }
.role-card--tee > .tee-card { border: 0; border-radius: 23px; }
/* Only roleplays are made here, so the ask box has no type picker: keep mic + send on the right. */
.tee-ask-box .home-ask-actions { justify-content: flex-end; }
/* Roleplay agent card: 24px on every side. */
.role-card:not(.role-card--tee):not(.role-card--details) { padding: var(--tt-space-6); }
/* Roleplay situations card: 24px on every side, same as the agent card. */
.role-manual-head { padding: var(--tt-space-6); }
.role-manual-body { padding: 0 var(--tt-space-6) var(--tt-space-6); }
/* TeeTee card in the builder: 24px on every side, like the cards below it. */
.role-card--tee > .tee-card { padding: var(--tt-space-6); }
/* After the ask is sent the TeeTee card collapses to just the input. */
.tee-card--sent { grid-template-columns: minmax(0, 1fr); grid-template-areas: "box"; }
.tee-card--sent .tee-ask-box { margin-top: 0; }

/* Persona picker: one row per persona, photo + name + AI chip + title. */
.role-avatar-dialog { width: min(420px, calc(100vw - 32px)); }
.role-personas { display: flex; flex-direction: column; gap: var(--tt-space-2); margin-top: var(--tt-space-3); }
.role-persona {
  display: flex;
  align-items: center;
  gap: var(--tt-space-3);
  padding: var(--tt-space-3);
  border: 1px solid var(--tt-border);
  border-radius: var(--tt-radius-md);
  background: var(--tt-surface);
  color: var(--tt-text-primary);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.role-persona.is-selected { background: var(--tt-fill-soft); border-color: var(--tt-text-primary); }
.role-persona img { width: 44px; height: 44px; flex: none; border-radius: var(--tt-radius-pill); object-fit: cover; object-position: center 20%; background: var(--tt-fill-soft); }
.role-persona-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.role-persona-name { display: flex; align-items: center; gap: var(--tt-space-2); font-size: 14px; line-height: 20px; font-weight: var(--tt-weight-label); }
.role-persona-title { font-size: 13px; line-height: 18px; color: var(--tt-text-secondary); }
.role-ai { padding: 0 6px; border-radius: var(--tt-radius-pill); background: var(--tt-fill-soft); color: var(--tt-text-secondary); font-size: 11px; line-height: 18px; font-weight: var(--tt-weight-label); }
.role-persona.is-selected .role-ai { background: var(--tt-surface); }
.role-persona .role-dot { flex: none; }
.role-persona.is-selected .role-dot {
  border-color: var(--tt-cta-strong);
  background: radial-gradient(circle, var(--tt-cta-strong) 0 4px, transparent 5px);
}
/* "Roleplay situations" title matches the card headings (18/24, semibold). */
.role-manual-title { font-size: 18px; line-height: 24px; }
/* Every label sits 8px above its field in the agent card: the Character role <p> label had a
   default 15px margin, and the appearance row sat 12px below its heading. */
.role-field > .label { margin: 0; }
.role-card > .role-label + .role-appearance { margin-top: calc(var(--tt-space-2) - var(--tt-space-3)); }
/* The TeeTee card sits flat; the other builder cards keep their shadow. */
.page--create .card.card--flat { box-shadow: none; }
/* Feedback reasons: a picked reason keeps the normal chip fill and only gets an orange border. */
.demo-feedback-reasons .btn[aria-pressed="true"] { box-shadow: 0 0 0 1.5px var(--tt-primary); }

/* Confirm dialog: icon tile, title, one line of consequence, Cancel + the danger action. */
.confirm-dialog { width: min(440px, calc(100vw - 32px)); }
.confirm-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--tt-space-5);
  width: 100%;
  padding: var(--tt-space-6);
  border: 4px solid var(--tt-surface);
  border-radius: 24px;
  background: linear-gradient(180deg, var(--tt-surface-sunken) 0%, var(--tt-surface) 100%);
  box-shadow: 0 4px 8px rgb(30 28 25 / 0.2);
  color: var(--tt-text-primary);
}
.confirm-tile {
  display: flex;
  padding: 2px;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--tt-border), var(--tt-surface));
}
.confirm-tile-in {
  display: flex;
  padding: 12px;
  border: 4px solid var(--tt-surface);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--tt-surface-sunken), var(--tt-surface));
  box-shadow: 0 4px 8px rgb(30 28 25 / 0.2), inset 0 0 4px rgb(30 28 25 / 0.05);
  color: var(--tt-danger);
}
.confirm-tile-in svg { width: 20px; height: 20px; }
.confirm-close { position: absolute; top: 12px; right: 12px; }
.confirm-copy { display: flex; flex-direction: column; gap: var(--tt-space-2); }
.confirm-title { margin: 0; font-size: 20px; line-height: 28px; font-weight: var(--tt-weight-title); }
.confirm-sub { margin: 0; font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.confirm-actions { display: flex; justify-content: flex-end; gap: var(--tt-space-2); width: 100%; }

/* ===== One popup theme =====
   Every popup shares the confirm dialog's surface: a soft grey-to-white gradient, a 4px white
   border, a 24px radius and one drop shadow. Icons sit in the same framed tile. */
.issue-card { --tt-surface-sunken: #F7F7F7; }
.issue-card,
.upsell-card,
.tee-chat-card,
.auth-card,
.talk-page .demo-feedback-card {
  border: 4px solid var(--tt-surface);
  border-radius: 24px;
  background: linear-gradient(180deg, var(--tt-surface-sunken) 0%, var(--tt-surface) 100%);
  box-shadow: 0 4px 8px rgb(30 28 25 / 0.2);
}
/* The dark call room keeps its dark surface, with the same shape. */
.demo-prompt,
.demo-feedback-card {
  border: 4px solid rgb(255 255 255 / 0.06);
  border-radius: 24px;
  background: linear-gradient(180deg, #23262E 0%, var(--demo-surface) 100%);
  box-shadow: 0 4px 8px rgb(0 0 0 / 0.4);
}
.talk-page .demo-feedback-card { border: 4px solid var(--tt-surface); background: linear-gradient(180deg, var(--tt-surface-sunken) 0%, var(--tt-surface) 100%); box-shadow: 0 4px 8px rgb(30 28 25 / 0.2); }
/* Titles: 20/28 semibold, like the confirm dialog. */
.upsell-title,
.role-avatar-head h2,
.tee-chat-head h2,
.demo-prompt h2,
.demo-feedback-card .card-title { font-size: 20px; line-height: 28px; }
/* Upsell + talk-end icon: the framed tile instead of a grey circle. */
.upsell-icon {
  width: auto;
  height: auto;
  padding: 12px;
  border: 4px solid var(--tt-surface);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--tt-surface-sunken), var(--tt-surface));
  box-shadow: 0 4px 8px rgb(30 28 25 / 0.2), inset 0 0 4px rgb(30 28 25 / 0.05);
}
/* ===== /One popup theme ===== */

/* Collapsed rail: the logo turns into the expand-menu icon while you hover (or focus) it. */
.lockup .lockup-expand { display: none; width: 20px; height: 20px; color: var(--tt-text-secondary); }
.rail.is-collapsed .lockup-toggle:hover > svg:first-child,
.rail.is-collapsed .lockup-toggle:focus-visible > svg:first-child { display: none; }
.rail.is-collapsed .lockup-toggle:hover > .lockup-expand,
.rail.is-collapsed .lockup-toggle:focus-visible > .lockup-expand { display: block; color: var(--tt-text-primary); }

/* ===== Create bot: the roleplay builder layout ===== */
.bot-card { gap: var(--tt-space-3); }
.bot-card-sub { margin: calc(var(--tt-space-1) - var(--tt-space-3)) 0 0; color: var(--tt-text-secondary); font-size: 14px; line-height: 20px; }
.bot-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--tt-space-1);
  padding: var(--tt-space-6) var(--tt-space-4);
  border: 1px dashed var(--tt-border-strong, var(--tt-text-tertiary));
  border-radius: var(--tt-radius-md);
  background: var(--tt-surface-sunken);
  color: var(--tt-text-secondary);
  text-align: center;
  cursor: pointer;
}
.bot-drop:hover, .bot-drop.is-over, .bot-drop:focus-within { background: var(--tt-fill-soft); border-color: var(--tt-text-primary); }
.bot-drop svg { width: 24px; height: 24px; color: var(--tt-text-primary); }
.bot-drop-title { color: var(--tt-text-primary); font-size: 14px; line-height: 20px; font-weight: var(--tt-weight-label); }
.bot-drop-title u { text-underline-offset: 2px; }
.bot-drop-sub { font-size: 13px; line-height: 18px; }
.bot-files { display: flex; flex-direction: column; gap: var(--tt-space-2); margin: 0; padding: 0; list-style: none; }
.bot-file { display: flex; align-items: center; gap: var(--tt-space-3); padding: var(--tt-space-3); border: 1px solid var(--tt-border); border-radius: var(--tt-radius-md); background: var(--tt-surface); }
.bot-file-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: var(--tt-radius-sm); background: var(--tt-fill-soft); color: var(--tt-text-primary); }
.bot-file-icon svg { width: 20px; height: 20px; margin: 0; }
.bot-pdf { font-size: 10px; line-height: 1; font-weight: var(--tt-weight-title); color: var(--tt-danger); }
.bot-file-text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.bot-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 20px; font-weight: var(--tt-weight-label); }

.bot-proc { display: flex; flex-direction: column; gap: var(--tt-space-2); padding: var(--tt-space-3) var(--tt-space-4); border-radius: var(--tt-radius-md); background: var(--tt-fill-soft); }
.bot-proc.is-done { flex-direction: row; align-items: center; gap: var(--tt-space-3); background: var(--tt-success-subtle); color: var(--tt-success); }
.bot-proc-row { display: flex; justify-content: space-between; gap: var(--tt-space-3); }
.bot-proc-text { margin: 0; font-size: 14px; line-height: 20px; }
.bot-proc-text strong { font-weight: var(--tt-weight-label); }
.bot-proc-pct { color: var(--tt-text-secondary); font-size: 13px; line-height: 20px; }
.bot-proc-track { height: 6px; overflow: hidden; border-radius: var(--tt-radius-pill); background: var(--tt-surface); }
.bot-proc-track span { display: block; height: 100%; border-radius: inherit; background: var(--tt-primary); transition: width 120ms linear; }
.bot-proc-check { display: grid; place-items: center; flex: none; }
.bot-proc-check svg { width: 18px; height: 18px; }

.bot-link { display: flex; gap: var(--tt-space-2); }
.bot-link .input { flex: 1; min-width: 0; }
.bot-link .btn svg { width: var(--tt-icon-sm); height: var(--tt-icon-sm); }
.bot-test { display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-4); margin-top: var(--tt-space-3); padding: var(--tt-space-4); border-radius: var(--tt-radius-md); background: var(--tt-fill-soft); }
.bot-test-title { margin: 0; font-size: 15px; line-height: 22px; font-weight: var(--tt-weight-title); }
.bot-test-sub { margin: 0; color: var(--tt-text-secondary); font-size: 13px; line-height: 18px; }
.bot-test .btn { flex: none; }
.bot-test .btn[hidden] { display: none; }

/* Calibration: the form slides left and the call card opens beside it. */
.bot-talk-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--tt-space-3); }
/* ===== /Create bot ===== */
.page--bot .create-bar-back { white-space: nowrap; }
@media (max-width: 640px) { .page--bot .create-bar { padding: 0 var(--tt-space-4); } .bot-inherit { display: none; } }
/* Uploaded rows are as tall as the text fields (40px) and use the same 8px radius. */
.bot-file { box-sizing: border-box; height: 40px; gap: var(--tt-space-2); padding: 0 var(--tt-space-1) 0 var(--tt-space-3); border-radius: var(--tt-radius-sm); }
.bot-file-icon { width: 20px; height: 20px; border-radius: 0; background: transparent; }
.bot-file-icon svg { width: 18px; height: 18px; }
.bot-file .bot-pdf { font-size: 9px; }
/* Drop zone: the Home ask card's quiet grey (same fill, same light border). It only darkens while a file is dragged over it. */
.bot-drop { border: var(--tt-border-thin) solid var(--tt-card-border); background: var(--tt-surface-sunken); }
.bot-drop:hover, .bot-drop:focus-within { background: var(--tt-fill-soft); border-color: var(--tt-card-border); }
.bot-drop.is-over { background: var(--tt-fill-soft); border: var(--tt-border-thin) dashed var(--tt-text-primary); }
/* The primary action sits at the bottom right of the card, like "Meet my twin". */
.bot-card-foot { display: flex; justify-content: flex-end; margin-top: var(--tt-space-4); }
/* Upload icon sits on the same line, just before the text. */
.bot-drop-line { display: inline-flex; align-items: center; gap: var(--tt-space-2); }
.bot-drop .bot-drop-line svg { width: 20px; height: 20px; flex: none; }
/* Uploaded rows lift off the card with a light shadow: 2 y, 2 blur, 4% opacity. */
.bot-file { box-shadow: 0 2px 2px rgb(30 28 25 / 0.04); }
/* The twin clips are square (640 x 640): show the whole frame instead of cropping it to 16:10. */
/* The twin card is as tall as the Bot details card next to it; its call controls sit at the bottom. */
/* In the split the tabs sit above the form card, and the form card and the twin card share one row, so they are always the same height. */
/* Twin video at half size (150px). */
/* In the call card the subtitle sits in a plain block (no flex gap), so it needs a real margin. */
.bot-talk-head .bot-card-sub { margin-top: var(--tt-space-1); }
/* The twin card follows the Bot details card's height and never sets it: its content is laid out inside
   the card and the chat scrolls instead of growing it. */

/* Calibration sheet: slides over the page from the right, the page behind it is blurred. */
.page--bot { position: relative; }
.bot-sheet-layer { position: absolute; inset: 0; z-index: 20; }
.bot-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--tt-canvas) 45%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.bot-talk {
  position: absolute;
  top: var(--tt-space-4);
  right: var(--tt-space-4);
  bottom: var(--tt-space-4);
  display: flex;
  flex-direction: column;
  width: min(440px, calc(100% - 32px));
  border-radius: 24px;
  box-shadow: 0 8px 32px rgb(30 28 25 / 0.18);
}
.bot-talk-body { flex: 1; min-height: 0; gap: var(--tt-space-3); }
.bot-talk-lead { flex: none; margin: 0; color: var(--tt-text-secondary); font-size: 14px; line-height: 20px; }
.bot-talk-body > .bot-talk-lead { margin-top: auto; }
@media (max-width: 640px) {
  .bot-talk { top: var(--tt-space-2); right: var(--tt-space-2); bottom: var(--tt-space-2); width: calc(100% - 16px); }
}

/* Call card: the Ask my twin look at a smaller size (same video card, speaking tag, bubbles and feedback buttons). */
.bot-talk .talk-card { width: 150px; height: 150px; border-radius: 22px; margin-inline: auto; }
.bot-talk .talk-name { left: var(--tt-space-2); bottom: var(--tt-space-2); padding: 2px 8px; font-size: 11px; line-height: 16px; }
.bot-talk .talk-clock { right: var(--tt-space-2); bottom: var(--tt-space-2); padding: 2px 8px; font-size: 11px; line-height: 16px; }
.bot-talk .talk-thread { flex: 1 1 0; min-height: 0; width: 100%; margin-top: var(--tt-space-2); padding-bottom: 0; gap: var(--tt-space-3); }
.bot-talk .talk-bubble { max-width: 92%; }
.bot-talk .talk-msg { gap: var(--tt-space-2); }
.bot-talk .bot-talk-end { align-self: stretch; }
/* Call controls: mic and end call as circles at the bottom, like Ask my twin. */
.bot-talk-controls { margin-top: auto; padding-top: var(--tt-space-3); }
.bot-talk .demo-end:disabled { opacity: 0.35; cursor: not-allowed; }
.bot-talk .demo-end:disabled:hover { opacity: 0.35; }
/* Before a call starts the sheet is only as tall as its content; it grows to full height once the call begins. */
.bot-talk.is-idle { bottom: auto; }
.bot-talk.is-idle .bot-talk-body { flex: none; }
/* During a call the sheet is shorter than the page: about half the empty space under the messages is gone. */
.bot-talk { bottom: auto; height: min(calc(100% - 32px), 670px); }
.bot-talk.is-idle { height: auto; }
/* The sheet sits in the vertical middle of the page: equal space above and below it. */
.bot-talk { top: 0; bottom: 0; margin-block: auto; }
.bot-talk.is-idle { top: 0; bottom: 0; height: fit-content; }
@media (max-width: 640px) { .bot-talk { top: 0; bottom: 0; } }
/* The blur starts under the header bar, so the back button and header stay sharp and clickable. */
.bot-sheet-layer { pointer-events: none; }
.bot-sheet-backdrop { top: 64px; pointer-events: auto; }
.bot-talk { pointer-events: auto; }
/* Roleplay detail: the details card and the Analytics card are the same height; the buttons sit at the bottom of the details card. */
.rp-detail-layout { align-items: stretch; }
.rp-detail { display: flex; flex-direction: column; }
/* Details + report stack on the left; the conversations card on the right is as tall as that stack. */
.rp-detail-col { display: flex; flex-direction: column; gap: var(--tt-space-4); min-width: 0; }
.rp-detail-col > .rp-detail { flex: none; }
/* A little more room for the details column so the three buttons stay on one row. */
.rp-detail-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 960px) { .rp-detail-layout { grid-template-columns: 1fr; } }
/* Roleplay detail: the back button lives in a top bar at the far left, like the builder pages. */
.rp-detail-shell { display: flex; flex-direction: column; min-height: 100%; }
.rp-detail-page { width: 100%; padding-top: var(--tt-space-2); }

/* Conversations list: a coloured initial circle in front of each learner. */
.rp-history button { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: var(--tt-space-3); align-items: start; }
.rp-history-body { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.rp-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--tt-radius-pill);
  font-size: 16px;
  line-height: 1;
  font-weight: var(--tt-weight-title);
}
.rp-avatar--1 { background: var(--tt-success-subtle); color: var(--tt-success); }
.rp-avatar--2 { background: var(--tt-info-subtle); color: var(--tt-info); }
.rp-avatar--3 { background: var(--tt-caution-subtle); color: var(--tt-caution); }
.rp-avatar--4 { background: var(--tt-danger-subtle); color: var(--tt-danger); }
.rp-avatar--5 { background: var(--tt-orange-100); color: var(--tt-orange-700); }
/* Actions live at the top right of the details card, level with the title. */
.rp-detail-head { display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-3); }
.rp-detail-head .page-title { margin: 0; min-width: 0; }
.rp-detail-head .rp-detail-actions { flex: none; flex-wrap: nowrap; gap: var(--tt-space-2); margin: 0; padding: 0; }
/* All three detail actions are secondary buttons; only the trash icon keeps the danger colour. */
.rp-detail-actions .rp-delete { color: var(--tt-danger); }

/* Learner link: dot grid while it is made, typed out, then a Copy link button that turns into "Copied". */
.bot-link-field { position: relative; flex: 1; min-width: 0; }
.bot-link-field .input { width: 100%; }
.bot-link .bot-copy { min-width: 128px; justify-content: center; }
.bot-link .bot-copy.is-copied, .bot-link .bot-copy.is-copied:disabled { color: var(--tt-primary); }
.bot-link .bot-copy svg { width: var(--tt-icon-sm); height: var(--tt-icon-sm); }
.bot-link .bot-copy { font-weight: var(--tt-weight-body); }
/* The same lattice loader the rest of the product uses, sitting inside the link field while the link is made. */
.bot-link-loader { position: absolute; left: 14px; top: 50%; display: inline-flex; transform: translateY(-50%); pointer-events: none; }
.bot-link-loader .lattice-loader.lattice-loader--mini { --ll-cell: 4px; --ll-gap: 2px; color: var(--tt-text-primary); }
/* A picked character role keeps its white chip and gets an orange border. */
.role-trait[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--tt-primary); }
/* The call card sits in the middle of the page, both ways (it rises into place from the bottom). */
.bot-talk { left: 0; right: 0; margin-inline: auto; }
@media (max-width: 640px) { .bot-talk { left: 0; right: 0; } }
/* The "What could be better?" popup reuses the Ask my twin call's light theme and sits above the call card. */
.bot-issue-wrap.talk-page { display: contents; }
.bot-issue-wrap .demo-prompt-layer { z-index: 40; }

/* Twin ask box: Attach sits next to the type dropdown; attached documents show above the placeholder. */
.twin-ask-tools { display: flex; align-items: center; gap: var(--tt-space-1); min-width: 0; }
.twin-attach { gap: 6px; color: var(--tt-text-secondary); cursor: pointer; }
.twin-attach svg { width: var(--tt-icon-sm); height: var(--tt-icon-sm); }
.twin-attach:hover { color: var(--tt-text-primary); }
.twin-ask-tools:focus-within .twin-attach { outline: none; }
.twin-attachments { display: flex; flex-wrap: wrap; gap: var(--tt-space-2); margin: 0 0 var(--tt-space-3); padding: 0; list-style: none; }
.twin-attachment { display: inline-flex; align-items: center; gap: 6px; max-width: 240px; padding: 4px 4px 4px 10px; border-radius: var(--tt-radius-pill); background: var(--tt-fill-soft); color: var(--tt-text-primary); font-size: 13px; line-height: 20px; }
.twin-attachment svg { width: 16px; height: 16px; flex: none; color: var(--tt-text-secondary); }
.twin-attachment span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.twin-attachment button { display: grid; place-items: center; flex: none; width: 20px; height: 20px; padding: 0; border: 0; border-radius: var(--tt-radius-pill); background: transparent; color: var(--tt-text-secondary); cursor: pointer; }
.twin-attachment button:hover { background: var(--tt-border); color: var(--tt-text-primary); }
.twin-attachment button svg { width: 12px; height: 12px; color: inherit; }

/* Bot details as a preview page: gradient cover, the bot's name, what learners can ask, what it was built from. */
.bot-preview { overflow: hidden; padding: 0; }
.bot-preview > .bot-proc { margin: var(--tt-space-4) var(--tt-space-4) 0; }
.bot-preview-body { display: flex; flex-direction: column; gap: var(--tt-space-5); padding: var(--tt-space-6); }
.bot-preview-head { display: flex; flex-direction: column; gap: var(--tt-space-1); }
.bot-name-input, .bot-desc-input {
  box-sizing: border-box;
  width: calc(100% + 16px);
  margin: 0 -8px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: var(--tt-radius-sm);
  background: transparent;
  color: var(--tt-text-primary);
  font: inherit;
  resize: none;
}
.bot-name-input { font-size: 24px; line-height: 32px; font-weight: var(--tt-weight-title); letter-spacing: -0.02em; }
.bot-desc-input { color: var(--tt-text-secondary); font-size: 15px; line-height: 22px; }
.bot-name-input:hover:not(:disabled), .bot-desc-input:hover:not(:disabled) { border-color: var(--tt-border); }
.bot-name-input:focus, .bot-desc-input:focus { outline: none; border-color: var(--tt-border-field); background: var(--tt-surface); }
.bot-name-input::placeholder, .bot-desc-input::placeholder { color: var(--tt-text-tertiary); }
.bot-preview-section { display: flex; flex-direction: column; gap: var(--tt-space-2); }
.bot-preview-section .overline { margin: 0; }
.bot-chips { display: flex; flex-wrap: wrap; gap: var(--tt-space-2); }
.bot-chip, .bot-source { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 12px; border-radius: var(--tt-radius-pill); background: var(--tt-fill-soft); color: var(--tt-text-primary); font-size: 13px; line-height: 20px; }
.bot-source { padding-left: 10px; }
.bot-source svg { width: 16px; height: 16px; flex: none; color: var(--tt-text-secondary); }
.bot-source span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-preview .bot-test { margin-top: 0; }
.bot-preview-body { padding-top: var(--tt-space-5); }
/* On Bot details the calibration button stands alone, at the bottom right of the preview. */
.bot-cal-foot { margin-top: 0; }
/* The twin sits just above the bot's name. */
.bot-preview .bot-preview-twin { width: 120px; height: 120px; border-radius: 20px; margin: 0; }
.bot-preview .bot-preview-twin .talk-name { left: var(--tt-space-2); bottom: var(--tt-space-2); max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 8px; font-size: 11px; line-height: 16px; }
.bot-preview-body { gap: var(--tt-space-4); }
.bot-preview-body .bot-preview-twin { margin-bottom: calc(var(--tt-space-1) * -1); }
/* Bot name: 18/24 semibold, the same as the card headings. */
.bot-name-input { font-size: 18px; line-height: 24px; letter-spacing: normal; }
/* Video, name and description are centred in the preview; the calibration button stays at the bottom right. */
.bot-preview-body { align-items: center; text-align: center; }
.bot-preview-head { align-self: stretch; }
.bot-name-input, .bot-desc-input { text-align: center; }
.bot-preview-body .bot-card-foot { align-self: stretch; }
/* The calibration button is centred under the description. */
.bot-preview-body .bot-cal-foot { justify-content: center; }
/* Calibration call page: End call stays dim until the twin has answered. */
.bot-call-page .demo-end:disabled { opacity: 0.35; cursor: not-allowed; }
.bot-call-page .demo-end:disabled:hover { opacity: 0.35; }
/* Link made on Bot details after the calibration call. */
.bot-preview-link { width: 100%; max-width: 560px; margin-top: var(--tt-space-5); animation: bot-link-in .35s ease both; }
.bot-preview-link .field { margin: 0; }
.bot-preview-link .bot-link-field { position: relative; }
@keyframes bot-link-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bot-preview-link { animation: none; } }
/* Bot details: progress alone in the middle, then the bot appears piece by piece. */
.bot-preview > .bot-proc--wait { margin: 0; min-height: 420px; justify-content: center; align-self: stretch; padding: var(--tt-space-6) 120px; background: transparent; border-radius: 0; }
.bot-preview .bot-reveal { opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .5s ease, transform .5s ease; }
.bot-preview .bot-reveal.is-in { opacity: 1; transform: none; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .bot-preview .bot-reveal { transition: none; } }
/* Link section sits on a light grey panel. */
.bot-preview-link { padding: var(--tt-space-4) var(--tt-space-5); border-radius: var(--tt-radius-md); background: var(--tt-fill-soft); }
.bot-preview-link .input { background: var(--tt-surface); }
.bot-preview-link + .bot-cal-foot { margin-top: 12px; }
/* Description hugs its text so the grey link panel sits 24px below it. */
.bot-desc-input { field-sizing: content; min-height: 0; }
.bot-preview-link { margin-top: var(--tt-space-2); }
/* Call controls (Ask my twin and the calibration call): mic and conversation buttons on a light grey fill. */
.talk-controls .demo-ctrl:not(.is-off):not(.is-active) { background: var(--tt-fill-soft); }
.talk-controls .demo-ctrl:not(.is-off):not(.is-active):hover { background: var(--tt-border); }
/* The type menu's label lines up with the text above it; its hover pill reaches into the padding. */
.twin-hero-ask-type { margin-left: calc(var(--tt-space-2) * -1 - 2px); }
.profile-logout { margin-top: var(--tt-space-4); }
/* Calibration call: "?" beside a twin answer opens the reasoning and sources popup. */
.talk-page .talk-bubble-row { display: flex; align-items: center; gap: var(--tt-space-2); max-width: 100%; }
.talk-page .talk-bubble-row .talk-bubble { max-width: none; min-width: 0; }
.talk-why { display: grid; place-items: center; flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--tt-radius-pill); background: transparent; color: var(--tt-text-tertiary); cursor: pointer; }
.talk-why svg { width: 20px; height: 20px; }
.talk-why:hover { background: var(--tt-fill-soft); color: var(--tt-text-primary); }
.bot-why-layer { z-index: 40; }
.bot-why-backdrop { position: absolute; inset: 0; }
.bot-why-card { position: relative; display: flex; flex-direction: column; width: min(560px, calc(100% - 48px)); max-height: min(680px, calc(100vh - 96px)); overflow: auto; }
.bot-why-close { position: absolute; top: var(--tt-space-4); right: var(--tt-space-4); }
.bot-why-card .card-title { padding-right: var(--tt-space-8); }
.bot-why-reason { margin: var(--tt-space-2) 0 0; font-size: 14px; line-height: 22px; color: var(--tt-text-secondary); }
.bot-why-label { display: flex; align-items: center; gap: var(--tt-space-2); margin: var(--tt-space-5) 0 var(--tt-space-2); font-size: 14px; line-height: 20px; font-weight: var(--tt-weight-label); color: var(--tt-text-primary); }
.bot-why-label span { padding: 0 8px; border-radius: var(--tt-radius-pill); background: var(--tt-fill-soft); color: var(--tt-text-secondary); font-size: 12px; line-height: 20px; font-weight: 400; }
.bot-why-list { display: flex; flex-direction: column; gap: var(--tt-space-2); margin: 0; padding: 0; list-style: none; }
.bot-why-item { display: flex; align-items: flex-start; gap: var(--tt-space-3); padding: var(--tt-space-3); border-radius: var(--tt-radius-md); background: var(--tt-fill-soft); }
.bot-why-kind { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: var(--tt-radius-sm); background: var(--tt-surface); color: var(--tt-text-secondary); }
.bot-why-kind svg { width: 18px; height: 18px; }
.bot-why-text { display: flex; flex-direction: column; min-width: 0; }
.bot-why-title { font-size: 14px; line-height: 20px; font-weight: var(--tt-weight-label); color: var(--tt-text-primary); }
.bot-why-meta { font-size: 13px; line-height: 18px; color: var(--tt-text-secondary); }
.bot-why-more { align-self: center; margin-top: var(--tt-space-4); }
.bot-why-tile { align-self: flex-start; margin-bottom: var(--tt-space-5); }
.bot-why-card .confirm-tile-in { color: var(--tt-text-primary); }
/* Sources expand to show the passage the answer drew on, with the matching words highlighted. */
.bot-why-item { flex-direction: column; align-items: stretch; gap: 0; padding: 0; }
.bot-why-row { display: flex; align-items: flex-start; gap: var(--tt-space-3); width: 100%; padding: var(--tt-space-3); border: 0; border-radius: var(--tt-radius-md); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.bot-why-text { flex: 1; }
.bot-why-chev { flex: none; width: 16px; height: 16px; margin-top: 8px; color: var(--tt-text-tertiary); transition: transform var(--tt-duration-quick) var(--tt-ease-standard); }
.bot-why-item.is-open .bot-why-chev { transform: rotate(180deg); }
.bot-why-excerpt { display: flex; flex-direction: column; gap: var(--tt-space-3); margin: 0 var(--tt-space-3) var(--tt-space-3); padding: var(--tt-space-3) var(--tt-space-4); border-radius: var(--tt-radius-sm); background: var(--tt-surface); animation: bot-why-in .25s ease both; }
.bot-why-line { margin: 0; font-size: 14px; line-height: 22px; color: var(--tt-text-primary); }
.bot-why-who { display: block; margin-bottom: 2px; font-size: 12px; line-height: 16px; font-weight: var(--tt-weight-label); color: var(--tt-text-secondary); }
.bot-why-who span { margin-left: 4px; font-weight: 400; color: var(--tt-text-tertiary); }
.bot-why-hit { padding: 1px 2px; border-radius: 3px; background: #FFE98A; color: #1C1B1B; }
@keyframes bot-why-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bot-why-excerpt { animation: none; } }
/* "Why this answer" is a window in the bottom right, like the Conversation panel; it doesn't block the page. */
.talk-page .bot-why-layer { position: absolute; inset: 0; z-index: 12; display: flex; justify-content: flex-end; align-items: flex-end; padding: var(--tt-space-6); background: none; -webkit-backdrop-filter: none; backdrop-filter: none; pointer-events: none; }
.talk-page .bot-why-backdrop { display: none; }
.talk-page .bot-why-card { pointer-events: auto; width: 400px; max-width: 100%; max-height: min(600px, 100%); border: 0; border-radius: var(--tt-radius-lg); background: var(--tt-surface); box-shadow: 0 0 0 1px var(--tt-border), 0 4px 8px rgb(30 28 25 / 0.0675), 0 16px 40px rgb(30 28 25 / 0.12); }
.bot-why-layer.is-entering .bot-why-card { animation: bot-why-up .3s cubic-bezier(.2, .8, .2, 1) both; }
.bot-why-layer.is-closing .bot-why-card { animation: bot-why-up .2s ease-in reverse both; }
.bot-why-layer.is-entering, .bot-why-layer.is-closing { animation: none; }
@keyframes bot-why-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bot-why-layer.is-entering .bot-why-card, .bot-why-layer.is-closing .bot-why-card { animation: none; } }
/* Close: a white floating circle that stays put while the sources scroll. */
.talk-page .bot-why-card .bot-why-close { position: sticky; top: calc(var(--tt-space-3) - var(--tt-space-6)); right: auto; z-index: 2; align-self: flex-end; flex: none; width: 32px; height: 32px; margin: calc(var(--tt-space-3) * -1) calc(var(--tt-space-3) * -1) -32px 0; padding: 0; border: 0; border-radius: var(--tt-radius-pill); background: var(--tt-surface); color: var(--tt-text-primary); box-shadow: 0 0 0 1px rgb(30 28 25 / 0.05), 0 2px 6px rgb(30 28 25 / 0.12); }
.talk-page .bot-why-card .bot-why-close:hover { background: var(--tt-fill-soft); }
.talk-page .bot-why-card .bot-why-close svg { width: 14px; height: 14px; }
/* Settings: Gen video and Analytics live here as "Fast follow" cards. */
.settings-group { margin: var(--tt-space-6) 0 var(--tt-space-3); }
.fast-follow { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--tt-space-3); }
.fast-follow-card { display: flex; flex-direction: row; justify-content: flex-start; align-items: center; gap: var(--tt-space-3); width: 100%; padding: var(--tt-space-4) var(--tt-space-5); font: inherit; text-align: left; color: var(--tt-text-primary); cursor: pointer; }
.fast-follow-card:hover { background: var(--tt-fill-soft); }
.fast-follow-ico { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: var(--tt-radius-sm); background: var(--tt-fill-soft); color: var(--tt-text-secondary); }
.fast-follow-card:hover .fast-follow-ico { background: var(--tt-surface); }
.fast-follow-ico svg { width: 20px; height: 20px; }
.fast-follow-name { font-size: 15px; line-height: 22px; font-weight: var(--tt-weight-label); }
/* TeeTee waits 4 seconds after the page opens, then eases in. */
.teetee-nudge { transition: opacity .45s ease, transform .45s ease; }
.teetee-nudge.is-pending { opacity: 0; transform: translateY(8px); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .teetee-nudge { transition: none; } }
/* Twin's Knowledge now sits in Settings, under Fast follow. */
.settings-know { max-width: 420px; margin-top: var(--tt-space-4); }
/* Roleplay cards: lighter grey for the description and for the quote in the white bubble. */
.rp-copy { color: var(--tt-text-tertiary); }
.rp-quote-bubble { color: var(--tt-text-tertiary); }
/* Home ask card: same soft grey and moving waves as the Roleplay TeeTee card. */
.home-ask-card { position: relative; background: var(--tt-fill-soft); border-color: var(--tt-border); }
.home-ask-waves { position: absolute; inset: 0; z-index: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.home-ask-card > :not(.home-ask-waves) { position: relative; z-index: 1; }
.home-ask-card > .home-ask { z-index: 2; }
/* Video reel cards: Review is a glass button over the footage. */
.reel-actions .btn--secondary { background: rgb(255 255 255 / 0.16); color: #FFFFFF; border: 1px solid rgb(255 255 255 / 0.32); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.28), 0 4px 12px rgb(0 0 0 / 0.12); -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5); }
.reel-actions .btn--secondary:hover:not(:disabled) { background: rgb(255 255 255 / 0.26); border-color: rgb(255 255 255 / 0.45); }
/* Home: TeeTee fronts the composer, like the Roleplay card. */
.home-tee-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--tt-space-4); }
.home-tee-copy .tee-lead { max-width: 560px; }
.home-tee-mascot { flex: none; width: 92px; height: 92px; margin: -6px 0 -18px; object-fit: contain; }
.home-ask-card .home-tee-head + .home-ask { margin-top: var(--tt-space-3); }
.twin-hero-info { color: var(--tt-text-secondary); }
#twin-ask-form { margin-top: 0; }
/* Reason suggestions under the twin's question. */
.talk-page .talk-tags { display: flex; flex-wrap: wrap; gap: var(--tt-space-2); max-width: 88%; }
/* Share on a bot card. */
.share-dialog .share-field { width: 100%; margin: 0; }
.share-dialog .bot-link { display: flex; gap: var(--tt-space-2); }
.share-dialog .bot-link-field { flex: 1; min-width: 0; position: relative; }
.share-dialog { width: min(520px, calc(100vw - 32px)); }
.share-dialog .confirm-tile-in { color: var(--tt-text-primary); }
/* The "why does it feel off?" question is a light yellow bubble; its suggestions stay grey. */

/* Twin bot detail: the "to review" box and the most-asked list. */
.rp-stat--review { background: var(--tt-caution-subtle); color: var(--tt-caution); }
.bot-asked { display: flex; flex-direction: column; gap: var(--tt-space-2); margin: 0; padding: 0; list-style: none; }
.bot-asked li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--tt-space-4); font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.bot-asked b { flex: none; font-weight: var(--tt-weight-label); color: var(--tt-text-primary); }
.rp-detail-stats--3 .rp-stat { flex: 1 1 0; min-width: 0; padding: var(--tt-space-3) var(--tt-space-4); }
/* Twin Studio: one full-width card for the twin itself, above the use-case twins. */
.twin-all-card { display: flex; align-items: center; gap: var(--tt-space-4); margin-top: var(--tt-space-4); padding: var(--tt-space-4) var(--tt-space-5); }
.twin-all-video { flex: none; width: 64px; height: 64px; border-radius: var(--tt-radius-lg); object-fit: cover; object-position: center 18%; background: var(--tt-fill-soft); }
.twin-all-copy { flex: 1; min-width: 0; }
.twin-all-title { margin: 0; font-size: 16px; line-height: 24px; font-weight: var(--tt-weight-title); }
.twin-all-meta { margin: 2px 0 0; font-size: 14px; line-height: 20px; color: var(--tt-text-tertiary); }
.twin-all-actions { display: flex; align-items: center; gap: var(--tt-space-2); flex: none; }
.twin-bots-head--spaced { margin-top: var(--tt-space-8); }
@media (max-width: 640px) { .twin-all-card { flex-wrap: wrap; } .twin-all-actions { width: 100%; } }
.twin-all-card { flex-direction: row; justify-content: flex-start; text-align: left; }
/* Create bot sits on the right of the Twin Studio tabs. */
.twin-tabs { display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-3); }
/* The twin card's Share and Calibration are plain icon + text on light grey, not secondary buttons. */
.twin-all-actions .btn { background: var(--tt-fill-soft); box-shadow: none; color: var(--tt-text-primary); }
.twin-all-actions .btn:hover:not(:disabled) { background: var(--tt-border); }
/* "What I've learnt" hangs off the arrow beside "Last updated" on the twin card. */
.twin-all-meta { position: relative; display: flex; align-items: center; gap: var(--tt-space-1); }
.twin-all-meta .twin-hero-info { left: 0; transform: none; white-space: normal; }
.twin-all-card { overflow: visible; }
/* The hero is just the prompt now, set in the title size. */
.twin-hero-copy p { max-width: none; margin: 0; }
.twin-hero-copy .twin-hero-prompt { font-size: var(--tt-size-title); line-height: var(--tt-leading-title); font-weight: var(--tt-weight-title); color: var(--tt-text-primary); }
.flow-updated { font-size: 14px; line-height: 20px; color: var(--tt-text-tertiary); }
.twin-all-card { box-shadow: 0 2px 4px rgb(30 28 25 / 0.035), 0 8px 20px rgb(30 28 25 / 0.055); }
.twin-all-learners { margin-top: var(--tt-space-2); }
.twin-all-video { width: 86px; height: 86px; border-radius: 20px; }
/* Bot report: tabs replace the Conversations title; calibrations sit flat inside the card. */
.bot-detail-tabs { margin: 0 0 var(--tt-space-4); }
.bot-cal-list { margin-top: 0; border: 0; box-shadow: none; border-radius: 0; background: transparent; }
.bot-cal-list .cal-row { padding-left: 0; padding-right: 0; }
.bot-cal-list .cal-row:hover { background: transparent; }
/* Bot report: details and report side by side, conversations full width underneath with underline tabs. */
.rp-detail-layout--bot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.rp-detail-layout--bot > .rp-conversations { grid-column: 1 / -1; }
@media (max-width: 960px) { .rp-detail-layout--bot { grid-template-columns: 1fr; } }
.bot-tabs { display: flex; gap: var(--tt-space-6); margin: 0 0 var(--tt-space-2); border-bottom: 1px solid var(--tt-border); }
.bot-tabs button { margin: 0 0 -1px; padding: var(--tt-space-2) 0 var(--tt-space-3); border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--tt-text-tertiary); font: inherit; font-size: 15px; line-height: 22px; font-weight: var(--tt-weight-label); cursor: pointer; }
.bot-tabs button:hover { color: var(--tt-text-primary); }
.bot-tabs button[aria-selected="true"] { color: var(--tt-text-primary); border-bottom-color: var(--tt-text-primary); }
.bot-tabs button:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; border-radius: 4px; }
.twin-all-card.is-clickable { cursor: pointer; }
.twin-all-card.is-clickable:hover { box-shadow: var(--tt-elevation-2); }
.twin-all-card.is-clickable:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }
.lib-tools .btn--strong svg { width: 16px; height: 16px; flex: none; }
.twin-all-card .rp-row-more { flex: none; margin-left: var(--tt-space-1); }
.cal-meta { color: var(--tt-text-tertiary); }
/* Left menu groups (Overview / Roleplay / Twin). */
.rail-nav .rail-group { margin: var(--tt-space-3) 0 0; }
.rail-nav .rail-group:first-child { margin-top: var(--tt-space-1); }
.rail.is-collapsed .rail-group { display: block; height: 1px; margin: var(--tt-space-2) var(--tt-space-3); padding: 0; font-size: 0; background: var(--tt-border); }
/* Sessions page. */
.sess-list { display: flex; flex-direction: column; margin: var(--tt-space-4) 0 0; padding: 0; list-style: none; background: var(--tt-surface); border: var(--tt-border-thin) solid var(--tt-card-border); border-radius: var(--tt-radius-lg); box-shadow: 0 2px 4px rgb(30 28 25 / 0.035), 0 8px 20px rgb(30 28 25 / 0.055); overflow: hidden; }
.sess-list li + li { border-top: 1px solid var(--tt-border); }
.sess-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 28px; align-items: start; column-gap: var(--tt-space-3); width: 100%; padding: var(--tt-space-4) var(--tt-space-5); border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.sess-row:hover { background: var(--tt-surface-sunken); }
.sess-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sess-name { font-size: 14px; line-height: 20px; font-weight: var(--tt-weight-title); color: var(--tt-text-primary); }
.sess-line { font-size: 13px; line-height: 18px; color: var(--tt-text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sess-row .cal-go { align-self: center; }
/* Roleplay settings page. */
.rps-intro { margin: var(--tt-space-2) 0 var(--tt-space-4); color: var(--tt-text-tertiary); font-size: 14px; line-height: 20px; }
.rps-card { margin-top: var(--tt-space-4); padding: var(--tt-space-5) var(--tt-space-6); }
.rps-title { margin: 0 0 var(--tt-space-3); font-size: 16px; line-height: 24px; font-weight: var(--tt-weight-title); }
.rps-row { display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-6); padding: var(--tt-space-3) 0; }
.rps-row + .rps-row { border-top: 1px solid var(--tt-border); }
.rps-row--stack { align-items: flex-start; }
.rps-copy { min-width: 0; }
.rps-label { margin: 0; font-size: 14px; line-height: 20px; font-weight: var(--tt-weight-label); color: var(--tt-text-primary); }
.rps-help { margin: 2px 0 0; font-size: 13px; line-height: 18px; color: var(--tt-text-tertiary); }
.rps-control { flex: none; width: 220px; }
.rps-chips { display: flex; flex-wrap: wrap; gap: var(--tt-space-2); justify-content: flex-end; max-width: 420px; }
.rps-switch { flex: none; position: relative; width: 40px; height: 24px; padding: 0; border: 0; border-radius: var(--tt-radius-pill); background: var(--tt-border); cursor: pointer; transition: background-color var(--tt-duration-quick) var(--tt-ease-standard); }
.rps-switch span { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--tt-surface); box-shadow: 0 1px 2px rgb(0 0 0 / 0.2); transition: transform var(--tt-duration-quick) var(--tt-ease-standard); }
.rps-switch[aria-checked="true"] { background: var(--tt-primary); }
.rps-switch[aria-checked="true"] span { transform: translateX(16px); }
@media (max-width: 720px) { .rps-row { flex-direction: column; align-items: stretch; gap: var(--tt-space-2); } .rps-control { width: 100%; } .rps-chips { justify-content: flex-start; } }
/* Disabled secondary buttons read as unavailable. */
.btn--secondary:disabled { color: var(--tt-text-muted); cursor: not-allowed; }
.btn--secondary:disabled svg { opacity: 0.6; }
/* Calibration overview: four metrics, then the calibration list. */
.cal-metrics--4 { grid-template-columns: repeat(4, 1fr); }
.cal-list-head { margin-top: var(--tt-space-8); }
@media (max-width: 720px) { .cal-metrics--4 { grid-template-columns: repeat(2, 1fr); } }
.cal-metrics--4 { gap: var(--tt-space-3); }
.cal-metrics--4 .an-stat { padding-left: var(--tt-space-4); padding-right: var(--tt-space-4); }
.cal-metrics--4 .overline { white-space: nowrap; letter-spacing: 0.06em; }
/* Client face before the quote on a roleplay card. */
.rp-quote-bubble.has-face { display: flex; align-items: flex-start; gap: var(--tt-space-2); }
.rp-quote-face { flex: none; width: 24px; height: 24px; border-radius: 50%; object-fit: cover; object-position: center 20%; }

/* Roleplay agent step: pick a persona, set the character role, preview the call on the right. */
.create-column--wide { max-width: 1040px; }
.page--create .create-column--wide > .rpa { margin-top: 0; }
.rpa { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--tt-space-8); align-items: start; }
.rpa-main { display: flex; flex-direction: column; gap: var(--tt-space-6); min-width: 0; }
.rpa-main .role-card-title { font-size: 28px; line-height: 36px; letter-spacing: -0.02em; }
.rpa-step { display: flex; flex-direction: column; gap: var(--tt-space-3); }
.rpa-h { margin: 0; font-size: 16px; line-height: 24px; font-weight: var(--tt-weight-title); color: var(--tt-text-primary); }
.rpa-h label { cursor: pointer; }
.rpa-people { display: flex; flex-wrap: wrap; gap: var(--tt-space-3); }
.rpa-person { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 96px; padding: 0; border: 0; background: transparent; font: inherit; color: var(--tt-text-secondary); cursor: pointer; }
.rpa-photo { position: relative; display: block; width: 96px; height: 96px; border-radius: var(--tt-radius-md); overflow: hidden; box-shadow: inset 0 0 0 1px var(--tt-border); }
.rpa-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.rpa-person[aria-pressed="true"] .rpa-photo { outline: 2px solid var(--tt-primary); outline-offset: 2px; }
.rpa-tick { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--tt-primary); color: #fff; }
.rpa-tick svg { width: 12px; height: 12px; }
.rpa-name { margin-top: var(--tt-space-2); font-size: 14px; line-height: 20px; font-weight: var(--tt-weight-label); color: var(--tt-text-primary); }
.rpa-sub { font-size: 13px; line-height: 18px; color: var(--tt-text-tertiary); }
.rpa-person:hover .rpa-photo { box-shadow: inset 0 0 0 1px var(--tt-border-field); }
.rpa-expect { padding: var(--tt-space-4) var(--tt-space-5); border: 1px solid var(--tt-border); border-radius: var(--tt-radius-lg); background: var(--tt-surface); }
.rpa-expect-label { margin: 0 0 var(--tt-space-1); font-size: 12px; line-height: 16px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: var(--tt-weight-label); color: var(--tt-text-tertiary); }
.rpa-expect-text { margin: 0; font-size: 14px; line-height: 22px; color: var(--tt-text-secondary); }
.rpa-preview { position: sticky; top: 0; display: flex; flex-direction: column; align-items: center; height: auto; padding: var(--tt-space-8) var(--tt-space-6) var(--tt-space-6); border-radius: 24px; text-align: center; box-shadow: 0 2px 4px rgb(30 28 25 / 0.035), 0 8px 20px rgb(30 28 25 / 0.055); }
.rpa-voice { position: absolute; top: var(--tt-space-4); right: var(--tt-space-4); }
.rpa-ring { position: relative; display: grid; place-items: center; width: 220px; height: 220px; border-radius: 50%; background: rgb(255 255 255 / 0.45); box-shadow: inset 0 0 0 10px rgb(255 255 255 / 0.35); }
.rpa-portrait { display: block; width: 184px; height: 184px; border-radius: 50%; overflow: hidden; background: var(--tt-fill-soft); }
.rpa-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.rpa-chip { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 2px 12px; border-radius: var(--tt-radius-pill); background: rgb(255 255 255 / 0.88); color: var(--tt-text-primary); font-size: 13px; line-height: 20px; font-weight: var(--tt-weight-label); white-space: nowrap; }
.rpa-title { margin: var(--tt-space-5) 0 0; font-size: 22px; line-height: 28px; font-weight: var(--tt-weight-title); letter-spacing: -0.015em; color: var(--tt-text-primary); }
.rpa-role { margin: var(--tt-space-1) 0 0; font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.rpa-cta { margin-top: var(--tt-space-6); }
.rpa-cta svg { width: 16px; height: 16px; flex: none; }
@media (max-width: 900px) { .rpa { grid-template-columns: 1fr; } .rpa-preview { position: static; } }
/* Client photo before the name on a roleplay detail page. */
.rp-detail-twin:has(.rp-detail-face) { display: flex; align-items: center; gap: var(--tt-space-3); }
.rp-detail-face { flex: none; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; object-position: center 20%; }
.rp-quote-text { display: flex; flex-direction: column; min-width: 0; }
.rp-quote-name { color: var(--tt-text-primary); font-weight: var(--tt-weight-title); }
/* The agent form sits in a card, like the Situation step. */
.rpa-card { border-radius: 24px; }
.rpa-main { padding: var(--tt-space-6); }
.rpa-main .rpa-expect { background: var(--tt-surface-sunken); border-color: transparent; }

/* Roleplay settings from the prompt structure: sub labels, difficulty, reaction lists. */
.role-sublabel { display: block; margin-top: var(--tt-space-2); font-size: 13px; line-height: 18px; font-weight: var(--tt-weight-label); color: var(--tt-text-secondary); }
.page--create .rpa-diff { display: flex; width: fit-content; max-width: 100%; flex-wrap: wrap; margin: 0; }
.rpa-list { display: flex; flex-direction: column; gap: var(--tt-space-2); }
.rpa-list + .rpa-list { margin-top: var(--tt-space-4); }
.rpa-list-label { margin: 0; font-size: 14px; line-height: 20px; font-weight: var(--tt-weight-label); color: var(--tt-text-primary); }
.rpa-list-items { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.rpa-list-items li { display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-3); padding: var(--tt-space-2) 0; font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.rpa-list-items li + li { border-top: 1px solid var(--tt-border); }
.rpa-list-items .btn { flex: none; }
/* Roleplay settings: secondary menu, persona cards, voice and knowledge lists. */
.rps-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: var(--tt-space-8); margin-top: var(--tt-space-4); align-items: start; }
.rps-menu { position: sticky; top: 0; display: flex; flex-direction: column; gap: 2px; }
.rps-menu-item { display: flex; align-items: center; height: 36px; padding: 0 var(--tt-space-3); border: 0; border-radius: var(--tt-radius-sm); background: transparent; color: var(--tt-text-secondary); font: inherit; font-size: 14px; font-weight: var(--tt-weight-label); text-align: left; cursor: pointer; }
.rps-menu-item:hover { background: var(--tt-fill-soft); color: var(--tt-text-primary); }
.rps-menu-item[aria-current="page"] { background: var(--tt-fill-soft); color: var(--tt-text-primary); }
.rps-panel { min-width: 0; }
.rps-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--tt-space-4); }
.rps-panel-title { margin: 0; font-size: 20px; line-height: 28px; font-weight: var(--tt-weight-title); letter-spacing: -0.01em; }
.rps-panel .rps-intro { margin: 2px 0 var(--tt-space-4); }
.rps-panel .rps-card { margin-top: 0; }
.rps-group { margin: var(--tt-space-6) 0 var(--tt-space-3); font-size: 14px; line-height: 20px; font-weight: var(--tt-weight-title); color: var(--tt-text-primary); }
.rps-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--tt-space-4); }
.rps-person { display: flex; flex-direction: column; gap: var(--tt-space-2); padding: var(--tt-space-4); border-radius: var(--tt-radius-lg); }
.rps-person-top { display: flex; align-items: center; gap: var(--tt-space-3); }
.rps-person-photo { flex: none; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: center 20%; }
.rps-person-photo--initial { display: grid; place-items: center; background: var(--tt-fill-soft); color: var(--tt-text-secondary); font-size: 18px; font-weight: var(--tt-weight-title); }
.rps-person-id { flex: 1; min-width: 0; }
.rps-person-name { margin: 0; font-size: 15px; line-height: 20px; font-weight: var(--tt-weight-title); }
.rps-person-role { margin: 0; font-size: 13px; line-height: 18px; color: var(--tt-text-tertiary); }
.rps-person-label { margin: var(--tt-space-2) 0 0; font-size: 12px; line-height: 16px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tt-text-tertiary); font-weight: var(--tt-weight-label); }
.rps-person-tags { display: flex; flex-wrap: wrap; gap: var(--tt-space-1); }
.rps-tag { padding: 2px 10px; border-radius: var(--tt-radius-pill); background: var(--tt-fill-soft); color: var(--tt-text-secondary); font-size: 12px; line-height: 20px; font-weight: var(--tt-weight-label); }
.rps-person-note { margin: 0; font-size: 13px; line-height: 18px; color: var(--tt-text-secondary); }
.rps-person-act { align-self: flex-start; margin-top: var(--tt-space-1); }
.rps-back { margin-bottom: var(--tt-space-3); padding-left: 0; }
.rps-form { display: flex; flex-direction: column; gap: var(--tt-space-5); padding: var(--tt-space-6); }
.rps-form .field { margin: 0; }
.rps-seg { display: flex; width: fit-content; max-width: 100%; flex-wrap: wrap; margin: 0; }
.rps-form-foot { display: flex; justify-content: flex-end; gap: var(--tt-space-2); padding-top: var(--tt-space-2); border-top: 1px solid var(--tt-border); }
.rpa-person--sm { width: 64px; }
.rpa-person--sm .rpa-photo { width: 64px; height: 64px; border-radius: var(--tt-radius-sm); }
.rps-list { padding: 0; border-radius: var(--tt-radius-lg); overflow: hidden; }
.rps-list.is-off { opacity: 0.55; }
.rps-voice { display: flex; align-items: center; gap: var(--tt-space-3); padding: var(--tt-space-3) var(--tt-space-4); }
.rps-voice + .rps-voice, .rps-know + .rps-know { border-top: 1px solid var(--tt-border); }
.rps-voice-main { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-3); min-width: 0; padding: 0; border: 0; background: transparent; font: inherit; text-align: left; color: inherit; cursor: pointer; }
.rps-voice-text { display: flex; flex-direction: column; min-width: 0; }
.rps-voice-name { font-size: 14px; line-height: 20px; font-weight: var(--tt-weight-title); }
.rps-voice-desc { font-size: 13px; line-height: 18px; color: var(--tt-text-tertiary); }
.rps-voice.is-selected .role-dot { border-color: var(--tt-cta-strong); background: radial-gradient(circle, var(--tt-cta-strong) 0 4px, transparent 5px); }
.rps-know { display: flex; align-items: center; gap: var(--tt-space-3); padding: var(--tt-space-3) var(--tt-space-4); }
.rps-know .rps-voice-text { flex: 1; }
.rps-know-ico { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: var(--tt-radius-sm); background: var(--tt-fill-soft); color: var(--tt-text-secondary); font-size: 14px; font-weight: var(--tt-weight-title); }
.rps-know-add { margin-top: var(--tt-space-3); }
@media (max-width: 720px) { .rps-layout { grid-template-columns: 1fr; gap: var(--tt-space-4); } .rps-menu { position: static; flex-direction: row; overflow-x: auto; } }
.rps-voice-pick { display: flex; align-items: center; gap: var(--tt-space-2); }
.rps-voice-pick .input { flex: 1; min-width: 0; }
.rps-voice-pick .btn { flex: none; }
/* Persona settings: full-width page, create screen pieces. */
.page--library.page--wide { max-width: none; }
.rps-panel-head--page { margin-top: var(--tt-space-6); }
.rps-panel-head--page .rps-intro { margin-bottom: var(--tt-space-4); }
.page--wide .rps-people { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.rps-create-body { gap: var(--tt-space-5); }
.rps-create-body .field { margin: 0; }
.rps-create-body .rps-intro { margin: calc(var(--tt-space-2) * -1) 0 0; }
.rps-create-body .rps-group { margin: var(--tt-space-2) 0 0; }
.rps-create-body .rps-list { border: 1px solid var(--tt-border); }
.rps-drop { display: flex; align-items: center; gap: var(--tt-space-3); padding: var(--tt-space-5); border: 1px dashed var(--tt-border-field); border-radius: var(--tt-radius-lg); color: var(--tt-text-secondary); cursor: pointer; }
.rps-drop:hover { background: var(--tt-surface-sunken); }
.rps-drop svg { width: 20px; height: 20px; flex: none; }
.rps-drop span { display: flex; flex-direction: column; font-size: 13px; line-height: 18px; }
.rps-drop b { font-size: 14px; line-height: 20px; font-weight: var(--tt-weight-title); color: var(--tt-text-primary); }
.rps-files { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.rps-files li { display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-3); padding: var(--tt-space-2) 0; font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.rps-files li + li { border-top: 1px solid var(--tt-border); }
/* Segmented choices sit on the right of their label. */
.rps-create-body .field:has(> .rps-seg) { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--tt-space-4); row-gap: var(--tt-space-1); }
.rps-create-body .field:has(> .rps-seg) > .hint { grid-column: 1 / -1; margin: 0; }
.page--create .rps-seg { margin: 0; justify-self: end; }
/* Avatar step: about them and speaking mannerisms. */
.rps-two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--tt-space-4); }
.rps-sub-h { margin: var(--tt-space-3) 0 calc(var(--tt-space-2) * -1); padding-top: var(--tt-space-5); border-top: 1px solid var(--tt-border); font-size: 16px; line-height: 24px; font-weight: var(--tt-weight-title); }
.rps-rows { display: flex; flex-direction: column; }
.rps-rows .rps-row { padding: var(--tt-space-3) 0; }
@media (max-width: 720px) { .rps-two { grid-template-columns: 1fr; } }
/* Persona cards: portrait that fades into the card, name and role over it, grey labels below. */
.rps-people { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.page--wide .rps-people { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.rps-person { padding: 0; gap: 0; overflow: hidden; border-radius: var(--tt-radius-lg); }
.rps-person-hero { position: relative; height: 232px; }
.rps-person-hero .rps-person-photo { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; object-fit: cover; object-position: center 18%; -webkit-mask-image: linear-gradient(to bottom, #000 58%, transparent 98%); mask-image: linear-gradient(to bottom, #000 58%, transparent 98%); }
.rps-person-hero .rps-person-photo--initial { display: grid; place-items: center; font-size: 64px; }
.rps-person-default { position: absolute; top: var(--tt-space-3); right: var(--tt-space-3); }
.rps-person-title { position: absolute; left: var(--tt-space-5); right: var(--tt-space-5); bottom: var(--tt-space-1); display: flex; align-items: center; flex-wrap: wrap; gap: var(--tt-space-2); }
.rps-person-title .rps-person-name { font-size: 20px; line-height: 28px; font-weight: var(--tt-weight-title); letter-spacing: -0.01em; color: var(--tt-text-primary); }
.rps-person-chip { padding: 2px 12px; border-radius: var(--tt-radius-pill); background: var(--tt-surface); box-shadow: 0 1px 3px rgb(0 0 0 / 0.12); font-size: 13px; line-height: 20px; font-weight: var(--tt-weight-label); color: var(--tt-text-primary); }
.rps-person-body { display: flex; flex-direction: column; gap: var(--tt-space-4); padding: var(--tt-space-3) var(--tt-space-5) var(--tt-space-5); }
.rps-person-item { display: flex; flex-direction: column; gap: var(--tt-space-1); }
.rps-person-body .rps-person-label { margin: 0; font-size: 14px; line-height: 20px; letter-spacing: 0; text-transform: none; font-weight: var(--tt-weight-label); color: var(--tt-text-tertiary); }
.rps-person-value { margin: 0; font-size: 15px; line-height: 22px; color: var(--tt-text-primary); }
.rps-person-body .rps-person-act { align-self: flex-start; }
/* Persona settings: practice type tabs, industry chips, empty state. */
.page--library .rps-cats { display: flex; width: fit-content; max-width: 100%; margin: var(--tt-space-5) 0 0; flex-wrap: wrap; }
.rps-inds { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tt-space-2); margin-top: var(--tt-space-5); }
.rps-inds-label { margin-right: var(--tt-space-1); font-size: 14px; line-height: 20px; font-weight: var(--tt-weight-label); color: var(--tt-text-tertiary); }
.rps-empty { display: flex; flex-direction: column; align-items: flex-start; gap: var(--tt-space-3); padding: var(--tt-space-8) 0; color: var(--tt-text-secondary); }
.rps-empty p { margin: 0; }

/* ===== Roleplay call room: light ===== */
.demo-room {
  --demo-bg: var(--tt-canvas);
  --demo-surface: var(--tt-surface-sunken);
  --demo-border: var(--tt-border);
  --demo-text: var(--tt-text-primary);
  --demo-text-secondary: var(--tt-text-secondary);
}
.demo-pill-btn:hover { border-color: var(--tt-border-field); }
.demo-avatar { box-shadow: var(--tt-elevation-2); }
.demo-mode-btn.is-active { background: var(--tt-border); }
.demo-self { background: var(--tt-surface); box-shadow: 0 1px 3px rgb(0 0 0 / 0.08); }
.demo-self-avatar { background: var(--tt-fill-soft); }
.demo-self-avatar--student { background: var(--tt-fill-soft); color: var(--tt-text-secondary); }
.demo-self-avatar--olga { background: rgb(255 90 0 / 0.12); color: var(--tt-primary); }
.demo-self--twin .demo-self-label { color: #FFFFFF; }
.demo-chat { background: var(--tt-surface); box-shadow: 0 2px 4px rgb(30 28 25 / 0.035), 0 8px 20px rgb(30 28 25 / 0.055); }
.demo-chat-close:hover { background: var(--tt-fill-soft); }
.demo-bubble { background: var(--tt-fill-soft); }
.demo-line.is-lead .demo-bubble { background: var(--tt-surface); box-shadow: inset 0 0 0 1px var(--tt-border); }
.demo-vote { color: var(--tt-text-tertiary); }
.demo-vote:hover, .demo-vote.is-on { color: var(--tt-text-primary); }
.demo-chat-input { background: var(--tt-surface); }
.demo-send { background: var(--tt-text-primary); color: var(--tt-surface); }
.demo-ctrl.is-active { background: var(--tt-border); }
.demo-ctrl:not(.is-off):not(.is-active):hover { background: var(--tt-border); }
.demo-cluster { background: var(--tt-fill-soft); }
.demo-room .btn--secondary { background: var(--tt-surface); color: var(--tt-text-primary); box-shadow: inset 0 0 0 1px var(--tt-border); }
.demo-room .btn--secondary:hover { background: var(--tt-fill-soft); }
.demo-room .btn--ghost:hover { background: var(--tt-fill-soft); }
.demo-prompt-layer { background: rgb(0 0 0 / 0.35); }
.demo-prompt, .demo-feedback-card { background: var(--tt-surface); box-shadow: var(--tt-elevation-3); }
.demo-feedback-card .input { background: var(--tt-surface); }
/* ===== /Roleplay call room: light ===== */
.demo-aurora { opacity: 0.8; }
/* Twin use-case cards: the twin on video, before the quote. */
.rp-quote-face--video { width: 40px; height: 40px; background: var(--tt-fill-soft); object-position: center 22%; }
/* Usage credit card on Home. */
.usage-card { margin-top: var(--tt-space-6); padding: var(--tt-space-5) var(--tt-space-6) var(--tt-space-6); border-radius: var(--tt-radius-lg); }
.usage-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--tt-space-4); }
.usage-title { margin: 0; font-size: 18px; line-height: 26px; font-weight: var(--tt-weight-title); letter-spacing: -0.01em; }
.usage-sub { margin: 2px 0 0; font-size: 14px; line-height: 20px; color: var(--tt-text-tertiary); }
.usage-reset { flex: none; margin: 0; font-size: 13px; line-height: 20px; color: var(--tt-text-tertiary); }
.usage-credit { margin-top: var(--tt-space-5); }
.usage-left { margin: 0; font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.usage-left b { font-size: 28px; line-height: 36px; font-weight: var(--tt-weight-title); letter-spacing: -0.02em; color: var(--tt-text-primary); margin-right: 4px; }
.usage-meter { height: 8px; margin-top: var(--tt-space-2); border-radius: var(--tt-radius-pill); background: var(--tt-fill-soft); overflow: hidden; }
.usage-meter span { display: block; height: 100%; border-radius: inherit; background: var(--tt-primary); }
.usage-meta { margin: var(--tt-space-2) 0 0; font-size: 13px; line-height: 18px; color: var(--tt-text-tertiary); }
.usage-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--tt-space-3); margin-top: var(--tt-space-5); }
.usage-stat { padding: var(--tt-space-4); border-radius: var(--tt-radius-md); background: var(--tt-surface-sunken); }
.usage-value { margin: var(--tt-space-1) 0 0; font-size: 28px; line-height: 36px; font-weight: var(--tt-weight-title); letter-spacing: -0.02em; }
.usage-unit { font-size: 14px; font-weight: var(--tt-weight-label); color: var(--tt-text-tertiary); letter-spacing: 0; }
.usage-split { height: 6px; margin-top: var(--tt-space-3); border-radius: var(--tt-radius-pill); background: var(--tt-info-border); overflow: hidden; }
.usage-split span { display: block; height: 100%; background: var(--tt-primary); }
.usage-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--tt-space-3); margin: var(--tt-space-2) 0 0; font-size: 12px; line-height: 16px; color: var(--tt-text-secondary); }
.usage-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; }
.usage-dot--twin { background: var(--tt-primary); }
.usage-dot--role { background: var(--tt-info-border); }
@media (max-width: 720px) { .usage-stats { grid-template-columns: 1fr; } .usage-head { flex-direction: column; } }
/* Red flag: a learner reported an issue on this roleplay or twin. */
.rp-flag { position: absolute; top: var(--tt-space-3); right: var(--tt-space-3); z-index: 2; display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px 2px 8px; border: 1px solid var(--tt-danger-border); border-radius: var(--tt-radius-pill); background: var(--tt-danger-subtle); color: var(--tt-danger); font-size: 12px; line-height: 18px; font-weight: var(--tt-weight-label); }
.rp-flag svg { width: 12px; height: 12px; flex: none; }
.rp-card.is-flagged { outline: 1.5px solid var(--tt-danger-border); outline-offset: -1px; }
.rp-created { display: block; margin-top: var(--tt-space-1); font-size: 12px; line-height: 16px; color: var(--tt-text-tertiary); }
/* Your action needed: a list of rows. */
.act-list { display: flex; flex-direction: column; margin: var(--tt-space-4) 0 0; padding: 0; list-style: none; background: var(--tt-surface); border: var(--tt-border-thin) solid var(--tt-card-border); border-radius: var(--tt-radius-lg); box-shadow: 0 2px 4px rgb(30 28 25 / 0.035), 0 8px 20px rgb(30 28 25 / 0.055); overflow: hidden; }
.act-row { display: flex; align-items: center; gap: var(--tt-space-3); padding: 0 var(--tt-space-4) 0 0; }
.act-row + .act-row { border-top: 1px solid var(--tt-border); }
.act-row.is-flagged { background: var(--tt-danger-subtle); }
.act-main { flex: 1; display: flex; align-items: center; gap: var(--tt-space-4); min-width: 0; padding: var(--tt-space-4) 0 var(--tt-space-4) var(--tt-space-5); border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.act-row:not(.is-flagged) .act-main:hover { background: var(--tt-surface-sunken); }
.act-face { flex: none; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: center 20%; background: var(--tt-fill-soft); }
.act-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.act-title { font-size: 15px; line-height: 22px; font-weight: var(--tt-weight-title); color: var(--tt-text-primary); }
.act-sub { font-size: 13px; line-height: 18px; color: var(--tt-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-sub b { font-weight: var(--tt-weight-label); color: var(--tt-text-primary); }
.act-row .rp-flag { position: static; flex: none; }
.act-row .btn--secondary { flex: none; }
/* Session report. */
.sr-report { display: flex; flex-direction: column; gap: var(--tt-space-4); }
.sr-who { display: flex; align-items: center; gap: var(--tt-space-4); flex-wrap: wrap; }
.sr-avatar { width: 48px; height: 48px; font-size: 18px; }
.sr-name { margin: 0; font-size: var(--tt-size-title); line-height: var(--tt-leading-title); font-weight: var(--tt-weight-title); letter-spacing: -0.015em; }
.sr-sub { margin: 2px 0 0; font-size: 14px; line-height: 20px; color: var(--tt-text-tertiary); }
.sr-client { margin-left: auto; display: flex; align-items: center; gap: var(--tt-space-2); font-size: 13px; color: var(--tt-text-secondary); }
.sr-client img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; object-position: center 20%; }
.sr-client b { font-weight: var(--tt-weight-label); color: var(--tt-text-primary); }
.sr-score, .sr-goals, .sr-call { padding: var(--tt-space-5) var(--tt-space-6); border-radius: var(--tt-radius-lg); }
.sr-label { margin: var(--tt-space-4) 0 var(--tt-space-1); font-size: 14px; line-height: 20px; font-weight: var(--tt-weight-label); color: var(--tt-text-tertiary); }
.sr-score .sr-label:first-child { margin-top: 0; }
.sr-pct { display: flex; align-items: center; gap: var(--tt-space-3); margin: 0; font-size: 40px; line-height: 48px; font-weight: var(--tt-weight-title); letter-spacing: -0.02em; }
.sr-pct .badge { font-size: 14px; }
.sr-text { margin: 0; font-size: 16px; line-height: 24px; color: var(--tt-text-primary); }
.sr-h { margin: 0 0 var(--tt-space-3); font-size: 16px; line-height: 24px; font-weight: var(--tt-weight-title); }
.sr-goals ul { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.sr-goals li { display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-4); padding: var(--tt-space-3) 0; font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.sr-goals li + li { border-top: 1px solid var(--tt-border); }
.sr-call .rp-chat { margin-top: 0; }
/* Calibrating a twin answer inside a session report. */
.sr-msg { align-self: flex-start; display: flex; flex-direction: column; gap: var(--tt-space-2); max-width: 78%; }
.sr-msg .rp-chat-line { max-width: none; }
.sr-msg .talk-feedback { padding-left: var(--tt-space-1); }
.sr-rated { display: flex; align-items: center; flex-wrap: wrap; gap: var(--tt-space-2) var(--tt-space-3); padding-left: var(--tt-space-1); }
.sr-rated .talk-pick { margin: 0; }
.sr-reasons { font-size: 13px; line-height: 18px; color: var(--tt-text-tertiary); }
.twin-off-quote { margin: 0; padding: var(--tt-space-3) var(--tt-space-4); border-radius: var(--tt-radius-md); background: var(--tt-fill-soft); font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.twin-off-dialog .role-traits { margin-top: var(--tt-space-1); }
.twin-off-dialog .twin-off-note { margin: 0; width: 100%; }
.twin-off-opt { font-weight: 400; color: var(--tt-text-tertiary); }
.sr-topics { display: flex; flex-wrap: wrap; gap: var(--tt-space-2); }
.sr-topics .rps-tag { font-size: 14px; line-height: 24px; padding: 4px 14px; }
.sr-score .sr-h { margin-bottom: var(--tt-space-3); }
.sr-calib { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--tt-space-2) var(--tt-space-3); margin: 0 0 var(--tt-space-3); font-size: 14px; line-height: 20px; color: var(--tt-text-tertiary); }
.sr-calib b { font-weight: var(--tt-weight-label); color: var(--tt-text-primary); }
/* More-menu item icons. */
.rp-row-menu button { display: flex; align-items: center; gap: var(--tt-space-3); justify-content: flex-start; }
.rp-row-menu button svg { flex: none; width: 16px; height: 16px; }

/* Icons read as secondary text: softer than the label beside them, still clearly dark. */
.menu button svg,
.btn--secondary svg,
.btn--ghost svg,
.icon-btn svg,
.create-bar-back svg,
.lib-mark svg,
.fast-follow-ico svg,
.home-ask-mode svg,
.home-section-link svg { color: var(--tt-text-secondary); }
.menu button.is-danger svg,
.rp-delete svg,
.btn--danger svg { color: var(--tt-danger); }
.btn--secondary:disabled svg,
.btn--ghost:disabled svg { color: inherit; }
/* Twin sessions filters, on the right of the header. */
.ts-filters { gap: var(--tt-space-3); }
.ts-filter { display: flex; align-items: center; gap: var(--tt-space-2); font-size: 13px; line-height: 20px; color: var(--tt-text-tertiary); }
.ts-filter .input { width: auto; max-width: 240px; height: 32px; padding-top: 0; padding-bottom: 0; border-radius: var(--tt-radius-pill); font-size: 13px; }
.ts-empty { margin: var(--tt-space-6) 0 0; color: var(--tt-text-tertiary); font-size: 14px; }
.rps-person-hero .rps-person-chip { position: absolute; top: var(--tt-space-3); right: var(--tt-space-3); z-index: 2; }
/* The grey conversation area runs edge to edge inside its card. */
.sr-call .rp-chat { margin-left: calc(var(--tt-space-6) * -1); margin-right: calc(var(--tt-space-6) * -1); border-radius: 0; padding-left: var(--tt-space-6); padding-right: var(--tt-space-6); }
.sr-call { padding-bottom: 0; }
/* Session header as a card: who and when on the left, the recording on the right. */
.sr-head { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--tt-space-6); padding: var(--tt-space-5) var(--tt-space-6); border-radius: var(--tt-radius-lg); }
.sr-head .sr-who { flex: 1; min-width: 0; flex-wrap: nowrap; align-items: center; }
.sr-head .sr-who-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.sr-head .sr-client { margin: var(--tt-space-3) 0 0; }
.sr-rec { flex: none; width: 240px; margin: 0; display: flex; flex-direction: column; gap: var(--tt-space-1); }
.sr-rec video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--tt-radius-md); background: var(--tt-fill-soft); object-fit: cover; }
.sr-rec figcaption { font-size: 12px; line-height: 16px; color: var(--tt-text-tertiary); }
@media (max-width: 720px) { .sr-head { flex-direction: column; align-items: stretch; } .sr-rec { width: 100%; } }
.sr-head .sr-sub { margin: 0; }
.sr-head .sr-name { margin: 0 0 2px; }
.sr-head .sr-who { gap: var(--tt-space-4); }
.sr-head .sr-client { font-size: 13px; line-height: 20px; }
.sr-head .sr-client img { width: 24px; height: 24px; }
/* Small avatar beside the name; the details sit under both. */
.sr-head .sr-who { display: block; }
.sr-name-row { display: flex; align-items: center; gap: var(--tt-space-2); }
.sr-head .sr-avatar { flex: none; width: 28px; height: 28px; font-size: 13px; }
.sr-head .sr-name { margin: 0; }
.sr-head .sr-name-row + .sr-sub { margin-top: var(--tt-space-2); }
.sr-call .rp-chat-line b { font-weight: var(--tt-weight-title); }
/* Persona detail page. */
.rps-person.is-clickable { cursor: pointer; transition: box-shadow var(--tt-duration-quick, 150ms) var(--tt-ease-standard, ease); }
.rps-person.is-clickable:hover { box-shadow: 0 2px 4px rgb(30 28 25 / 0.05), 0 12px 28px rgb(30 28 25 / 0.09); }
.rps-person.is-clickable:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }
.rpd { display: flex; flex-direction: column; gap: var(--tt-space-4); }
.rpd-hero { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: var(--tt-space-3); padding: var(--tt-space-6); border-radius: var(--tt-radius-lg); }
.rpd-photo { display: block; width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: center 15%; background: var(--tt-fill-soft); box-shadow: 0 0 0 4px var(--tt-surface), 0 2px 8px rgb(0 0 0 / 0.12); }
.rpd-chip { position: absolute; top: var(--tt-space-4); right: var(--tt-space-4); z-index: 2; }
.rpd-title { margin-top: var(--tt-space-1); }
.rpd-name { margin: 0; font-size: 28px; line-height: 36px; font-weight: var(--tt-weight-title); letter-spacing: -0.02em; }
.rpd-sub { margin: 2px 0 0; font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.rpd-card { padding: var(--tt-space-2) var(--tt-space-6); border-radius: var(--tt-radius-lg); }
.rpd-row { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: var(--tt-space-4); padding: var(--tt-space-4) 0; }
.rpd-row + .rpd-row { border-top: 1px solid var(--tt-border); }
.rpd-label { margin: 0; font-size: 14px; line-height: 22px; font-weight: var(--tt-weight-label); color: var(--tt-text-tertiary); }
.rpd-value p { margin: 0; font-size: 15px; line-height: 22px; color: var(--tt-text-primary); }
.rpd-value b { font-weight: var(--tt-weight-title); }
.rpd-voice { display: flex; align-items: center; gap: var(--tt-space-3); }
@media (max-width: 720px) { .rpd-row { grid-template-columns: 1fr; gap: var(--tt-space-1); } }
/* Persona cards: a round photo above the name, not a full cover image. */
.rps-person-hero { height: auto; display: flex; flex-direction: column; align-items: flex-start; gap: var(--tt-space-3); padding: var(--tt-space-5) var(--tt-space-5) 0; }
.rps-person-hero .rps-person-photo { position: static; inset: auto; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: center 15%; -webkit-mask-image: none; mask-image: none; box-shadow: 0 0 0 3px var(--tt-surface), 0 1px 6px rgb(0 0 0 / 0.12); }
.rps-person-hero .rps-person-photo--initial { font-size: 28px; }
.rps-person-hero .rps-person-title { position: static; margin-top: var(--tt-space-1); }
.rps-person-body { padding-top: var(--tt-space-4); }
/* Persona labels in capitals, like the other overlines. */
.rps-person-body .rps-person-label,
.rpd-label { text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; line-height: 16px; }
.rpd-label { padding-top: 3px; }
/* Voice name with a volume icon beside it: click to hear it. */
.rps-voice-line { display: flex; align-items: center; gap: var(--tt-space-2); }
.rps-voice-play { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--tt-text-secondary); cursor: pointer; }
.rps-voice-play:hover { background: var(--tt-fill-soft); color: var(--tt-text-primary); }
.rps-voice-play:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 1px; }
.rps-voice-play svg { width: 18px; height: 18px; }
.rps-voice-play.is-playing { color: var(--tt-primary); background: var(--tt-primary-subtle); }
.talk-bubble.talk-bubble--ask { background: var(--tt-caution-subtle); color: var(--tt-caution); }
/* Profile in the rail: a small card with the photo on the left and the name beside it. */
.rail-user { justify-content: flex-start; gap: var(--tt-space-3); padding: var(--tt-space-2) var(--tt-space-3) var(--tt-space-2) var(--tt-space-2); border: var(--tt-border-thin) solid var(--tt-card-border); border-radius: var(--tt-radius-md); background: var(--tt-surface); box-shadow: 0 1px 2px rgb(30 28 25 / 0.04), 0 2px 8px rgb(30 28 25 / 0.05); }
.rail-user:hover { background: var(--tt-surface-sunken); }
.rail-user-photo { flex: none; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; object-position: center 18%; background: var(--tt-fill-soft); }
.rail-user-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--tt-weight-label); }
.rail.is-collapsed .rail-user { justify-content: center; padding: 0; border: 0; background: transparent; box-shadow: none; }
.rail.is-collapsed .rail-user:hover { background: transparent; }
/* Headline numbers sit at the top of the Report card. */
.rp-analytics > .rp-detail-stats { margin: var(--tt-space-4) 0 var(--tt-space-5); }
.rp-detail-layout--bot > .rp-most-asked { grid-column: 1 / -1; }
/* Conversation rows: rounded hover, with the dividers drawn on the list items. */
.rp-history li + li { border-top: var(--tt-border-thin) solid var(--tt-border); }
.rp-history button { border-bottom: 0; border-radius: var(--tt-radius-md); width: calc(100% + 24px); margin-inline: -12px; padding-inline: 12px; }
/* End-of-call recap: the three calibration metrics sit just above the CTAs. */
.talk-end-metrics { width: min(560px, 100%); margin-top: var(--tt-space-8); gap: var(--tt-space-3); text-align: left; }
.talk-end-metrics .an-stat { padding-left: var(--tt-space-4); padding-right: var(--tt-space-4); }
.talk-end-metrics .overline { white-space: nowrap; letter-spacing: 0.06em; }
.talk-end-metrics + .talk-end-actions { margin-top: var(--tt-space-6); }
/* Twin cards: the quote bubble sits in the middle of the gradient. */
.rp-grid .rp-art--twin { display: flex; align-items: center; }
.rp-art--twin .rp-quote { flex: 1; min-width: 0; padding-block: var(--tt-space-4); }
/* Persona detail: the name and age sit beside the photo. */
.rpd-hero { flex-direction: row; align-items: center; gap: var(--tt-space-5); }
.rpd-title { margin-top: 0; }
/* Settings > Features: one card, one row per feature with an on/off switch. */
.features-card { padding: var(--tt-space-2) var(--tt-space-5); border-radius: var(--tt-radius-lg); }
/* Settings and Profile use the same page width and position as the Twin QnA page. */
.page--account { max-width: 1024px; margin: 0 auto; padding-left: var(--tt-space-16); padding-right: var(--tt-space-16); }

/* Course files hug their content instead of stretching across the card. */
.bot-files { align-items: flex-start; }
.bot-file { max-width: 100%; }
.bot-file .bot-file-text { flex: 0 1 auto; margin-right: var(--tt-space-3); }
/* Create twin: one card says the twin uses all your knowledge, with a switch. */
.bot-know-card { display: flex; align-items: center; gap: var(--tt-space-3); padding: var(--tt-space-3) var(--tt-space-4); border: 1px solid var(--tt-border); border-radius: var(--tt-radius-md); background: var(--tt-surface); }
.bot-know-card .bot-know-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
/* Create / edit twin: chevron on the All your knowledge card opens the list of sources. */
.bot-know-more { flex: none; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--tt-text-secondary); cursor: pointer; }
.bot-know-more:hover { background: var(--tt-fill-soft); color: var(--tt-text-primary); }
.bot-know-more:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }
.bot-know-more svg { width: 16px; height: 16px; }
.bot-know-dialog .bot-know-list { width: 100%; border: 1px solid var(--tt-border); }

/* Persona tiles: a small edit icon sits right after the name. */
div.rpa-person { cursor: pointer; }
div.rpa-person:focus-visible .rpa-photo { outline: 2px solid var(--tt-primary); outline-offset: 2px; }
.rpa-name-row { display: inline-flex; align-items: center; gap: 2px; margin-top: var(--tt-space-2); }
.rpa-name-row .rpa-name { margin-top: 0; }
.rpa-edit { flex: none; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--tt-text-tertiary); cursor: pointer; }
.rpa-edit:hover { background: var(--tt-fill-soft); color: var(--tt-text-primary); }
.rpa-edit:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 1px; }
.rpa-edit svg { width: 14px; height: 14px; }
/* The edit icon on a persona tile shows when the tile or its name is hovered. */
.rpa-person .rpa-edit { opacity: 0; transition: opacity var(--tt-duration-quick, 150ms) var(--tt-ease-standard, ease); }
.rpa-person:hover .rpa-edit, .rpa-person:focus-within .rpa-edit, .rpa-edit:focus-visible { opacity: 1; }
/* Scoring rubric: name and points on each row, with a row to add more scores. */
.role-rubric li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--tt-space-3); }
.role-rubric-pts { color: var(--tt-text-secondary); font-size: 14px; }
.role-rubric-add { display: flex; flex-direction: row; flex-wrap: wrap; gap: var(--tt-space-2); align-items: center; }
.role-rubric-add > .input:first-of-type { flex: 1 1 220px; min-width: 0; height: 40px; }
.role-rubric-points-input { flex: 0 0 96px; width: 96px; height: 40px; }
/* Session report: the scoring rubric card, one line per score with the points earned. */
.sr-rubric { padding: var(--tt-space-5) var(--tt-space-6); border-radius: var(--tt-radius-lg); }
.sr-rubric-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--tt-space-4); }
.sr-rubric-total { margin: 0; font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.sr-rubric-total b { font-size: 18px; line-height: 24px; font-weight: var(--tt-weight-title); color: var(--tt-text-primary); }
.sr-rubric ul { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.sr-rubric li { display: grid; grid-template-columns: minmax(0, 1fr) 120px 64px; align-items: center; gap: var(--tt-space-4); padding: var(--tt-space-3) 0; font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.sr-rubric li + li { border-top: 1px solid var(--tt-border); }
.sr-rubric-bar { display: block; height: 6px; border-radius: var(--tt-radius-pill); background: var(--tt-fill-soft); overflow: hidden; }
.sr-rubric-bar span { display: block; height: 100%; border-radius: inherit; background: var(--tt-primary); }
.sr-rubric-pts { text-align: right; color: var(--tt-text-primary); }
@media (max-width: 640px) { .sr-rubric li { grid-template-columns: minmax(0, 1fr) 64px; } .sr-rubric-bar { display: none; } }
/* Roleplay detail: each conversation shows its overall rubric score on the right. */
.rp-history button:has(.rp-history-score) { grid-template-columns: 40px minmax(0, 1fr) auto; }
.rp-history-score { align-self: center; padding-left: var(--tt-space-4); font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); white-space: nowrap; }
.rp-history-score b { font-size: 16px; line-height: 24px; font-weight: var(--tt-weight-title); color: var(--tt-text-primary); }
/* Build roleplay: the three suggestions sit in one row just above the type field. */
.tee-suggestions { flex-direction: row; flex-wrap: wrap; margin-top: var(--tt-space-4); }
/* Call room: attach a file or image from the controls or from the chat box. */
.demo-attach { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--tt-radius-pill); background: transparent; color: var(--tt-text-secondary); cursor: pointer; }
.demo-attach:hover { background: var(--tt-fill-soft); color: var(--tt-text-primary); }
.demo-attach:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }
.demo-attach svg { width: 20px; height: 20px; }
.demo-attach-img { display: block; max-width: 220px; max-height: 160px; margin-top: var(--tt-space-1); border-radius: var(--tt-radius-md); object-fit: cover; }
.demo-file { display: inline-flex; align-items: center; gap: var(--tt-space-2); max-width: 100%; margin-top: var(--tt-space-1); padding: 6px 12px; border-radius: var(--tt-radius-pill); background: var(--tt-fill-soft); color: var(--tt-text-primary); font-size: 13px; line-height: 18px; }
.demo-file svg { width: 14px; height: 14px; flex: none; }
.demo-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Call room: your card sits beside the twin's circle; while sharing the screen it moves to the bottom right. */
.demo-stage { gap: var(--tt-space-8); }
.demo-stage > .demo-self { position: relative; right: auto; bottom: auto; z-index: 1; flex: none; width: 288px; height: 216px; border-radius: 24px; }
.demo-stage > .demo-self .demo-self-avatar { width: 96px; height: 96px; font-size: 36px; }
.demo-stage > .demo-self .demo-self-label { left: var(--tt-space-4); bottom: var(--tt-space-3); }
.demo-stage > .demo-self .demo-self-mic { right: var(--tt-space-4); bottom: var(--tt-space-3); }
/* Call room: the twin and you are two matching boxes side by side. */
.demo-stage .demo-avatar-wrap { flex: none; width: 288px; height: 216px; }
.demo-stage .demo-avatar { width: 100%; height: 100%; border-radius: 24px; box-shadow: var(--tt-elevation-2); }
.demo-stage .demo-avatar-wrap .demo-speaking { position: absolute; top: var(--tt-space-3); left: var(--tt-space-3); padding: 3px 10px; border-radius: var(--tt-radius-pill); background: rgb(0 0 0 / 0.5); color: #fff; font-size: 12px; line-height: 18px; }
.demo-stage .demo-avatar-wrap .demo-speaker-name { position: absolute; left: var(--tt-space-4); bottom: var(--tt-space-3); padding: 3px 10px; border-radius: var(--tt-radius-pill); background: rgb(0 0 0 / 0.5); color: #fff; font-size: 12px; line-height: 18px; }
/* Call room: your card is black, with light text. */
.demo-self:not(.demo-self--twin),
.demo-share ~ .demo-pip-stack .demo-self:not(.demo-self--twin) { background: var(--tt-text-primary); color: #fff; box-shadow: var(--tt-elevation-2); }
.demo-self:not(.demo-self--twin) .demo-self-avatar { background: rgb(255 255 255 / 0.14); color: #fff; }
.demo-self:not(.demo-self--twin) .demo-self-label { color: #fff; }
.demo-self:not(.demo-self--twin) .demo-self-mic { color: rgb(255 255 255 / 0.7); }

/* Create twin: while the prompt is matched against the knowledge base, a nine-dot loader sits where the toggle goes. */
.bot-know-loader { flex: none; display: inline-flex; align-items: center; padding-right: var(--tt-space-1); }
.bot-know-loader .lattice-loader.lattice-loader--mini { --ll-cell: 5px; --ll-gap: 2px; color: var(--tt-text-primary); }
.bot-know-match { flex: none; padding: 4px 10px; border: 0; border-radius: var(--tt-radius-pill); background: transparent; color: var(--tt-text-secondary); font: inherit; font-size: 13px; line-height: 18px; white-space: nowrap; cursor: pointer; }
.bot-know-match:hover { background: var(--tt-fill-soft); color: var(--tt-text-primary); }
.bot-know-match:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }
/* Create twin: the collapsed use-case title matches the prompt card title above it. */
.bot-card .role-manual-title { font-size: 15px; line-height: 22px; font-weight: 600; }
.bot-seg { margin: 0 0 var(--tt-space-4); }

/* Use-case details: the date range reuses the type dropdown, outlined, with its menu aligned to the right edge. */
.bot-range { margin-left: 0; }
.bot-range .home-ask-mode { height: 32px; padding: 0 var(--tt-space-3) 0 var(--tt-space-4); gap: var(--tt-space-2); border: var(--tt-border-form) solid var(--tt-border-field); background: var(--tt-surface); color: var(--tt-text-primary); font-size: 13px; }
.bot-range .home-ask-mode:hover { border-color: var(--tt-border-interactive); background: var(--tt-surface); }
.bot-range .twin-hero-ask-menu { left: auto; right: 0; min-width: 100%; }

/* Use case ready: the description is a narrower, centred column; two buttons sit side by side. */
.bot-preview-head .bot-desc-input { width: 100%; max-width: 520px; margin: 0 auto; }
.bot-preview-body .bot-cal-foot { gap: var(--tt-space-3); }

/* Twin sessions: Learners table. */
.twin-bots-head .seg { flex: none; }
.an-row--learners { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.5fr) 120px 130px minmax(0, 1.3fr); }
.lr-name { display: flex; align-items: center; gap: var(--tt-space-3); min-width: 0; font-weight: var(--tt-weight-label); }
.lr-name .rp-avatar { flex: none; width: 28px; height: 28px; font-size: 12px; }
.lr-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-usage { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lr-bar { display: block; height: 6px; border-radius: var(--tt-radius-pill); background: var(--tt-fill-soft); overflow: hidden; }
.lr-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--tt-text-primary); }
.lr-bar.is-high > span { background: var(--tt-caution); }
.lr-text { color: var(--tt-text-secondary); font-size: 13px; line-height: 18px; }
@media (max-width: 860px) {
  .an-row--learners { grid-template-columns: minmax(0, 1fr) 90px 110px minmax(0, 1.2fr); }
  .lr-email { display: none; }
}

/* Assign minutes, before the learner link is made. */
.bot-credit-input { position: relative; flex: 1; min-width: 0; }
.bot-credit-input .input { width: 100%; padding-right: 48px; }
.bot-credit-unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--tt-text-secondary); font-size: 14px; pointer-events: none; }
.bot-credit-presets { display: flex; flex-wrap: wrap; gap: var(--tt-space-2); margin-top: var(--tt-space-3); }
.bot-credit-chip { padding: 4px 12px; border: 0; border-radius: var(--tt-radius-pill); background: var(--tt-surface); box-shadow: inset 0 0 0 1px var(--tt-border); color: var(--tt-text-secondary); font: inherit; font-size: 13px; line-height: 20px; cursor: pointer; }
.bot-credit-chip:hover { color: var(--tt-text-primary); box-shadow: inset 0 0 0 1px var(--tt-border-interactive); }
.bot-credit-chip[aria-pressed="true"] { color: var(--tt-text-primary); background: var(--tt-fill-soft); box-shadow: inset 0 0 0 1px var(--tt-text-primary); }
.bot-credit-chip:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }
.bot-credit-note { color: var(--tt-text-secondary); font-weight: var(--tt-weight-body); }
.bot-preview-link .hint-below { text-align: left; }

/* Minutes left in Olga's pool, beside Create new on Twin Agents. */
.credit-pill { display: inline-flex; align-items: center; gap: var(--tt-space-2); height: 32px; padding: 0 var(--tt-space-4); border-radius: var(--tt-radius-pill); background: var(--tt-fill-soft); color: var(--tt-text-secondary); font-size: 13px; line-height: 20px; white-space: nowrap; }
.credit-pill .tabular { color: var(--tt-text-primary); font-weight: var(--tt-weight-label); margin-right: -4px; }
.credit-pill-bar { display: block; width: 36px; height: 4px; border-radius: var(--tt-radius-pill); background: var(--tt-border); overflow: hidden; }
.credit-pill-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--tt-text-primary); }
.credit-pill.is-low .credit-pill-bar > span { background: var(--tt-caution); }
.lib-head .lib-tools { display: flex; align-items: center; gap: var(--tt-space-3); }

.credit-pill { border: 0; font: inherit; font-size: 13px; cursor: pointer; }
.credit-pill:hover { background: var(--tt-border); }
.credit-pill:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }
/* Credit usage popup. */
.credit-dialog .credit-rows { width: 100%; display: flex; flex-direction: column; border: 1px solid var(--tt-border); border-radius: var(--tt-radius-md); }
.credit-row { padding: var(--tt-space-4); display: flex; flex-direction: column; gap: var(--tt-space-2); }
.credit-row + .credit-row { border-top: 1px solid var(--tt-border); }
.credit-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--tt-space-3); }
.credit-row-name { font-size: 14px; line-height: 20px; font-weight: var(--tt-weight-label); }
.credit-row-value { font-size: 18px; line-height: 24px; font-weight: var(--tt-weight-title); }
.credit-row-bar { display: block; height: 6px; border-radius: var(--tt-radius-pill); background: var(--tt-fill-soft); overflow: hidden; }
.credit-row-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--tt-text-primary); }
.credit-row-note { margin: 0; color: var(--tt-text-secondary); font-size: 13px; line-height: 18px; }

/* Call room on a phone: brand and report on one row, the title under them, the timer centred at the top,
   the two cards stacked, and the controls centred at the bottom. */
@media (max-width: 640px) {
  .demo-top { height: auto; flex-wrap: wrap; align-items: center; gap: 2px 8px; padding: 10px var(--tt-space-4) 40px; }
  .demo-brand { flex: 1 1 auto; }
  .demo-top-end { flex: none; }
  .demo-pill-btn { width: 36px; height: 36px; padding: 0; justify-content: center; gap: 0; font-size: 0; }
  .demo-title { order: 3; flex: 0 0 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 20px; }
  .demo-room .demo-timer { position: absolute; top: 88px; left: 0; right: 0; width: max-content; min-width: 0; margin: 0 auto; text-align: center; }
  .demo-stage { flex-direction: column; gap: var(--tt-space-4); }
  .demo-stage > .demo-self, .demo-stage .demo-avatar-wrap { width: min(288px, calc(100% - 32px)); }
  .demo-room .demo-controls { height: auto; flex-direction: column; align-items: center; justify-content: center; gap: var(--tt-space-3); padding: var(--tt-space-3) var(--tt-space-4) var(--tt-space-5); }
  .demo-room .demo-controls .demo-end { min-width: 0; padding: 0 var(--tt-space-4); }
  /* Chat open: it takes the whole area under the header instead of sitting beside the cards. */
  .demo-body { padding-left: var(--tt-space-4); padding-right: var(--tt-space-4); }
  .demo-chat { flex: 1 1 0; width: 100%; min-width: 0; }
  .demo-body:has(.demo-chat:not(.is-hidden)) .demo-stage { display: none; }
}

/* Switch between web and mobile view in the call room: the room becomes a phone-sized frame that reuses the phone layout above. */
.demo-view { display: inline-flex; align-items: center; gap: 2px; padding: 3px; margin-right: var(--tt-space-3); border-radius: var(--tt-radius-pill); background: var(--tt-fill-soft); }
.demo-view button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: var(--tt-radius-pill); background: transparent; color: var(--tt-text-secondary); cursor: pointer; }
.demo-view button svg { width: 16px; height: 16px; }
.demo-view button:hover { color: var(--tt-text-primary); }
.demo-view button[aria-pressed="true"] { background: var(--tt-surface); color: var(--tt-text-primary); box-shadow: var(--tt-elevation-1), inset 0 0 0 1px var(--tt-border); }
.demo-view button:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }
.demo-top-end { align-items: center; }
/* Mobile view: the header stays as it is; only the call itself (cards and controls) sits in a phone-sized frame. */
.demo-room--phone { align-items: stretch; }
.demo-phone { position: relative; flex: 1 1 0; min-height: 0; width: 390px; max-width: calc(100% - 32px); margin: 0 auto var(--tt-space-4); display: flex; flex-direction: column; border-radius: 36px; border: 1px solid var(--tt-border); background: var(--tt-surface); box-shadow: var(--tt-elevation-3); overflow: hidden; }
.demo-phone .demo-body { flex: 1 1 0; padding: 44px var(--tt-space-4) 0; }
.demo-phone .demo-phone-bar { position: absolute; top: 10px; left: var(--tt-space-4); right: var(--tt-space-4); z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-2); }
.demo-phone .demo-timer { position: static; width: auto; min-width: 0; margin: 0; text-align: left; }
.demo-phone .demo-phone-bar .demo-pill-btn { flex: none; border-color: transparent; background: transparent; box-shadow: none; padding: 0; height: 28px; }
.demo-phone .demo-stage { flex-direction: column; gap: var(--tt-space-4); }
.demo-phone .demo-stage > .demo-self, .demo-phone .demo-stage .demo-avatar-wrap { width: min(288px, calc(100% - 32px)); }
.demo-phone .demo-controls { height: auto; flex-direction: column; align-items: center; justify-content: center; gap: var(--tt-space-3); padding: var(--tt-space-3) var(--tt-space-4) var(--tt-space-5); }
.demo-phone .demo-controls .demo-end { min-width: 0; padding: 0 var(--tt-space-4); }
.demo-phone .demo-chat { flex: 1 1 0; width: 100%; min-width: 0; }
.demo-phone .demo-body:has(.demo-chat:not(.is-hidden)) .demo-stage { display: none; }

/* Call controls: an active button (chat open, screen shared) lifts to white on the grey cluster so it reads at a glance. */
.demo-ctrl.is-active, .demo-ctrl.is-active:hover { background: var(--tt-surface); color: var(--tt-text-primary); box-shadow: var(--tt-elevation-1), inset 0 0 0 1px var(--tt-border); }
@media (max-width: 640px) { .demo-view { display: none; } }

/* While the twin looks at a shared file: the speaking pill turns into a nine-dot loader and "Thinking…". */
.demo-thinking-loader { display: inline-flex; align-items: center; flex: none; }
.demo-thinking-loader .lattice-loader.lattice-loader--mini { --ll-cell: 4px; --ll-gap: 2px; color: currentColor; }
.demo-bubble--thinking { display: inline-flex; align-items: center; gap: var(--tt-space-2); color: var(--tt-text-secondary); }

.demo-avatar video, video.demo-self-photo { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Searchable filter menu (Learner): a wider list with the email under each name and a search box on top. */
.twin-hero-ask-opt[hidden] { display: none; }
.dd-wide .twin-hero-ask-menu { width: 320px; max-height: 360px; overflow-y: auto; }
.dd-search-wrap { position: relative; align-self: stretch; margin-bottom: var(--tt-space-1); }
.dd-search-wrap svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--tt-text-secondary); pointer-events: none; }
.dd-search, .assign-search { box-sizing: border-box; width: 100%; height: 36px; padding-left: 36px; border-radius: var(--tt-radius-pill); font-size: 13px; }
.twin-hero-ask-opt.has-sub { flex-direction: column; align-items: flex-start; gap: 0; }
.dd-opt-name { font-size: 14px; line-height: 20px; color: var(--tt-text-primary); }
.dd-opt-sub { font-size: 12px; line-height: 16px; color: var(--tt-text-secondary); }
.dd-empty { margin: 0; padding: var(--tt-space-3); color: var(--tt-text-secondary); font-size: 13px; text-align: center; }

/* Twin sessions filters: fixed width, long names truncate instead of stretching the button. */
.ts-filters .bot-range .home-ask-mode { width: 180px; justify-content: space-between; }
.ts-filters .bot-range .home-ask-mode > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }

.an-row--ruser { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) 150px 100px; }
@media (max-width: 860px) { .an-row--ruser { grid-template-columns: minmax(0, 1fr) 130px 80px; } }

.create-bar-end { display: flex; align-items: center; gap: var(--tt-space-3); }
.create-bar-end .btn svg { width: 16px; height: 16px; flex: none; }

/* Sessions stat on a use case: "View" on the right goes to that agent's session history. */
.rp-stat--link { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--tt-space-2); }
.rp-stat-view { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; height: 12px; margin: 0 -8px 0 0; border: 0; border-radius: var(--tt-radius-pill); background: transparent; color: inherit; font: inherit; font-size: 13px; line-height: 18px; font-weight: var(--tt-weight-label); cursor: pointer; }
.rp-stat-view svg { width: 14px; height: 14px; flex: none; }
.rp-stat-view:hover { text-decoration: underline; text-underline-offset: 3px; }
.rp-stat-view:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }

/* Usage credit on a use case: assigned minutes against used, pinned to the bottom of the details card. */
.rp-detail-credit { margin-top: auto; padding: var(--tt-space-4) var(--tt-space-5); border-radius: var(--tt-radius-md); background: var(--tt-fill-soft); display: flex; flex-direction: column; gap: var(--tt-space-2); }
.rp-detail-credit .credit-row-bar { background: var(--tt-surface); }
.rp-detail-credit .rp-detail-kicker { margin: 0; }
.rp-detail-credit-value { margin: 0; font-size: 18px; line-height: 24px; font-weight: var(--tt-weight-title); }
.rp-detail-credit-value .an-muted { font-size: 14px; font-weight: var(--tt-weight-body); }
.credit-row-bar.is-high > span { background: var(--tt-caution); }
.ts-filter .dd-search { width: 100%; max-width: none; height: 36px; }

/* Rubric points: edited in place. */
.role-rubric-pts { display: inline-flex; align-items: center; gap: var(--tt-space-2); white-space: nowrap; }
.role-rubric-pts-input { width: 64px; height: 32px; padding: 0 var(--tt-space-2); text-align: right; font-size: 14px; }

/* Olga's persona sits alone above the library; the next heading gets a little room. */
.rps-people.rps-people--own, .page--wide .rps-people.rps-people--own { grid-template-columns: minmax(0, 1fr); }
.rps-people--own .rps-person { position: relative; display: grid; grid-template-columns: 260px minmax(0, 1fr); align-items: center; }
.rps-people--own .rps-person-hero { position: static; }
.rps-people--own .rps-person-hero .rps-person-chip { top: var(--tt-space-4); right: var(--tt-space-4); }
.rps-people--own .rps-person-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) minmax(0, 0.9fr) minmax(0, 0.9fr); gap: var(--tt-space-6); align-items: start; padding: var(--tt-space-10) var(--tt-space-5) var(--tt-space-5) 0; }
@media (max-width: 960px) {
  .rps-people--own .rps-person { grid-template-columns: minmax(0, 1fr); }
  .rps-people--own .rps-person-body { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: var(--tt-space-4) var(--tt-space-5) var(--tt-space-5); }
}
.rps-panel-head--next { margin-top: var(--tt-space-8); }

/* Assign roleplay dialog. */
.assign-dialog { width: min(480px, calc(100vw - 32px)); }
.assign-dialog .dd-search-wrap { width: 100%; align-self: stretch; margin-bottom: 0; }
.assign-list { width: 100%; max-height: 340px; overflow-y: auto; border: 1px solid var(--tt-border); border-radius: var(--tt-radius-md); }
.assign-row { display: flex; align-items: center; gap: var(--tt-space-3); padding: var(--tt-space-3) var(--tt-space-4); }
.assign-row[hidden] { display: none; }
.assign-row + .assign-row { border-top: 1px solid var(--tt-border); }
.assign-row .rp-avatar { flex: none; width: 32px; height: 32px; font-size: 13px; }
.assign-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.assign-name { font-size: 14px; line-height: 20px; font-weight: var(--tt-weight-label); }
.assign-sub { font-size: 12px; line-height: 16px; color: var(--tt-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assign-row .btn { flex: none; min-width: 84px; }
.assign-status { flex: none; margin-right: var(--tt-space-3); background: var(--tt-fill-soft); color: var(--tt-text-secondary); }

/* Roleplay details: members table. */
.an-row--member { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.5fr) 110px 92px; }
.rp-members .lr-table { margin-top: var(--tt-space-3); box-shadow: none; }
.lr-name-text { display: flex; flex-direction: column; min-width: 0; }
.lr-name-text .lr-sub { font-weight: var(--tt-weight-body); }
.an-row--member .rp-row-more { margin: -8px -8px -8px 0; }
@media (max-width: 860px) { .an-row--member { grid-template-columns: minmax(0, 1fr) 90px 92px; } }
.an-row--member .btn--strong { min-width: 76px; }
/* Members sit straight on the page: the table is the card, so no second card around it. */
.rp-detail-layout .rp-members.rp-analytics { padding: 0; border: 0; background: transparent; box-shadow: none; border-radius: 0; }
.rp-members .rp-analytics-title { margin-bottom: 0; }
.an-row--member .an-end { justify-self: end; display: flex; justify-content: flex-end; }
/* The ⋮ dots line up with the right edge of the Assign button above and below them. */
.an-row--member .rp-row-more { margin: -8px -12px -8px 0; }

/* Assign dialog: rows are checkable; people already assigned show ticked, dimmed and tagged. */
label.assign-row { cursor: pointer; }
label.assign-row:hover { background: var(--tt-fill-soft); }
.assign-row.is-done { cursor: default; }
.assign-row.is-done:hover { background: transparent; }
.assign-row.is-done .assign-who, .assign-row.is-done .rp-avatar { opacity: 0.6; }
.assign-row .check { flex: none; }

/* A calm confirm (assign / unassign): the tile is neutral, not the red delete tile. */
.confirm-dialog--calm .confirm-tile-in { color: var(--tt-text-primary); }

/* Practice report after "Try as learner" on a roleplay. */
.cal-detail.rr-report { max-width: 1080px; display: flex; flex-direction: column; gap: var(--tt-space-4); }
.rr-head { padding: var(--tt-space-6); border-radius: var(--tt-radius-lg); display: flex; flex-direction: column; gap: var(--tt-space-5); }
.rr-head-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--tt-space-4); flex-wrap: wrap; }
.rr-title { margin: var(--tt-space-1) 0 0; font-size: 24px; line-height: 32px; font-weight: var(--tt-weight-title); letter-spacing: -0.015em; }
.rr-head-text .sr-sub b { color: var(--tt-text-primary); font-weight: var(--tt-weight-label); }
.rr-actions { display: flex; gap: var(--tt-space-2); flex-wrap: wrap; }
.rr-score { display: flex; align-items: center; gap: var(--tt-space-6); padding: var(--tt-space-5); border-radius: var(--tt-radius-md); background: var(--tt-surface-sunken); flex-wrap: wrap; }
.rr-ring-wrap { position: relative; width: 112px; height: 112px; flex: none; }
.rr-ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rr-track { fill: none; stroke: var(--tt-border); stroke-width: 8; }
.rr-arc { fill: none; stroke: var(--tt-success); stroke-width: 8; stroke-linecap: round; }
.rr-arc.is-low { stroke: var(--tt-caution); }
.rr-ring-num { position: absolute; inset: 0; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.rr-ring-num b { font-size: 32px; font-weight: var(--tt-weight-title); letter-spacing: -0.02em; }
.rr-ring-num span { margin-top: 4px; font-size: 12px; color: var(--tt-text-tertiary); }
.rr-verdict { display: flex; flex-direction: column; gap: var(--tt-space-1); align-items: flex-start; min-width: 0; flex: 1 1 260px; }
.rr-verdict-title { margin: var(--tt-space-1) 0 0; font-size: 18px; line-height: 24px; font-weight: var(--tt-weight-title); }
.rr-verdict-sub { margin: 0; font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.rr-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--tt-space-3); width: 100%; }
.rr-stat .an-value { font-size: 22px; line-height: 28px; }
.rr-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--tt-space-4); align-items: start; }
.rr-main, .rr-side { display: flex; flex-direction: column; gap: var(--tt-space-4); min-width: 0; }
.rr-card { padding: var(--tt-space-5) var(--tt-space-6); border-radius: var(--tt-radius-lg); }
.rr-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-3); margin-bottom: var(--tt-space-3); }
.rr-card-head .sr-h { margin: 0; }
.rr-radar-row { display: flex; align-items: center; gap: var(--tt-space-6); flex-wrap: wrap; }
.rr-radar { width: 220px; height: 220px; flex: none; overflow: visible; }
.rr-ring { fill: none; stroke: var(--tt-border); stroke-width: 1; }
.rr-bench { fill: none; stroke: var(--tt-text-tertiary); stroke-width: 1; stroke-dasharray: 3 3; }
.rr-you { fill: rgb(26 103 57 / 0.18); stroke: var(--tt-success); stroke-width: 2; stroke-linejoin: round; }
.rr-dot { fill: var(--tt-success); }
.rr-legend { display: flex; flex-direction: column; gap: var(--tt-space-2); font-size: 14px; color: var(--tt-text-secondary); }
.rr-legend p { margin: 0; display: flex; align-items: center; gap: var(--tt-space-2); }
.rr-key { width: 14px; height: 0; border-top: 3px solid var(--tt-success); border-radius: 2px; }
.rr-key--bench { border-top: 2px dashed var(--tt-text-tertiary); }
.rr-bars { list-style: none; margin: var(--tt-space-4) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--tt-space-4); }
.rr-bar-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--tt-space-3); }
.rr-bar-name { font-size: 14px; line-height: 20px; font-weight: var(--tt-weight-label); }
.rr-bar-pts { font-size: 14px; color: var(--tt-text-secondary); }
.rr-bar-pts b { color: var(--tt-text-primary); font-weight: var(--tt-weight-title); }
.rr-bar { position: relative; display: block; height: 8px; margin-top: 6px; border-radius: var(--tt-radius-pill); background: var(--tt-fill-soft); overflow: visible; }
.rr-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--tt-success); }
.rr-bar.is-low > span { background: var(--tt-caution); }
.rr-bar > i { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--tt-text-tertiary); border-radius: 1px; }
.rr-bar-note { margin: 4px 0 0; font-size: 12px; line-height: 16px; color: var(--tt-text-tertiary); }
.rr-goals { list-style: none; margin: 0; padding: 0; }
.rr-goals li { display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-4); padding: var(--tt-space-3) 0; font-size: 14px; line-height: 20px; }
.rr-goals li + li { border-top: 1px solid var(--tt-border); }
.rr-h--good, .rr-h--grow { display: flex; align-items: center; gap: var(--tt-space-2); }
.rr-notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--tt-space-4); }
.rr-notes li { display: flex; gap: var(--tt-space-3); align-items: flex-start; }
.rr-note-ico { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; }
.rr-note-ico svg { width: 15px; height: 15px; }
.rr-note-ico--good { background: var(--tt-success); }
.rr-note-ico--grow { background: var(--tt-caution); }
.rr-note-row { display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-2); }
.rr-note-title { margin: 0; font-size: 14px; line-height: 20px; font-weight: var(--tt-weight-label); }
.rr-note-text { margin: 2px 0 0; font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.rr-jump { flex: none; padding: 0; border: 0; background: transparent; color: var(--tt-info); font: inherit; font-size: 13px; font-weight: var(--tt-weight-label); cursor: pointer; }
.rr-jump:hover { text-decoration: underline; text-underline-offset: 3px; }
.rr-video { width: 100%; border-radius: var(--tt-radius-md); background: #000; aspect-ratio: 16 / 9; object-fit: cover; }
.rr-marks { display: flex; flex-wrap: wrap; gap: var(--tt-space-2); margin-top: var(--tt-space-3); }
.rr-mark { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 0; border-radius: var(--tt-radius-pill); background: var(--tt-fill-soft); color: var(--tt-text-secondary); font: inherit; font-size: 13px; line-height: 20px; cursor: pointer; }
.rr-mark .tabular { color: var(--tt-text-primary); font-weight: var(--tt-weight-label); }
.rr-mark:hover { background: var(--tt-border); color: var(--tt-text-primary); }
.rr-mark--success .tabular { color: var(--tt-success); }
.rr-mark--caution .tabular { color: var(--tt-caution); }
.rr-mark--info .tabular { color: var(--tt-info); }
.rr-next { display: flex; flex-direction: column; align-items: flex-start; gap: var(--tt-space-2); }
.rr-next .sr-h { margin: 0; }
.rr-next .btn { margin-top: var(--tt-space-2); }
@media (max-width: 900px) {
  .rr-grid { grid-template-columns: minmax(0, 1fr); }
  .rr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Practice report skills: name on the left, the bar beside the score on the right. */
.rr-bars li { display: grid; grid-template-columns: minmax(0, 1fr) 126px 56px; align-items: center; column-gap: var(--tt-space-4); }
.rr-bars .rr-bar-top { display: contents; }
.rr-bars .rr-bar-name { grid-column: 1; grid-row: 1; }
.rr-bars .rr-bar { grid-column: 2; grid-row: 1; margin: 0; }
.rr-bars .rr-bar-pts { grid-column: 3; grid-row: 1; text-align: right; white-space: nowrap; }
@media (max-width: 640px) { .rr-bars li { grid-template-columns: minmax(0, 1fr) 56px; row-gap: 6px; } .rr-bars .rr-bar { grid-column: 1 / -1; grid-row: 2; } }

/* NPS after a twin call. */
.nps-dialog { width: min(520px, calc(100vw - 32px)); }
.nps-scale { width: 100%; display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; }
.nps-dot { height: 40px; padding: 0; border: 0; border-radius: var(--tt-radius-md); background: var(--tt-surface); box-shadow: inset 0 0 0 1px var(--tt-border); color: var(--tt-text-primary); font: inherit; font-size: 14px; font-weight: var(--tt-weight-label); cursor: pointer; }
.nps-dot:hover { box-shadow: inset 0 0 0 1px var(--tt-text-tertiary); background: var(--tt-fill-soft); }
.nps-dot.is-on, .nps-dot.is-on:hover { background: var(--tt-text-primary); color: var(--tt-surface); box-shadow: none; }
.nps-dot:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }
.nps-ends { width: 100%; display: flex; justify-content: space-between; margin-top: calc(var(--tt-space-1) * -1); color: var(--tt-text-secondary); font-size: 12px; line-height: 16px; }
.nps-field { width: 100%; }
.nps-field.is-off { opacity: 0.5; }

/* The recording sits in the score panel, right beside the verdict. */
.rr-score { align-items: center; }
.rr-rec { flex: 0 1 340px; min-width: 260px; margin-left: auto; display: flex; flex-direction: column; gap: var(--tt-space-2); }
.rr-rec .overline { margin: 0; }
.rr-rec .rr-marks { margin-top: var(--tt-space-1); }
.rr-score .rr-verdict { flex: 1 1 200px; }
@media (max-width: 900px) { .rr-rec { flex: 1 1 100%; margin-left: 0; } }

/* Transcript: the grey chat area runs edge to edge in the card, flush with the bottom. */
.rr-card--transcript { overflow: hidden; }
.rr-card--transcript .rp-chat { margin: var(--tt-space-3) calc(var(--tt-space-6) * -1) calc(var(--tt-space-5) * -1); padding: var(--tt-space-4) var(--tt-space-6) var(--tt-space-5); border-radius: 0; }

/* Practice report layout: Score by skill and Goals share the first row at the same height. */
.rr-grid { align-items: stretch; }
.rr-main, .rr-side { display: contents; }
.rr-c-skills { grid-column: 1; grid-row: 1; }
.rr-c-goals { grid-column: 2; grid-row: 1; }
.rr-card--transcript { grid-column: 1; grid-row: 2 / span 2; align-self: start; }
.rr-c-well { grid-column: 2; grid-row: 2; align-self: start; }
.rr-c-work { grid-column: 2; grid-row: 3; align-self: start; }
@media (max-width: 900px) {
  .rr-c-skills, .rr-c-goals, .rr-card--transcript, .rr-c-well, .rr-c-work { grid-column: 1; grid-row: auto; }
}

/* Twin agent assign: how many minutes each ticked learner gets. */
.assign-mins { display: inline-flex; align-items: center; gap: 4px; margin-top: var(--tt-space-2); flex-wrap: wrap; }
.assign-mins[hidden] { display: none; }
.assign-mins-label { margin-right: 4px; color: var(--tt-text-secondary); font-size: 12px; line-height: 16px; }
.assign-min { min-width: 40px; height: 26px; padding: 0 10px; border: 0; border-radius: var(--tt-radius-pill); background: var(--tt-surface); box-shadow: inset 0 0 0 1px var(--tt-border); color: var(--tt-text-secondary); font: inherit; font-size: 12px; font-weight: var(--tt-weight-label); cursor: pointer; }
.assign-min:hover { color: var(--tt-text-primary); box-shadow: inset 0 0 0 1px var(--tt-text-tertiary); }
.assign-min[aria-pressed="true"] { background: var(--tt-text-primary); color: var(--tt-surface); box-shadow: none; }
.assign-min:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }

/* Minutes of access for a ticked learner: a small dropdown on the right of the row. */
.assign-minbtn { flex: none; display: inline-flex; align-items: center; gap: var(--tt-space-2); height: 32px; padding: 0 var(--tt-space-3) 0 var(--tt-space-4); border: var(--tt-border-form) solid var(--tt-border-field); border-radius: var(--tt-radius-pill); background: var(--tt-surface); color: var(--tt-text-primary); font: inherit; font-size: 13px; font-weight: var(--tt-weight-label); cursor: pointer; }
.assign-minbtn[hidden] { display: none; }
.assign-minbtn:hover { border-color: var(--tt-border-interactive); }
.assign-minbtn:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }
.assign-minbtn svg { width: 12px; height: 12px; flex: none; color: var(--tt-text-secondary); }
.assign-min-menu { min-width: 132px; }

.bot-link .bot-assign { flex: none; width: 40px; padding: 0; justify-content: center; }
.bot-link .bot-assign svg { width: var(--tt-icon-sm); height: var(--tt-icon-sm); }

/* Twin sessions: post-session rating and reported issues, in the list and in the session details. */
.sess-tags { display: flex; flex-wrap: wrap; gap: var(--tt-space-2); margin-top: var(--tt-space-1); }
.rp-history-body .sess-tags { margin-top: 2px; }
.sr-fb-score { margin: 0; font-size: 15px; line-height: 24px; }
.sr-fb-score b { font-size: 28px; line-height: 32px; font-weight: var(--tt-weight-title); }
.sr-fb-quote { margin: var(--tt-space-2) 0 0; color: var(--tt-text-secondary); }
.sr-fb-empty { margin: 0; color: var(--tt-text-tertiary); }
.sr-fb-issues-h { margin-top: var(--tt-space-5); }
.sr-fb-issues { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--tt-space-2); }
.sr-fb-issues li { display: flex; align-items: center; gap: var(--tt-space-3); flex-wrap: wrap; }
.sr-fb-note { color: var(--tt-text-secondary); font-size: 14px; }

/* Use-case details: the Report card holds four tiles in two rows. */
.rp-detail-stats--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rp-stat--neutral { background: var(--tt-fill-soft); color: var(--tt-text-secondary); }

/* Inbox: everything waiting on Olga, by Twin and Roleplay. */
.nav-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: var(--tt-radius-pill); background: var(--tt-primary); color: var(--tt-on-primary); font-size: 11px; line-height: 18px; font-weight: var(--tt-weight-label); }
.rail.is-collapsed .nav-badge { position: absolute; top: 2px; right: 2px; min-width: 14px; height: 14px; padding: 0 4px; font-size: 10px; line-height: 14px; }
.rail.is-collapsed .nav-item { position: relative; }
.page--inbox { max-width: 1080px; }
.inbox-lede { margin: var(--tt-space-1) 0 var(--tt-space-5); color: var(--tt-text-secondary); font-size: 14px; line-height: 20px; }
.inbox-seg { margin-bottom: var(--tt-space-5); }
.inbox-seg button { display: inline-flex; align-items: center; gap: var(--tt-space-2); }
.inbox-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 6px; border-radius: var(--tt-radius-pill); background: var(--tt-primary); color: var(--tt-on-primary); font-size: 11px; line-height: 18px; font-weight: var(--tt-weight-label); }
.inbox-sec { margin-top: var(--tt-space-6); display: flex; flex-direction: column; gap: var(--tt-space-3); }
.inbox-seg + .inbox-sec { margin-top: 0; }
.inbox-h { display: flex; align-items: center; gap: var(--tt-space-2); margin: 0; font-size: 17px; line-height: 24px; font-weight: var(--tt-weight-title); letter-spacing: -0.01em; }
.inbox-sub { margin: calc(var(--tt-space-2) * -1) 0 0; color: var(--tt-text-secondary); font-size: 14px; line-height: 20px; }
.inbox-requests { list-style: none; margin: 0; padding: var(--tt-space-3) var(--tt-space-4); display: flex; flex-direction: column; gap: var(--tt-space-3); border: 1px dashed var(--tt-border); border-radius: var(--tt-radius-lg); }
.inbox-requests li { display: flex; align-items: baseline; gap: var(--tt-space-3); flex-wrap: wrap; font-size: 14px; line-height: 20px; }
.inbox-requests .badge { flex: none; }
.inbox-line b { font-weight: var(--tt-weight-title); }
.inbox-quiet { color: var(--tt-text-tertiary); }
.inbox-card { padding: var(--tt-space-5) var(--tt-space-6); border: 1px solid var(--tt-border); border-radius: var(--tt-radius-lg); background: var(--tt-surface); }
.inbox-row { display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-5); }
.inbox-row:has(.inbox-reason) { align-items: flex-start; }
.inbox-main { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--tt-space-1); }
.inbox-title { margin: 0; font-size: 16px; line-height: 24px; color: var(--tt-text-primary); }
.inbox-title b { font-weight: var(--tt-weight-title); }
.inbox-meta { margin: 0; font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.inbox-actions { flex: none; display: flex; align-items: center; gap: var(--tt-space-2); }
.inbox-reason { margin-top: var(--tt-space-2); }
.inbox-said { align-self: stretch; margin: var(--tt-space-2) 0 0; padding: var(--tt-space-3) var(--tt-space-4); border-left: 3px solid var(--tt-danger-border); border-radius: var(--tt-radius-sm); background: var(--tt-fill-soft); font-size: 15px; line-height: 22px; }
.inbox-fix { margin: var(--tt-space-2) 0 0; font-size: 15px; line-height: 22px; color: var(--tt-text-primary); }
.inbox-answer { margin-top: var(--tt-space-4); display: flex; flex-direction: column; gap: var(--tt-space-3); }
.inbox-answer .input { width: 100%; resize: vertical; }
.inbox-answer-foot { display: flex; justify-content: flex-end; gap: var(--tt-space-2); }
.inbox-empty { margin: 0; padding: var(--tt-space-4) 0; color: var(--tt-text-tertiary); font-size: 14px; }
@media (max-width: 720px) { .inbox-row { flex-direction: column; align-items: stretch; } .inbox-actions { flex-wrap: wrap; } }

/* Twin sessions: totals above a table of conversations, like the reference. */
.ts-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--tt-space-3); margin-top: var(--tt-space-5); }
.ts-stats .an-stat { padding: var(--tt-space-4); }
.ts-stats .overline { white-space: normal; min-height: 32px; }
.ts-stats .an-value { margin: var(--tt-space-1) 0 var(--tt-space-2); }
.an-row--tsess { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.2fr) 84px 96px minmax(150px, 1fr) 28px; }
.ts-rowbtn { width: 100%; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ts-rowbtn:hover { background: var(--tt-surface-sunken); }
.ts-rowbtn:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: -2px; }
.ts-table .an-row--head .ts-col-q { white-space: normal; }
.ts-learner { display: flex; align-items: center; gap: var(--tt-space-3); min-width: 0; }
.ts-learner-text { display: flex; flex-direction: column; min-width: 0; line-height: 20px; }
.ts-learner-text b { font-weight: var(--tt-weight-title); }
.ts-learner-text .an-muted { font-size: 13px; }
.ts-help { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.ts-stars { display: inline-flex; gap: 2px; }
.ts-stars svg { width: 16px; height: 16px; }
.ts-stars.is-great { color: var(--tt-success); }
.ts-stars.is-good { color: var(--tt-caution); }
.ts-stars.is-low { color: var(--tt-danger); }
.ts-help-label { font-size: 13px; line-height: 18px; }
.ts-issue { margin-top: 2px; }
.an-row--tsess .cal-go { justify-self: end; }
@media (max-width: 1100px) { .ts-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .ts-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .an-row--tsess { grid-template-columns: minmax(0, 1fr) 70px minmax(120px, 1fr) 28px; }
  .ts-col-twin, .ts-col-q { display: none; }
}
.page--tsess .lib-title { flex: none; white-space: nowrap; }

/* Inbox, mail style: folders on the left, the selected list on the right. */
.page--inbox .lib-head { align-items: center; }
.inbox-seg { margin: 0; }
.inbox-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: var(--tt-space-5); align-items: start; margin-top: var(--tt-space-4); }
.inbox-menu { display: flex; flex-direction: column; gap: 2px; position: sticky; top: var(--tt-space-4); }
.inbox-menu-item { display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-2); width: 100%; min-height: 40px; padding: 0 var(--tt-space-4); border: 0; border-radius: var(--tt-radius-pill); background: transparent; color: var(--tt-text-secondary); font: inherit; font-size: 14px; line-height: 20px; text-align: left; cursor: pointer; }
.inbox-menu-item:hover { background: var(--tt-surface-sunken); }
.inbox-menu-item[aria-current="page"] { background: var(--tt-primary-subtle, var(--tt-fill-soft)); color: var(--tt-text-primary); font-weight: var(--tt-weight-title); }
.inbox-menu-item:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }
.inbox-pane { min-width: 0; display: flex; flex-direction: column; gap: var(--tt-space-3); padding: var(--tt-space-5) var(--tt-space-6); border: 1px solid var(--tt-border); border-radius: var(--tt-radius-lg); background: var(--tt-surface); min-height: 420px; }
.inbox-pane-head { display: flex; flex-direction: column; gap: var(--tt-space-1); margin-bottom: var(--tt-space-2); }
.inbox-pane .inbox-sub { margin: 0; }
.inbox-pane .inbox-requests { border-style: solid; border-color: var(--tt-border); }
.inbox-all { display: flex; flex-direction: column; }
.inbox-all .inbox-sec:first-child { margin-top: 0; }
@media (max-width: 860px) {
  .inbox-layout { grid-template-columns: 1fr; }
  .inbox-menu { position: static; flex-direction: row; flex-wrap: wrap; }
}
/* Inbox runs edge to edge: the folder list sits at the far left of the content area. */
.page.page--inbox { max-width: none; width: 100%; margin: 0; padding-left: var(--tt-space-4); padding-right: var(--tt-space-6); }

/* Inbox cards: who it is from, then the point, then the detail. Buttons stay small and quiet. */
.inbox-card { padding: var(--tt-space-4) var(--tt-space-5); }
.inbox-row { align-items: flex-start; }
.inbox-main { gap: var(--tt-space-2); }
.inbox-who { display: flex; align-items: center; gap: var(--tt-space-2); margin: 0; font-size: 13px; line-height: 20px; color: var(--tt-text-secondary); }
.inbox-who b { font-weight: var(--tt-weight-title); color: var(--tt-text-primary); }
.inbox-who .rp-avatar { width: 22px; height: 22px; font-size: 11px; }
.inbox-card .inbox-title { font-size: 16px; line-height: 24px; font-weight: var(--tt-weight-title); }
.inbox-agent { background: var(--tt-fill-soft); color: var(--tt-text-secondary); font-weight: var(--tt-weight-body); }
.inbox-quote { align-self: stretch; margin-top: var(--tt-space-1); }
.inbox-label { margin: 0 0 2px; font-size: 11px; line-height: 16px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tt-text-tertiary); font-weight: var(--tt-weight-label); }
.inbox-card .inbox-said { margin: 0; padding: var(--tt-space-2) var(--tt-space-3); font-size: 14px; line-height: 20px; }
.inbox-card .inbox-fix { margin: 0; font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.inbox-actions { gap: var(--tt-space-1); }

/* Scenarios: nothing in Draft yet. A full-width box with the message centred under an icon. */
.rp-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--tt-space-4); width: 100%; padding: var(--tt-space-10, 56px) var(--tt-space-6); border: 1px solid var(--tt-border); border-radius: var(--tt-radius-lg); background: var(--tt-surface); text-align: center; }
.rp-empty p { margin: 0; color: var(--tt-text-secondary); font-size: 15px; line-height: 22px; }
.rp-empty-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--tt-radius-pill); background: var(--tt-fill-soft); color: var(--tt-text-secondary); }
.rp-empty-icon svg { width: 24px; height: 24px; }

/* Learner circles: the first letter of the name, centred, in the same soft tones as the other avatars. */
.rp-learners .rp-learner-avatar--initial { display: flex; align-items: center; justify-content: center; box-sizing: border-box; padding: 0; text-align: center; font-size: 12px; line-height: 1; font-weight: var(--tt-weight-title); background: var(--tt-fill-soft); color: var(--tt-text-secondary); }

/* Try as learner: a confirmation with the roleplay and who the learner will talk to. */
.try-dialog { width: min(480px, calc(100vw - 32px)); }
.try-role { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; }
.try-role-name { margin: 0; font-size: 16px; line-height: 24px; font-weight: var(--tt-weight-title); color: var(--tt-text-primary); }
.try-role-blurb { margin: 0; font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.try-persona { display: flex; align-items: flex-start; gap: var(--tt-space-3); width: 100%; padding: var(--tt-space-4); border-radius: var(--tt-radius-md); background: var(--tt-fill-soft); text-align: left; }
.try-persona-photo { flex: none; width: 48px; height: 48px; border-radius: var(--tt-radius-pill); object-fit: cover; background: var(--tt-surface); }
.try-persona-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.try-persona-label { margin: 0; font-size: 11px; line-height: 16px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tt-text-tertiary); font-weight: var(--tt-weight-label); }
.try-persona-name { margin: 0; font-size: 15px; line-height: 22px; font-weight: var(--tt-weight-title); color: var(--tt-text-primary); }
.try-persona-desc { margin: 0; font-size: 13px; line-height: 18px; color: var(--tt-text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Post-call rating: five stars, filled up to the one picked; hovering previews the rating. */
.nps-stars { width: 100%; display: flex; flex-direction: row-reverse; justify-content: center; gap: var(--tt-space-2); }
.nps-star { padding: 4px; border: 0; background: transparent; color: var(--tt-border); cursor: pointer; line-height: 0; transition: color .12s ease, transform .12s ease; }
.nps-star svg { width: 40px; height: 40px; }
.nps-star.is-on { color: var(--tt-caution); }
.nps-stars:hover .nps-star { color: var(--tt-border); }
.nps-star:hover, .nps-star:hover ~ .nps-star { color: var(--tt-caution) !important; }
.nps-star:active { transform: scale(.94); }
.nps-star:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; border-radius: var(--tt-radius-sm); }
.sr-fb-score { display: flex; align-items: center; gap: var(--tt-space-2); flex-wrap: wrap; }
.sr-fb-score .ts-stars svg { width: 20px; height: 20px; }
.sr-fb-score b { font-size: 18px; line-height: 24px; }

/* Roleplay builder: five step tabs on top, a numbered heading on each step. */
.role-steps { align-self: flex-start; margin: var(--tt-space-4) 0; }
.role-step-head { display: flex; align-items: flex-start; gap: var(--tt-space-3); margin-bottom: var(--tt-space-5); }
.role-step-num { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--tt-radius-pill); background: var(--tt-fill-soft); color: var(--tt-text-secondary); font-size: 14px; font-weight: var(--tt-weight-title); }
.role-step-title { margin: 0; font-size: 20px; line-height: 28px; font-weight: var(--tt-weight-title); letter-spacing: -0.01em; }
.role-step-sub { margin: 2px 0 0; color: var(--tt-text-secondary); font-size: 14px; line-height: 20px; }
.role-step-body { display: flex; flex-direction: column; }
.role-card--details .role-step-head { margin: 0; padding: var(--tt-space-6) var(--tt-space-6) var(--tt-space-4); }
.role-card--details .role-step-body { padding: 0 var(--tt-space-6) var(--tt-space-6); }
.create-column .seg.role-steps { margin: var(--tt-space-4) auto; }

/* The step tabs sit inside the card, above the numbered heading. */
.role-card--details .seg.role-steps { margin: var(--tt-space-6) var(--tt-space-6) 0; align-self: flex-start; }
.role-card--details .role-step-head { padding-top: var(--tt-space-5); }

/* Details card: a collapsible header on top, then the step tabs and the current step inside. */
.role-card--details .role-manual-body .seg.role-steps { margin: 0; align-self: flex-start; }
.role-card--details .role-manual-body .role-step-head { padding: 0; margin: var(--tt-space-5) 0 var(--tt-space-4); }
.role-card--details .role-manual-body .role-step-body { padding: 0; }

/* The step buttons live at the bottom of the card, not in a page footer. */
.role-step-actions { display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-3); margin-top: var(--tt-space-6); padding-top: var(--tt-space-4); border-top: 1px solid var(--tt-border); }
.role-step-actions-end { display: flex; align-items: center; gap: var(--tt-space-2); flex-wrap: wrap; justify-content: flex-end; }
/* The new-score points box is the same size as the points boxes in the list above it. */
.role-rubric-add .role-rubric-points-input { flex: 0 0 64px; width: 64px; height: 32px; padding: 0 var(--tt-space-2); text-align: right; font-size: 14px; }
/* TeeTee ask box: the mic and send buttons sit to the right of the text, so the box stays one slim row. */
.tee-ask-box { flex-direction: row; align-items: center; gap: var(--tt-space-2); min-height: 0; padding: 8px 8px 8px 18px; }
.tee-ask-box .home-ask-input { flex: 1 1 auto; width: auto; }
.tee-ask-box .home-ask-actions { flex: none; justify-content: flex-end; }

/* Step tabs: a numbered circle before each label; a check once the step is done. */
.role-steps button { display: inline-flex; align-items: center; gap: var(--tt-space-2); }
.role-step-badge { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: var(--tt-radius-pill); background: var(--tt-border); color: var(--tt-text-secondary); font-size: 12px; line-height: 1; font-weight: var(--tt-weight-label); }
.role-step-badge svg { width: 12px; height: 12px; }
.role-step-badge.is-done { background: var(--tt-success-subtle); color: var(--tt-success); }
/* The step tabs run the full width of the card, each tab sharing the row equally. */
.role-card--details .role-manual-body .seg.role-steps { align-self: stretch; width: 100%; }
.role-card--details .role-manual-body .seg.role-steps button { flex: 1 1 0; justify-content: center; min-width: 0; }
/* Builder steps: a field label sits 4px above its field. */
.role-step-body .role-label { margin-bottom: 4px; line-height: 20px; }
.role-step-body .role-label-row { margin-bottom: 4px; }
.role-step-body .role-label-row .role-label { margin-bottom: 0; }
.role-step-body .role-sublabel { margin-bottom: 4px; }
.role-step-body details.role-tips { margin-top: 0; }

/* Room below the builder card so it can scroll all the way up under the header when opened. */
.create-column--role { padding-bottom: 45vh; }

/* Persona cards: the name sits right next to the photo, with the location under it. */
.rps-people:not(.rps-people--own) .rps-person-hero { flex-direction: row; align-items: center; gap: var(--tt-space-4); }
.rps-people:not(.rps-people--own) .rps-person-hero .rps-person-title { flex-direction: column; align-items: flex-start; flex-wrap: nowrap; gap: 0; margin-top: 0; min-width: 0; }
.rps-person-loc { color: var(--tt-text-secondary); font-size: 14px; line-height: 20px; }
.rps-people:not(.rps-people--own) .rps-person-title .rps-person-chip { position: static; margin-top: var(--tt-space-2); padding: 0 10px; background: var(--tt-fill-soft); box-shadow: none; color: var(--tt-text-secondary); font-size: 12px; line-height: 22px; }
/* Persona cards: the behaviour and speaking tags are white with a light grey border. */
.rps-person .rps-person-tags .rps-tag { background: var(--tt-surface); border: 1px solid var(--tt-border); }
/* Rubric: the list rows and the add row share one grid, so the points boxes and the buttons line up. */
.role-step-body .role-rubric li { grid-template-columns: minmax(0, 1fr) 96px 132px; gap: var(--tt-space-3); }
.role-step-body .role-rubric li > .btn { justify-self: end; }
.role-step-body .role-rubric-add { display: grid; grid-template-columns: minmax(0, 1fr) 96px 132px; gap: var(--tt-space-3); align-items: center; margin-top: 12px; }
.role-step-body .role-rubric-add > .input:first-of-type { flex: none; width: 100%; height: 32px; }
.role-step-body .role-rubric-add .role-rubric-pts { justify-self: start; }
.role-step-body .role-rubric-add .role-rubric-points-input { width: 64px; }
.role-step-body .role-rubric-add > .btn { justify-self: end; }

/* Opening line: a generate button inside the field, at its right end. */
.role-opening-field { position: relative; }
.role-opening-field .input { width: 100%; padding-right: 48px; }
.role-opening-gen { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--tt-radius-pill); background: transparent; color: var(--tt-text-secondary); cursor: pointer; }
.role-opening-gen:hover { background: var(--tt-fill-soft); color: var(--tt-text-primary); }
.role-opening-gen:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }
.role-opening-gen svg { width: 18px; height: 18px; }

/* Scenario: the generate icon sits in the bottom right corner of the text box. */
.role-textarea-field .input { padding-right: 48px; padding-bottom: 44px; }
.role-textarea-field .role-opening-gen { top: auto; bottom: 8px; transform: none; }

/* The AI box in the roleplay builder folds up to a single line: sparkles and what was typed, no background. */
.tee-panel { display: block; }
.tee-mini { display: inline-flex; align-items: center; gap: var(--tt-space-2); align-self: flex-start; max-width: 100%; padding: var(--tt-space-2) 0; border: 0; background: transparent; color: var(--tt-text-secondary); font: inherit; font-size: 15px; line-height: 22px; text-align: left; cursor: pointer; }
.tee-mini:hover { color: var(--tt-text-primary); }
.tee-mini:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; border-radius: var(--tt-radius-sm); }
.tee-mini svg { width: 18px; height: 18px; flex: none; }
.tee-mini-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.create-column--role .tee-mini { margin-bottom: var(--tt-space-3); }

/* Collapsed, the manual route is just a line of text under the AI line. */
.role-manual-plain { align-self: flex-start; padding: var(--tt-space-2) 0; border: 0; background: transparent; color: var(--tt-text-secondary); font: inherit; font-size: 15px; line-height: 22px; font-weight: var(--tt-weight-label); text-align: left; cursor: pointer; }
.role-manual-plain:hover { color: var(--tt-text-primary); }
.role-manual-plain:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; border-radius: var(--tt-radius-sm); }
/* The create column is a block, so these two lines each take their own row. */
.create-column--role .tee-mini { display: flex; width: fit-content; }
.create-column--role .role-manual-plain { display: block; width: fit-content; }
/* "Create roleplay manually": centred under the AI box, with a light background on hover. */
.create-column--role .role-manual-plain { margin: var(--tt-space-3) auto 0; padding: var(--tt-space-2) var(--tt-space-4); border-radius: var(--tt-radius-pill); text-align: center; transition: background-color .15s ease, color .15s ease; }
.create-column--role .role-manual-plain:hover { background: var(--tt-fill-soft); color: var(--tt-text-primary); }
.create-column--role .role-manual-plain { display: flex; align-items: center; gap: var(--tt-space-2); }
.role-manual-plain svg { width: 18px; height: 18px; flex: none; }
/* 16px between the AI box and whatever follows it (kept inside the panel so it folds away with it). */
.create-column--role .tee-panel { padding-bottom: var(--tt-space-4); box-sizing: border-box; }
.create-column--role .role-manual-plain { margin-top: 0; }

/* No header on the details card: the step tabs are its first row. */
.role-card--details .role-manual-body { padding-top: var(--tt-space-6); }
/* "Generate with AI" line: centred, with a light grey pill on hover, like "Create roleplay manually". */
.create-column--role .tee-mini { margin: 0 auto var(--tt-space-3); padding: var(--tt-space-2) var(--tt-space-4); border-radius: var(--tt-radius-pill); transition: background-color .15s ease, color .15s ease; }
.create-column--role .tee-mini:hover { background: var(--tt-fill-soft); color: var(--tt-text-primary); }

/* Persona details: the role tag sits under the location and Edit is on the right of the card. */
.rpd-hero .rpd-chip { position: static; margin-top: var(--tt-space-2); padding: 0 10px; background: var(--tt-fill-soft); box-shadow: none; color: var(--tt-text-secondary); font-size: 12px; line-height: 22px; display: inline-block; }
.rpd-hero .rpd-edit { margin-left: auto; flex: none; }

/* Persona cards: an edit icon appears at the top right while the card is hovered or focused. */
.rps-people:not(.rps-people--own) .rps-person { position: relative; }
.rps-card-edit { position: absolute; top: var(--tt-space-3); right: var(--tt-space-3); z-index: 3; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--tt-radius-pill); background: var(--tt-fill-soft); color: var(--tt-text-secondary); cursor: pointer; opacity: 0; transition: opacity .15s ease, background-color .15s ease; }
.rps-card-edit svg { width: 18px; height: 18px; }
.rps-person:hover .rps-card-edit, .rps-person:focus-within .rps-card-edit, .rps-card-edit:focus-visible { opacity: 1; }
.rps-card-edit:hover { background: var(--tt-border); color: var(--tt-text-primary); }
.rps-card-edit:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }
@media (hover: none) { .rps-card-edit { opacity: 1; } }
/* Persona card tags start with a small check mark. */
.rps-person .rps-person-tags .rps-tag { display: inline-flex; align-items: center; gap: 6px; }
.rps-person .rps-person-tags .rps-tag::before { content: ""; flex: none; width: 14px; height: 14px; background: var(--tt-success); -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3.5 8.5 6.5 11.5 12.5 5'/></svg>") center / contain no-repeat; mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3.5 8.5 6.5 11.5 12.5 5'/></svg>") center / contain no-repeat; }
/* Learner step: 12px between the tips box and the goal field (or the goal list) below it. */
.role-step-body details.role-tips { margin-bottom: 12px; }
/* Learner goals: the Add goal button sits to the right of the goal field. */
.role-step-body > .role-goal-add:not(.role-rubric-add) { flex-direction: row; align-items: center; gap: var(--tt-space-2); }
.role-step-body > .role-goal-add:not(.role-rubric-add) > .input { flex: 1 1 auto; width: auto; min-width: 0; }
.role-step-body > .role-goal-add:not(.role-rubric-add) > .btn { flex: none; }
/* Learner goals: 12px between the goal list and the add row below it. */
.role-step-body ol.role-goals:not(.role-rubric) { margin-bottom: 12px; }

/* Learner goals: a small "Tips" button on the right of the title; clicking it opens the tips as a popover. */
.role-tips-wrap { position: relative; margin-top: var(--tt-space-4); }
.role-tips-btn { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 0; border-radius: var(--tt-radius-pill); background: transparent; color: var(--tt-text-secondary); font: inherit; font-size: 13px; line-height: 18px; font-weight: var(--tt-weight-label); cursor: pointer; }
.role-tips-btn:hover, .role-tips-btn[aria-expanded="true"] { background: var(--tt-fill-soft); color: var(--tt-text-primary); }
.role-tips-btn:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }
.role-tips-btn svg { width: 16px; height: 16px; flex: none; }
.role-tips-pop { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; width: min(340px, 100%); padding: var(--tt-space-4); border: 1px solid var(--tt-border); border-radius: var(--tt-radius-md); background: var(--tt-surface); box-shadow: 0 4px 12px rgb(30 28 25 / 0.08), 0 12px 32px rgb(30 28 25 / 0.12); }
.role-tips-title { margin: 0 0 var(--tt-space-2); font-size: 13px; line-height: 18px; font-weight: var(--tt-weight-title); color: var(--tt-text-primary); }
.role-tips-pop ol { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--tt-text-secondary); font-size: 13px; line-height: 18px; }
/* Persona library in the roleplay builder: one row that scrolls sideways. */
.role-step-body .rpa-people { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; gap: var(--tt-space-4); padding: 4px 4px 12px; margin: 0 -4px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.role-step-body .rpa-people .rpa-person { flex: none; scroll-snap-align: start; }

/* Persona library: the name is centred under the photo; Edit is a dark strip along the bottom of the photo, shown on hover. */
.role-step-body .rpa-person { text-align: center; }
.role-step-body .rpa-person .rpa-name, .role-step-body .rpa-person .rpa-sub { display: block; width: 100%; text-align: center; }
.rpa-photo-edit { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: flex-end; justify-content: center; height: 44px; padding: 0 0 8px; border: 0; background: linear-gradient(to top, rgb(0 0 0 / 0.65), rgb(0 0 0 / 0)); color: #fff; cursor: pointer; opacity: 0; transition: opacity .15s ease; }
.rpa-photo-edit svg { width: 18px; height: 18px; }
.rpa-person:hover .rpa-photo-edit, .rpa-person:focus-within .rpa-photo-edit, .rpa-photo-edit:focus-visible { opacity: 1; }
.rpa-photo-edit:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
@media (hover: none) { .rpa-photo-edit { opacity: 1; } }
/* Learner goals: 16px between the title row (with the Tips button) and the goal field below it. */
.role-step-body .role-label-row.role-tips-wrap { margin-bottom: 16px; }
/* Scenarios, empty Draft tab: 16px between the Published / Draft switch and the empty box. */
.rp-created-head + .rp-empty { margin-top: var(--tt-space-4); }

/* Accounts: cohorts, learners and the team. */
.an-row--cohorts { grid-template-columns: minmax(0, 1.3fr) 90px minmax(0, 1.3fr) minmax(0, 1.1fr) 130px 120px; }
.an-row--acclearners { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.5fr) 150px 150px 130px; }
.an-row--team { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) 120px 110px; }
@media (max-width: 860px) {
  .an-row--cohorts { grid-template-columns: minmax(0, 1fr) 70px 110px 110px; }
  .acc-col-wide { display: none; }
  .an-row--acclearners { grid-template-columns: minmax(0, 1fr) 130px 110px; }
  .an-row--acclearners > :nth-child(4) { display: none; }
  .an-row--team { grid-template-columns: minmax(0, 1fr) 90px 90px; }
}

/* Roleplay sessions: a table, one row per practice session. */
.an-row--rsess { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.1fr) 104px minmax(0, 1.4fr) 128px minmax(0, 1fr) 24px; }
.rs-score { display: flex; flex-direction: column; gap: 6px; }
.rs-score .lr-bar { width: 100%; }
.rs-col-issue .badge { white-space: normal; text-align: left; }
@media (max-width: 1100px) { .an-row--rsess { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 104px 128px 24px; } .rs-col-when, .rs-col-weak, .rs-col-issue { display: none; } }
@media (max-width: 720px) { .an-row--rsess { grid-template-columns: minmax(0, 1fr) 104px 24px; } .rs-col-scn { display: none; } .an-row--rsess .ts-help { display: none; } }

/* Roleplay sessions: six totals above the table, three to a row. */
.ts-stats.ts-stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ts-stat-text { font-size: 18px; line-height: 26px; letter-spacing: -0.01em; }
@media (max-width: 720px) { .ts-stats.ts-stats--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Roleplay sessions: no When column and no score bar. */
.an-row--rsess { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 90px minmax(0, 1.5fr) 128px minmax(0, 1fr) 24px; }
@media (max-width: 1100px) { .an-row--rsess { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 90px 128px 24px; } }
@media (max-width: 720px) { .an-row--rsess { grid-template-columns: minmax(0, 1fr) 90px 24px; } }
.an-row--rsess .rs-score { display: block; white-space: nowrap; }
/* The date under a learner's name: lighter grey, regular weight. */
.ts-learner-text .an-muted { color: var(--tt-text-tertiary); font-weight: var(--tt-weight-body); }

/* Roleplay sessions: the reported issue sits under the rating, so there is no Issue column. */
.an-row--rsess { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 90px minmax(0, 1.5fr) minmax(0, 1.1fr) 24px; }
@media (max-width: 1100px) { .an-row--rsess { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 90px minmax(0, 1.1fr) 24px; } }
@media (max-width: 720px) { .an-row--rsess { grid-template-columns: minmax(0, 1fr) 90px 24px; } }

/* Accounts > Learners: Twin users / Roleplay users tabs above the heading. */
.acc-tabs { align-self: flex-start; margin: var(--tt-space-5) 0 0; }
.an-row--acctwin { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) 130px 110px 120px minmax(0, 1.2fr); }
.an-row--accrole { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.5fr) 130px 140px 90px; }
@media (max-width: 860px) {
  .an-row--acctwin { grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1.2fr); }
  .an-row--acctwin > :nth-child(2), .an-row--acctwin > :nth-child(4), .an-row--acctwin > :nth-child(5) { display: none; }
  .an-row--accrole { grid-template-columns: minmax(0, 1fr) 110px 80px; }
  .an-row--accrole > :nth-child(2), .an-row--accrole > :nth-child(4) { display: none; }
}

/* Accounts pages: a back link to Settings above the title. */
.acc-back { display: inline-flex; align-items: center; gap: var(--tt-space-2); align-self: flex-start; margin: 0 0 var(--tt-space-2); padding: var(--tt-space-1) var(--tt-space-2) var(--tt-space-1) 0; border: 0; border-radius: var(--tt-radius-sm); background: transparent; color: var(--tt-text-secondary); font: inherit; font-size: 14px; line-height: 20px; font-weight: var(--tt-weight-label); cursor: pointer; }
.acc-back:hover { color: var(--tt-text-primary); }
.acc-back:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }
.acc-back svg { width: 16px; height: 16px; flex: none; }
/* Settings > Accounts cards: the icon centred on top, the name centred under it. */
.fast-follow-card { flex-direction: column; justify-content: center; align-items: center; gap: var(--tt-space-3); padding: var(--tt-space-5) var(--tt-space-4); text-align: center; }
.fast-follow-name { text-align: center; }
/* Settings > Accounts: each icon sits on its own soft tone from the palette. */
.fast-follow-card:nth-child(4n+1) .fast-follow-ico { background: var(--tt-info-subtle); color: var(--tt-info); }
.fast-follow-card:nth-child(4n+2) .fast-follow-ico { background: var(--tt-success-subtle); color: var(--tt-success); }
.fast-follow-card:nth-child(4n+3) .fast-follow-ico { background: var(--tt-caution-subtle); color: var(--tt-caution); }
.fast-follow-card:nth-child(4n+4) .fast-follow-ico { background: var(--tt-orange-100); color: var(--tt-orange-700); }
.fast-follow-card:hover .fast-follow-ico { background: var(--tt-surface); }
.fast-follow-card:nth-child(4n+1):hover .fast-follow-ico { background: var(--tt-info-subtle); }
.fast-follow-card:nth-child(4n+2):hover .fast-follow-ico { background: var(--tt-success-subtle); }
.fast-follow-card:nth-child(4n+3):hover .fast-follow-ico { background: var(--tt-caution-subtle); }
.fast-follow-card:nth-child(4n+4):hover .fast-follow-ico { background: var(--tt-orange-100); }

/* Settings: the same header as Persona, an icon and title on top, then the account name under it. */
.page--account.page--library .settings-who { margin-top: var(--tt-space-6); }
.page--account.page--library .settings-group:first-of-type { margin-top: var(--tt-space-8); }

/* Assign popup: cohort filter on the left, search folded to an icon on the right (it grows when pressed). */
.assign-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-2); width: 100%; }
.assign-cohort { width: auto; max-width: 180px; height: 36px; padding: 0 var(--tt-space-3); border-radius: var(--tt-radius-pill); font-size: 13px; }
.assign-find { position: relative; flex: none; width: 36px; height: 36px; margin-left: auto; transition: width .28s cubic-bezier(.4, 0, .2, 1); }
.assign-find.is-open { width: min(260px, calc(100% - 196px)); }
.assign-find .assign-search { position: absolute; inset: 0; width: 100%; height: 36px; padding: 0 var(--tt-space-3) 0 36px; border-radius: var(--tt-radius-pill); font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.assign-find.is-open .assign-search { opacity: 1; pointer-events: auto; }
.assign-find-btn { position: absolute; z-index: 1; left: 0; top: 0; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: var(--tt-radius-pill); background: var(--tt-fill-soft); color: var(--tt-text-secondary); cursor: pointer; transition: background-color .2s ease; }
.assign-find.is-open .assign-find-btn { background: transparent; }
.assign-find-btn:hover { color: var(--tt-text-primary); }
.assign-find-btn:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }
.assign-find-btn svg { width: 16px; height: 16px; }
/* Each ticked learner gets a second line: minutes and the date access ends. */
.assign-row { flex-wrap: wrap; }
.assign-opts { flex-basis: 100%; display: flex; align-items: center; gap: var(--tt-space-3); margin-left: 76px; margin-top: var(--tt-space-1); flex-wrap: wrap; }
.assign-opts[hidden] { display: none; }
.assign-until-wrap { display: inline-flex; align-items: center; gap: var(--tt-space-2); color: var(--tt-text-secondary); font-size: 12px; line-height: 16px; }
.assign-until { height: 32px; padding: 0 var(--tt-space-3); border: var(--tt-border-form) solid var(--tt-border-field); border-radius: var(--tt-radius-pill); background: var(--tt-surface); color: var(--tt-text-primary); font: inherit; font-size: 13px; }
.assign-until:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }

/* Wider popup so cohort, search, minutes and access date all sit on one line. */
.assign-dialog { width: min(640px, calc(100vw - 32px)); }
.assign-find.is-open { width: min(300px, calc(100% - 196px)); }
.assign-opts { margin-left: 76px; flex-wrap: nowrap; }

/* Selects: draw our own chevron. The native macOS one hugs the right edge and ignores the padding, so it looked misaligned next to our pill inputs.
   The chevron is centred 16px from the edge; padding-right clears it. */
select.input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-color: var(--tt-surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4.5 6.5 8 10l3.5-3.5' stroke='%234A4A4A' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
  cursor: pointer;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4.5 6.5 8 10l3.5-3.5' stroke='%23C4C4C4' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
}
:root[data-theme="dark"] select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4.5 6.5 8 10l3.5-3.5' stroke='%23C4C4C4' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

.assign-opts { margin-left: 0; justify-content: flex-end; }

/* Minutes and Access until sit to the right of the learner's name, each with its title above the control. */
.assign-row { flex-wrap: nowrap; }
.assign-opts { flex: none; flex-basis: auto; margin: 0; align-items: flex-end; gap: var(--tt-space-3); }
.assign-opt { display: flex; flex-direction: column; align-items: flex-start; gap: var(--tt-space-1); cursor: default; }
.assign-opt-label { color: var(--tt-text-secondary); font-size: 12px; line-height: 16px; }

/* Column titles sit once above the list; each ticked or assigned row shows a minutes dropdown and a date picker under them. */
.assign-cols { display: flex; justify-content: flex-end; gap: var(--tt-space-3); width: 100%; padding: 0 calc(var(--tt-space-4) + 1px) 0 0; color: var(--tt-text-secondary); font-size: 12px; line-height: 16px; }
.assign-col--min { width: 96px; }
.assign-col--until { width: 150px; }
.assign-opts { align-items: center; }
.assign-opts .assign-minbtn { width: 96px; justify-content: space-between; }
.assign-opts .assign-until { width: 150px; }

/* Header row: Select | Learner | Minutes | Access until. Widths mirror the row so each title sits over its column. */
.assign-cols { justify-content: flex-start; padding: 0 calc(var(--tt-space-4) + 1px) 0 calc(var(--tt-space-4) + 1px); }
.assign-col--select { flex: none; width: 38px; }
.assign-col--who { flex: 1; min-width: 0; }
.assign-col--min, .assign-col--until { flex: none; }
.assign-cols + .assign-list .assign-row .check { margin-right: 20px; }

/* Search icon on the left (it grows to the right), cohort filter on the right. */
.assign-find { margin-left: 0; margin-right: auto; }

/* "Learner" lines up with the name text, past the 32px avatar and its 12px gap. */
.assign-col--who { padding-left: 44px; box-sizing: border-box; }

/* Search is open by default and takes the free space beside the cohort filter. */
.assign-find, .assign-find.is-open { flex: 1; width: auto; max-width: 360px; margin-right: var(--tt-space-3); }

/* The learner table is a white panel on the dialog's tinted surface. */
.assign-list { background: var(--tt-surface); }

/* Column titles are the first row of the table: sticky, grey, and they stay put while the learners scroll. */
.assign-list .assign-cols { position: sticky; top: 0; z-index: 2; box-sizing: border-box; align-items: center; padding: var(--tt-space-3) var(--tt-space-4); background: var(--tt-fill-soft); border-bottom: 1px solid var(--tt-border); }
.assign-list .assign-cols ~ .assign-row .check { margin-right: 20px; }
.assign-cols + .assign-list .assign-row .check { margin-right: 0; }
.assign-list .assign-cols + .assign-row { border-top: 0; }

/* Usage shows as a ring that fills clockwise instead of a bar. */
.credit-pill-ring { flex: none; width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(var(--tt-text-primary) var(--used), var(--tt-border) 0); -webkit-mask: radial-gradient(circle, transparent 5px, #000 5.5px); mask: radial-gradient(circle, transparent 5px, #000 5.5px); }
.credit-pill.is-low .credit-pill-ring { background: conic-gradient(var(--tt-caution) var(--used), var(--tt-border) 0); }

/* New picks show "30 days" in the date field. The real date (today + 30) sits underneath; picking a date swaps the label for it. */
.assign-date { position: relative; flex: none; display: inline-block; width: 150px; }
.assign-date .assign-until { width: 100%; box-sizing: border-box; cursor: pointer; }
.assign-opts .assign-date .assign-until { width: 100%; }
.assign-date.is-default .assign-until { color: transparent; }
.assign-date.is-default .assign-until::-webkit-datetime-edit { color: transparent; }
.assign-date-text { position: absolute; left: var(--tt-space-3); top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--tt-text-primary); pointer-events: none; }
.assign-date:not(.is-default) .assign-date-text { display: none; }

/* Our calendar replaces the browser's native one. Spec: orange dot marks today, the dark CTA marks the selected day, two-letter weekday initials. */
.assign-until::-webkit-calendar-picker-indicator { display: none; }
.assign-date-icon { position: absolute; right: var(--tt-space-3); top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--tt-text-primary); pointer-events: none; }
.assign-cal { position: fixed; z-index: 6; width: 288px; padding: var(--tt-space-3) var(--tt-space-4) var(--tt-space-4); background: var(--tt-surface); border: var(--tt-border-thin) solid var(--tt-card-border); border-radius: var(--tt-radius-md); box-shadow: var(--tt-elevation-2); text-align: left; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--tt-space-2); }
.cal-title { font-size: 14px; font-weight: var(--tt-weight-label); color: var(--tt-text-primary); }
.cal-nav { display: inline-flex; gap: var(--tt-space-1); }
.cal-step { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--tt-radius-pill); background: transparent; color: var(--tt-text-secondary); cursor: pointer; }
.cal-step svg { width: 16px; height: 16px; }
.cal-step:hover:not(:disabled) { background: var(--tt-fill-soft); color: var(--tt-text-primary); }
.cal-step:disabled { opacity: 0.35; cursor: not-allowed; }
.cal-step:focus-visible, .cal-day:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; justify-items: center; }
.cal-dow { display: grid; place-items: center; height: 28px; font-size: 12px; color: var(--tt-text-secondary); font-variant-numeric: tabular-nums; }
.cal-day { position: relative; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--tt-text-primary); font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; cursor: pointer; }
.cal-day:hover:not(:disabled):not(.is-selected) { background: var(--tt-fill-soft); }
.cal-day.is-today::after { content: ""; position: absolute; bottom: 4px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--tt-primary); }
.cal-day.is-selected { background: var(--tt-cta-strong); color: var(--tt-on-cta-strong); font-weight: var(--tt-weight-label); }
.cal-day:disabled { color: var(--tt-text-tertiary); opacity: 0.45; cursor: not-allowed; }
.cal-hint { margin: var(--tt-space-3) 0 0; font-size: 12px; line-height: 16px; color: var(--tt-text-secondary); }

/* Icon before each metric title. */
.ts-stats .overline { display: flex; align-items: flex-start; gap: var(--tt-space-2); }
.stat-icon { flex: none; width: 14px; height: 14px; margin-top: 1px; color: var(--tt-text-secondary); }
/* "Needs a look": the things waiting on you, just above the table, tinted by priority. */
.ts-attn { display: flex; align-items: center; flex-wrap: wrap; gap: var(--tt-space-2); margin: var(--tt-space-5) 0 var(--tt-space-3); }
.ts-attn-label { margin-right: var(--tt-space-1); font-size: 13px; font-weight: var(--tt-weight-label); color: var(--tt-text-primary); }
.ts-attn-chip { height: 32px; padding: 0 var(--tt-space-4); border: 0; border-radius: var(--tt-radius-pill); font: inherit; font-size: 13px; font-weight: var(--tt-weight-label); cursor: pointer; transition: box-shadow .15s ease; }
.ts-attn-chip--danger { background: var(--tt-danger-subtle); color: var(--tt-danger); }
.ts-attn-chip--caution { background: var(--tt-caution-subtle); color: var(--tt-caution); }
.ts-attn-chip--info { background: var(--tt-info-subtle); color: var(--tt-info); }
.ts-attn-chip:hover, .ts-attn-chip.is-on { box-shadow: inset 0 0 0 1px currentColor; }
.ts-attn-chip:focus-visible, .ts-attn-clear:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }
.ts-attn-clear { padding: 0 var(--tt-space-2); border: 0; background: none; font: inherit; font-size: 13px; color: var(--tt-text-secondary); text-decoration: underline; cursor: pointer; }

.ts-attn-chip { display: inline-flex; align-items: center; gap: var(--tt-space-1); }
.ts-attn-go { flex: none; width: 14px; height: 14px; }

.ts-attn-label { display: inline-flex; align-items: center; gap: var(--tt-space-2); }
.ts-attn-label .stat-icon { margin-top: 0; color: var(--tt-text-primary); }

/* Twin sessions summary: one open section (no cards). A big headline number, the rating as a bar, then the rest in a ruled row. */
.ts-metrics { margin-top: var(--tt-space-6); }
.tm-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--tt-space-8); align-items: end; padding-bottom: var(--tt-space-6); border-bottom: 1px solid var(--tt-border); }
.tm-hero-value { margin: 0; font-size: 64px; line-height: 1; font-weight: 600; letter-spacing: -0.02em; color: var(--tt-text-primary); }
.tm-hero-label, .tm-rating-head { display: flex; align-items: center; gap: var(--tt-space-2); margin: var(--tt-space-3) 0 0; font-size: 15px; color: var(--tt-text-secondary); }
.tm-rating-head { margin: 0 0 var(--tt-space-3); }
.tm-rating-head b { font-size: 20px; font-weight: 600; color: var(--tt-text-primary); }
.tm-bar { height: 16px; border-radius: var(--tt-radius-pill); background: var(--tt-fill-soft); overflow: hidden; }
.tm-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--tt-cta-strong); }
.tm-rating .tm-note { margin: var(--tt-space-2) 0 0; }
.tm-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding-top: var(--tt-space-5); }
.tm-metric + .tm-metric { padding-left: var(--tt-space-5); border-left: 1px solid var(--tt-border); }
.tm-label { display: flex; align-items: center; gap: var(--tt-space-2); margin: 0; font-size: 14px; color: var(--tt-text-secondary); }
.tm-value { margin: var(--tt-space-2) 0 var(--tt-space-1); font-size: 32px; line-height: 1.1; font-weight: 600; color: var(--tt-text-primary); }
.tm-note { margin: 0; font-size: 13px; color: var(--tt-text-secondary); }
.tm-note--bad { color: var(--tt-danger); }
.tm-hero-label .stat-icon, .tm-rating-head .stat-icon, .tm-label .stat-icon { margin-top: 0; }
@media (max-width: 900px) {
  .tm-top { grid-template-columns: 1fr; gap: var(--tt-space-5); }
  .tm-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--tt-space-5); }
  .tm-metric:nth-child(3) { padding-left: 0; border-left: 0; }
}

/* Rule under the metric row, matching the one above it. */
.tm-row { padding-bottom: var(--tt-space-5); border-bottom: 1px solid var(--tt-border); }

/* The headline number sits in a card of its own. */
.tm-hero { padding: var(--tt-space-5) var(--tt-space-6); background: var(--tt-surface); border: var(--tt-border-thin) solid var(--tt-card-border); border-radius: var(--tt-radius-lg); box-shadow: var(--tt-elevation-1); }
.tm-top { align-items: center; }

.tm-rating-head { margin-bottom: var(--tt-space-1); }
.tm-rating .tm-note { margin-top: 0; }

.tm-hero-value { font-size: 48px; }

/* The rating sits in a card too, with a small illustration before the text. */
.tm-top { align-items: stretch; }
.tm-rating { display: flex; align-items: center; gap: var(--tt-space-5); padding: var(--tt-space-5) var(--tt-space-6); background: var(--tt-surface); border: var(--tt-border-thin) solid var(--tt-card-border); border-radius: var(--tt-radius-lg); box-shadow: var(--tt-elevation-1); }
.tm-illus { flex: none; width: 88px; height: 88px; }
.tm-hero { display: flex; flex-direction: column; justify-content: center; }

/* Headline card wider, rating card narrower; the rating's progress is a ring before its text. */
.tm-top { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.tm-rating { gap: var(--tt-space-4); }
.tm-rating-head { white-space: nowrap; }
.tm-ring { width: 20px; height: 20px; -webkit-mask: radial-gradient(circle, transparent 6px, #000 6.5px); mask: radial-gradient(circle, transparent 6px, #000 6.5px); }

/* Progress ring now leads the paid-by-learners card: the share of sessions that paid for an extension. */
.tm-hero { flex-direction: row; align-items: center; gap: var(--tt-space-5); }
.tm-ringwrap { position: relative; flex: none; display: grid; place-items: center; width: 64px; height: 64px; }
.tm-ring--lg { position: absolute; inset: 0; width: 64px; height: 64px; -webkit-mask: radial-gradient(circle, transparent 25px, #000 25.5px); mask: radial-gradient(circle, transparent 25px, #000 25.5px); }
.tm-ring-pct { position: relative; font-size: 13px; font-weight: 600; color: var(--tt-text-primary); }
.tm-hero-text { min-width: 0; }

.tm-hero { justify-content: flex-start; }

.tm-top { gap: var(--tt-space-4); }

/* Paid by learners reads top to bottom: title, big number, then the extension count. */
.tm-hero-label { margin: 0 0 var(--tt-space-1); }
.tm-hero-text .tm-note { margin: var(--tt-space-1) 0 0; font-size: 14px; }

.tm-rating-head b { font-size: 32px; line-height: 1.1; }

/* Ring stays on the left; the title, number and count sit on the right side of the card. */
.tm-hero { justify-content: space-between; }
.tm-hero-text { text-align: right; }
.tm-hero-text .tm-hero-label { justify-content: flex-end; }

/* Ring and the title/count stay on the left; only the AED amount sits on the right of the card. */
.tm-hero { justify-content: flex-start; }
.tm-hero-text { text-align: left; }
.tm-hero-text .tm-hero-label { justify-content: flex-start; }
.tm-hero-value { margin: 0 0 0 auto; }

/* Roleplay sessions has a fifth metric (a long label), so the last column gets double width and a smaller line of text. */
.tm-row--wide { grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 2fr); }
.tm-value--text { font-size: 18px; line-height: 1.3; margin-top: var(--tt-space-3); margin-bottom: var(--tt-space-2); min-height: 47px; }
@media (max-width: 900px) { .tm-row--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tm-row--wide .tm-metric:last-child { grid-column: 1 / -1; padding-left: 0; border-left: 0; } }

.page--twin-profile .lib-title { white-space: nowrap; }
.tm-value { white-space: nowrap; }
.tm-value .an-muted { font-size: 18px; font-weight: 500; }
.tm-value--text { white-space: normal; }

.tm-illus { width: 66px; height: 66px; }

/* Table title sits right above the table. */
.ts-table-title { margin: var(--tt-space-5) 0 0; }
.ts-table-title + .ts-table { margin-top: var(--tt-space-3); }

/* A rule above the table title, matching the ones in the summary. */
.ts-table-title { margin-top: var(--tt-space-5); padding-top: var(--tt-space-5); border-top: 1px solid var(--tt-border); }

/* Filter pills were 180px each and crowded the header beside the title; 148px still fits "All twin agents". */
.ts-filters .bot-range .home-ask-mode { width: 148px; }

/* Where this twin agent is allowed to answer from, inside the agent card. */
.rp-detail-scope { margin: var(--tt-space-4) 0 0; font-size: 14px; line-height: 26px; color: var(--tt-text-secondary); }
.rp-scope-chip { display: inline-block; max-width: 100%; padding: 0 var(--tt-space-3); border: 1px solid color-mix(in srgb, var(--tt-info) 25%, transparent); border-radius: var(--tt-radius-pill); background: var(--tt-info-subtle); color: var(--tt-info); line-height: 24px; vertical-align: baseline; }

.rp-scope-chip { border-color: var(--tt-info-border); }

.rp-detail-scope { margin-bottom: var(--tt-space-5); }

/* Usage credit is its own card above Most asked: light grey, with the amount, bar and minutes left. */
.rp-usage { background: var(--tt-fill-soft); }
.rp-usage-body { display: flex; flex-direction: column; gap: var(--tt-space-2); }
.rp-usage .credit-row-bar { background: var(--tt-surface); }

.rp-detail-scope { margin-top: 0; }

/* What the twin answers from, as three ticked lines under the course pill. */
.rp-detail-scope { margin-bottom: var(--tt-space-3); }
.rp-scope-list { list-style: none; margin: 0 0 var(--tt-space-5); padding: 0; display: flex; flex-direction: column; gap: var(--tt-space-2); }
.rp-scope-list li { display: flex; align-items: flex-start; gap: var(--tt-space-2); font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.rp-scope-list svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--tt-success); }

/* Questions the twin couldn't answer: a Respond button on each row opens this dialog. */
.bot-asked li { align-items: center; }
.respond-dialog { width: min(520px, calc(100vw - 32px)); }
.respond-q { align-self: stretch; margin: 0; padding: var(--tt-space-3) var(--tt-space-4); border-radius: var(--tt-radius-md); background: var(--tt-fill-soft); font-size: 14px; line-height: 22px; color: var(--tt-text-primary); }
.respond-field { align-self: stretch; margin: 0; }
.respond-field .input { width: 100%; resize: vertical; }
.respond-voice { display: flex; align-items: center; gap: var(--tt-space-2); }
.respond-voice .btn svg, .respond-clip svg { width: 16px; height: 16px; flex: none; }
.respond-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tt-live); animation: respond-pulse 1.2s ease-in-out infinite; }
@keyframes respond-pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .respond-dot { animation: none; } }
.respond-clip { display: inline-flex; align-items: center; gap: var(--tt-space-2); background: var(--tt-fill-soft); color: var(--tt-text-primary); }
.respond-note { margin: 0; font-size: 13px; color: var(--tt-text-secondary); }

/* The report count is a link to the reported issues in the inbox. */
.bot-asked-link { display: inline-flex; align-items: center; gap: var(--tt-space-1); padding: 0; border: 0; background: none; font: inherit; font-weight: var(--tt-weight-label); color: var(--tt-text-primary); cursor: pointer; }
.bot-asked-link svg { width: 14px; height: 14px; flex: none; color: var(--tt-text-secondary); }
.bot-asked-link:hover svg { color: var(--tt-text-primary); }
.bot-asked-link:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; border-radius: var(--tt-radius-xs); }

.rp-scope-chip { border: 0; }

/* Reports raised on one twin agent, in a dialog: one row per report with who, when, the reported turn and what to do. */
.reports-dialog { width: min(760px, calc(100vw - 32px)); }
.reports-list { align-self: stretch; max-height: min(60vh, 520px); overflow-y: auto; margin: 0 calc(var(--tt-space-2) * -1); padding: 0 var(--tt-space-2); }
.reports-row { padding: var(--tt-space-4) 0; }
.reports-row + .reports-row { border-top: 1px solid var(--tt-border); }
.reports-row:first-child { padding-top: 0; }

/* In the reports list the reported turn is a plain italic quote: no grey box, no side bar. */
.reports-row .inbox-card .inbox-said, .reports-row .inbox-said { padding: 0; border: 0; border-radius: 0; background: none; font-style: italic; }

/* When responding to a report the grey box shows the learner's report and the turn they flagged. */
.respond-q { display: flex; flex-direction: column; gap: var(--tt-space-1); }
.respond-q-label { font-size: 11px; line-height: 16px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tt-text-tertiary); font-weight: var(--tt-weight-label); }
.respond-q b { font-weight: var(--tt-weight-title); }
.respond-q em { color: var(--tt-text-secondary); }

/* The learner's report is the highlighted part of each row. */
.reports-msg { padding: var(--tt-space-3) var(--tt-space-4); border-radius: var(--tt-radius-md); background: var(--tt-fill-soft); }
.reports-msg .inbox-title { margin: 0; }

.reports-row .inbox-main { flex: 1; }
.reports-msg { align-self: stretch; }

/* The report box spans the row and holds the Respond button on its right. */
.reports-msg { display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-4); }
.reports-msg-text { min-width: 0; }
.reports-msg .btn { flex: none; }

/* Reports raised opens as a panel that slides in from the right edge. */
.reports-dialog { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(560px, 100vw); max-width: none; height: 100dvh; max-height: none; }
.reports-dialog .confirm-card { height: 100%; border-radius: 24px 0 0 24px; border-right: 0; overflow: hidden; }
.reports-dialog .reports-list { flex: 1; min-height: 0; max-height: none; }
.reports-dialog--in[open] { animation: reports-slide .28s cubic-bezier(.2, .8, .2, 1); }
.reports-dialog--in[open]::backdrop { animation: reports-fade .28s ease; }
@keyframes reports-slide { from { transform: translateX(100%); } to { transform: none; } }
@keyframes reports-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .reports-dialog--in[open], .reports-dialog--in[open]::backdrop { animation: none; } }

/* One grey box per report: label, the learner's reason in semibold, then the flagged turn in italic; Respond sits on the right. */
.reports-msg { align-items: center; padding: var(--tt-space-4) var(--tt-space-5); }
.reports-msg-text { display: flex; flex-direction: column; gap: var(--tt-space-1); }
.reports-msg .inbox-title { font-weight: var(--tt-weight-title); }
.reports-msg .inbox-said { margin: 0; color: var(--tt-text-secondary); font-size: 15px; line-height: 22px; }

/* Name on the left, when it happened on the right. */
.reports-who { align-self: stretch; }
.reports-when { margin-left: auto; font-size: 13px; color: var(--tt-text-secondary); }

.tm-hero-value { font-size: 24px; letter-spacing: -0.01em; }

/* Left menu narrowed by 50px (was 248px). */
.rail { width: 198px; }

.rail { width: 214px; }

/* Summary layout: paid-by-learners and the rating stacked on the left, the four numbers as a 2x2 grid on the right. */
.ts-metrics { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--tt-space-4); align-items: stretch; padding-bottom: var(--tt-space-6); border-bottom: 1px solid var(--tt-border); }
.tm-left { display: flex; flex-direction: column; gap: var(--tt-space-4); min-width: 0; }
.tm-left .tm-hero, .tm-left .tm-rating { flex: 1; }
.tm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; padding: 0; border: 0; min-width: 0; }
.tm-grid .tm-metric { display: flex; flex-direction: column; justify-content: center; padding: var(--tt-space-4) var(--tt-space-6); border: 0; }
.tm-grid .tm-metric:nth-child(even) { border-left: 1px solid var(--tt-border); }
.tm-grid .tm-metric:nth-child(n + 3) { border-top: 1px solid var(--tt-border); }
.tm-grid .tm-metric:nth-child(odd) { padding-left: var(--tt-space-2); }
@media (max-width: 900px) { .ts-metrics { grid-template-columns: 1fr; } }

/* Back to the earlier summary: cards side by side, then the ruled row of four numbers. */
.ts-metrics { display: block; padding-bottom: 0; border-bottom: 0; }

/* Rating on the left, paid-by-learners on the right (still the wider card). */
.tm-top { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }

/* The two top cards share the row equally. */
.tm-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* Amount sits under the title; the purchase count moves to the right side of the card. */
.tm-hero-text .tm-hero-value { margin: var(--tt-space-1) 0 0; }
.tm-hero-count { margin: 0 0 0 auto; font-size: 14px; white-space: nowrap; }

/* Rating card mirrors the paid card: title, the number under it, and the rated count on the right. */
.tm-rating-text .tm-hero-label { margin: 0 0 var(--tt-space-1); }
.tm-rating-count { margin: 0 0 0 auto; max-width: 110px; text-align: right; font-size: 14px; }

.tm-rating .tm-rating-count { margin: 0 0 0 auto; }

.tm-rating .tm-rating-count { max-width: none; white-space: nowrap; }

/* The rated count shares a baseline with the average number and sits at the card's right edge. */
.tm-rating .tm-rating-text { flex: 1; min-width: 0; }
.tm-rating-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--tt-space-3); }
.tm-rating-row .tm-rating-head { margin: 0; }
.tm-rating .tm-rating-row .tm-rating-count { margin: 0; text-align: right; }

/* Paid card: the count sits at the right edge on the same baseline as the amount. */
.tm-hero .tm-hero-text { flex: 1; min-width: 0; }
.tm-hero .tm-rating-row .tm-hero-value { margin: 0; }
.tm-hero .tm-rating-row .tm-hero-count { margin: 0; text-align: right; }

/* Filter dropdowns use the same corner as the form text fields instead of a full pill. */
.ts-filters .bot-range .home-ask-mode { border-radius: var(--tt-radius-sm); }

/* The four numbers are light grey tiles with no rules around or between them. */
.tm-top, .tm-row { border-bottom: 0; }
.tm-row { gap: var(--tt-space-4); padding: var(--tt-space-4) 0 var(--tt-space-1); }
.tm-row .tm-metric, .tm-row .tm-metric + .tm-metric { padding: var(--tt-space-4) var(--tt-space-5); border: 0; border-radius: var(--tt-radius-md); background: var(--tt-fill-soft); }

/* Each summary tile has a ↗ at the right, level with its number. */
.tm-value-row { display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-3); }
.tm-value-row .tm-value { margin: var(--tt-space-2) 0 0; }
.tm-go { flex: none; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; margin-top: var(--tt-space-2); border: 0; border-radius: var(--tt-radius-pill); background: transparent; color: var(--tt-text-secondary); cursor: pointer; }
.tm-go svg { width: 16px; height: 16px; }
.tm-go:hover { background: var(--tt-surface); color: var(--tt-text-primary); }
.tm-go:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }

/* The paid-by-learners ring fills in green. */
.tm-ring { background: conic-gradient(var(--tt-success) var(--used), var(--tt-border) 0); }

/* Calibration thread: Olga's side is a dark bubble, the twin's reply is warm-tinted and carries her photo, so the two voices read apart at a glance. */
.cal-thread .talk-bubble--olga { background: var(--tt-cta-strong); color: var(--tt-on-cta-strong); box-shadow: none; border-radius: 20px 20px 6px 20px; }
.cal-twin-row { display: flex; align-items: flex-end; gap: var(--tt-space-2); max-width: 88%; }
.cal-twin-avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--tt-surface); }
.cal-thread .cal-twin-row .talk-bubble { max-width: none; background: var(--tt-primary-subtle); box-shadow: inset 0 0 0 1px var(--tt-orange-100); border-radius: 20px 20px 20px 6px; }
.cal-thread .talk-msg.is-twin .talk-feedback, .cal-thread .talk-msg.is-twin .talk-pick { margin-left: 40px; }

/* Lighter grey for the number tiles: the sunken surface, not the button fill. */
.tm-row .tm-metric, .tm-row .tm-metric + .tm-metric { background: var(--tt-surface-sunken); }

/* Filter chevron: the glyph itself is 12px wide (the old 12px box held a chevron only about 5px wide). */
.bot-range .home-ask-mode svg { width: 12px; height: 7px; }

/* Phones: the two summary cards stack, each card puts its picture (stars / ring) above the title, and the four tiles go two by two. */
@media (max-width: 720px) {
  .tm-top { grid-template-columns: minmax(0, 1fr); }
  .tm-rating, .tm-hero { flex-direction: column; align-items: flex-start; gap: var(--tt-space-3); height: auto; }
  .tm-rating .tm-rating-text, .tm-hero .tm-hero-text { flex: none; width: 100%; }
  .tm-hero-label { white-space: nowrap; }
  .tm-rating-row { flex-wrap: wrap; }
  .tm-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .tm-row .tm-metric, .tm-row .tm-metric + .tm-metric { padding: var(--tt-space-4) var(--tt-space-3); }
  .tm-label { font-size: 13px; white-space: nowrap; }
  .ts-attn-chip { height: auto; min-height: 32px; padding: 6px var(--tt-space-4); line-height: 20px; text-align: left; }
}

/* Minutes meter chip + popover (header of Twin Agents). Bordered white chip, remaining-first copy, amber then red as it runs out. */
.credit-wrap { position: relative; }
.credit-pill { gap: var(--tt-space-3); background: var(--tt-surface); color: var(--tt-text-secondary); box-shadow: inset 0 0 0 1px var(--tt-border); padding: 0 var(--tt-space-3) 0 var(--tt-space-4); }
.credit-pill:hover { background: var(--tt-surface-sunken); }
.credit-pill .credit-pill-bar { width: 40px; height: 4px; }
.credit-pill .credit-pill-text { margin: 0; display: inline-flex; gap: 4px; align-items: baseline; }
.credit-pill .credit-pill-text .tabular { margin: 0; }
.credit-pill.is-low .credit-pill-bar > span { background: var(--tt-caution); }
.credit-pill.is-out .credit-pill-bar > span { background: var(--tt-danger); }
.credit-pill-chev { width: 12px; height: 12px; flex: none; color: var(--tt-text-secondary); transition: transform .15s ease; }
.credit-pill[aria-expanded="true"] .credit-pill-chev { transform: rotate(180deg); }
.credit-pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; width: 296px; padding: var(--tt-space-5); display: flex; flex-direction: column; background: var(--tt-surface); border-radius: var(--tt-radius-lg); box-shadow: var(--tt-elevation-2), inset 0 0 0 1px var(--tt-border); }
.credit-pop > * { margin: 0; }
.credit-pop-label { font-size: 13px; line-height: 20px; color: var(--tt-text-secondary); }
.credit-pop-big { display: flex; align-items: baseline; gap: var(--tt-space-2); margin-top: 2px !important; }
.credit-pop-big b { font-size: 32px; line-height: 40px; font-weight: var(--tt-weight-title); color: var(--tt-text-primary); }
.credit-pop-big span { font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.credit-pop-sub { font-size: 13px; line-height: 20px; color: var(--tt-text-secondary); }
.credit-seg { display: flex; height: 8px; margin-top: var(--tt-space-4) !important; border-radius: var(--tt-radius-pill); background: var(--tt-fill-soft); overflow: hidden; gap: 2px; }
.credit-seg > span { display: block; height: 100%; }
.credit-seg .is-used, .credit-legend i.is-used { background: var(--tt-text-primary); }
.credit-seg .is-idle, .credit-legend i.is-idle { background: var(--tt-text-muted); }
.credit-legend { list-style: none; margin: var(--tt-space-4) 0 0 !important; padding: 0; display: flex; flex-direction: column; gap: var(--tt-space-2); }
.credit-legend li { display: flex; align-items: center; gap: var(--tt-space-2); font-size: 13px; line-height: 20px; color: var(--tt-text-secondary); }
.credit-legend li span { flex: 1; }
.credit-legend li b { font-weight: var(--tt-weight-label); color: var(--tt-text-primary); }
.credit-legend i { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.credit-legend i.is-left { background: var(--tt-fill-soft); box-shadow: inset 0 0 0 1px var(--tt-border); }
.credit-pop-warn { margin-top: var(--tt-space-4) !important; padding: var(--tt-space-2) var(--tt-space-3); border-radius: var(--tt-radius-sm); background: var(--tt-surface-sunken); color: var(--tt-text-primary); font-size: 13px; line-height: 18px; }
.credit-pop-cta { margin-top: var(--tt-space-5) !important; width: 100%; justify-content: center; }
@media (max-width: 720px) { .credit-pop { right: auto; left: 0; max-width: calc(100vw - 32px); } }
.credit-pill .credit-pill-bar { flex: none; background: color-mix(in srgb, var(--tt-text-primary) 16%, transparent); }
/* Header toolbar controls share one 36px medium size: minutes chip + Create new. */
.lib-head .lib-tools .btn, .lib-head .lib-tools .credit-pill { height: 36px; min-height: 36px; }
.lib-head .lib-tools .btn { font-size: 14px; }
.lib-head .lib-tools .credit-pill { font-size: 14px; }
/* Medium button is 36px (was 40px). Small stays 32px. */
.btn { min-height: 36px; }
.btn--sm { min-height: 32px; }
.flow-toolbar .btn { height: 36px; min-height: 36px; }
/* A button that sits in a row with a form field takes the field's height so the row lines up. */
.role-step-body .role-rubric-add > .btn { height: 32px; min-height: 32px; }

/* Left-nav alert is a plain orange dot, no number. */
.nav-badge { min-width: 0; width: 8px; height: 8px; padding: 0; margin-right: var(--tt-space-1); font-size: 0; line-height: 0; }
.rail.is-collapsed .nav-badge { top: 6px; right: 6px; min-width: 0; width: 8px; height: 8px; padding: 0; box-shadow: 0 0 0 2px var(--tt-surface-sunken); }
/* Twin sessions / Roleplay sessions: no space under the two top cards. */
.ts-metrics .tm-top { padding-bottom: 0; }

/* Builder tabs lead with a line icon, not a number badge. Done tabs tint the icon green. */
.role-step-badge.role-step-ico { width: 16px; height: 16px; background: transparent; color: var(--tt-text-secondary); border-radius: 0; }
.role-step-badge.role-step-ico svg { width: 16px; height: 16px; }
.seg button[aria-pressed="true"] .role-step-badge.role-step-ico { color: var(--tt-text-primary); }
.role-step-badge.role-step-ico.is-done { background: transparent; color: var(--tt-success); }
/* Summary tiles get a hairline border (inset ring, so the tile size does not change). */
.tm-row .tm-metric, .tm-row .tm-metric + .tm-metric { box-shadow: inset 0 0 0 1px var(--tt-border); }

/* ===== Onboarding V2: Build my twin (link → found → persona → call → twin ready) ===== */
.shell--solo > .main { flex: 1; min-width: 0; margin-left: 0; width: 100%; }
.ob-head { box-sizing: border-box; display: flex; flex-direction: column; gap: 12px; }
.vs-card { max-width: 480px; margin-inline: auto; display: flex; flex-direction: column; align-items: center; text-align: center; }
.vs-card .page-title { margin: 0; }
.vs-sub { margin: var(--tt-space-2) 0 0; font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); max-width: 360px; }
.vs-full { width: 100%; margin-top: var(--tt-space-5); }
.vs-or { margin-top: var(--tt-space-4); font-size: 13px; color: var(--tt-text-muted); }
.vs-or + .vs-full { margin-top: var(--tt-space-4); }
.vs-after { margin-top: var(--tt-space-3); }
.vs-script { margin: var(--tt-space-5) 0 0; padding: var(--tt-space-4) var(--tt-space-5); border-radius: var(--tt-radius-lg); border: var(--tt-border-thin) solid var(--tt-border); background: var(--tt-fill-soft); font-size: 15px; line-height: 24px; color: var(--tt-text-primary); text-wrap: pretty; }
.vs-script.is-live { border-color: var(--tt-primary-border); background: var(--tt-primary-subtle); }
.vs-wave { margin-top: var(--tt-space-5); width: 100%; height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 3px; }
.vs-wave i { flex: 1; max-width: 3px; height: 12px; border-radius: 2px; background: var(--tt-text-muted); opacity: .6; }
.vs-wave.is-live i { background: var(--tt-primary); opacity: 1; animation: vs-bar 900ms ease-in-out infinite; }
@keyframes vs-bar { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.vs-timer { margin-top: var(--tt-space-2); font-size: 13px; color: var(--tt-text-secondary); font-variant-numeric: tabular-nums; }
.vs-card .voice-pick { text-align: left; }
.vs-card .btn svg, .v2-found .btn svg { width: 16px; height: 16px; flex: none; }
.vs-back-in { align-self: stretch; display: flex; margin: calc(var(--tt-space-3) * -1) 0 var(--tt-space-2) calc(var(--tt-space-3) * -1); }
.vs-page .find-stack, .v2-page .find-stack { padding-top: 24px; }
.v2-form { text-align: left; align-items: stretch; }
.v2-form .field + .field { margin-top: var(--tt-space-5); }
.v2-form select.input:invalid { color: var(--tt-text-muted); }
.v2-form .actions { margin-top: var(--tt-space-6); }
.v2-form .actions .btn { width: 100%; }
.v2-ms { position: relative; }
.v2-ms-trigger { display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-2); width: 100%; text-align: left; cursor: pointer; font: inherit; }
.v2-ms-trigger svg { width: 16px; height: 16px; color: var(--tt-text-secondary); flex: none; }
.v2-ms-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.v2-ms-wrap { position: relative; }
.v2-ms-menu { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; min-width: 0; z-index: var(--tt-z-dropdown); }
.v2-ms-opt { display: flex; align-items: center; gap: var(--tt-space-3); min-height: 36px; padding: 6px 10px; border-radius: var(--tt-radius-xs); font-size: 14px; line-height: 20px; color: var(--tt-text-primary); cursor: pointer; }
.v2-ms-opt:hover { background: var(--tt-fill-soft); }
.v2-found { max-width: 680px; margin-inline: auto; width: 100%; }
.v2-found .page-title { margin: 0; }
.v2-found .know-section-sub { margin: var(--tt-space-2) 0 0; font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.v2-found .v2-list { margin-top: var(--tt-space-5); grid-template-columns: 1fr; gap: var(--tt-space-3); }
.v2-found .card-head { align-items: center; }
.v2-found .card.is-off { opacity: .55; }
.v2-handle { font-weight: 400; color: var(--tt-text-primary); }
.v2-ok { width: 18px; height: 18px; color: var(--tt-success); flex: none; }
.v2-tile { display: grid; place-items: center; color: var(--tt-text-secondary); }
.v2-tile svg { width: 20px; height: 20px; }
.v2-add { margin-top: var(--tt-space-4); display: flex; gap: var(--tt-space-3); align-items: center; padding: var(--tt-space-3); border-radius: var(--tt-radius-lg); background: var(--tt-fill-soft); }
.v2-add .input { flex: 1; }
.v2-foot { justify-content: space-between; padding-top: var(--tt-space-5); border-top: var(--tt-border-thin) solid var(--tt-border); margin-top: var(--tt-space-6); }
/* The call: twin on the left, "What we found about you" on the right (or a floating pill when collapsed). */
.talk-page--ob { display: grid !important; grid-template-columns: minmax(0, 1fr) 600px; grid-template-rows: minmax(0, 1fr) auto; column-gap: var(--tt-space-6); box-sizing: border-box; padding: var(--tt-space-6) var(--tt-space-6) var(--tt-space-6) 0; }
.talk-page--ob:has(.v2f-float) { grid-template-columns: minmax(0, 1fr); }
.talk-page--ob .talk-body { grid-column: 1; grid-row: 1; padding: 0 var(--tt-space-6); }
.talk-page--ob .talk-stage { align-items: center; padding: 0; }
.talk-page--ob .talk-controls { grid-column: 1; grid-row: 2; padding: var(--tt-space-4) 0 0; }
.talk-page--ob .talk-history { grid-column: 2; grid-row: 1 / span 2; position: static; width: auto; height: 100%; }
.talk-page--ob:has(.v2f-float) .talk-history { display: none; }
.v2f-float { position: absolute; top: var(--tt-space-6); right: var(--tt-space-6); z-index: 5; display: flex; flex-direction: row; align-items: center; gap: var(--tt-space-3); padding: var(--tt-space-3); box-shadow: var(--tt-elevation-2); }
.v2f-float .confirm-tile { transform: scale(.8); margin: -4px; }
.v2f-float-copy { min-width: 150px; }
.v2f-float .card-title { font-size: 14px; line-height: 20px; margin: 0; }
.v2f-float .card-sub { margin: 0; }
.v2f-float .btn svg { width: 16px; height: 16px; }
.v2f-card { grid-column: 2; grid-row: 1 / span 2; height: 100%; min-height: 0; box-sizing: border-box; display: flex; flex-direction: column; overflow: hidden; margin: 0; max-width: none; }
.v2f-headrow { display: flex; align-items: center; gap: var(--tt-space-4); }
.v2f-collapse { margin-left: auto; align-self: flex-start; flex: none; }
.v2f-collapse svg { width: 16px; height: 16px; }
.v2f-headrow .page-title { margin: 0; font-size: 18px; line-height: 26px; }
.v2f-headrow .know-section-sub { margin-top: 2px; }
.v2f-body { flex: 1; min-height: 0; overflow: auto; margin-top: var(--tt-space-3); }
.v2f-card .section-divider { margin-top: var(--tt-space-4); min-height: 12px; }
.v2f-card .know-section-title { margin-top: var(--tt-space-3); font-size: 14px; line-height: 20px; }
.v2f-card .know-section-sub { margin-top: 2px; }
.v2f-ctrl { margin-top: var(--tt-space-3); }
.v2f-bullets { display: flex; flex-direction: column; gap: var(--tt-space-1); margin: var(--tt-space-2) 0 0; padding-left: 18px; font-size: 14px; line-height: 22px; color: var(--tt-text-primary); }
.v2f-bullets li::marker { color: var(--tt-text-tertiary); }
.v2f-bullets b { font-weight: var(--tt-weight-label); }
.v2f-overview { margin-top: var(--tt-space-3); padding: var(--tt-space-4) var(--tt-space-5); border-radius: var(--tt-radius-lg); background: var(--tt-fill-soft); }
.v2f-overview .v2f-bullets { margin-top: 0; }
.v2f-overview .know-section-sub { margin-top: var(--tt-space-2); }
.v2f-card .tee-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; line-height: 20px; cursor: pointer; }
.v2f-card .tee-chip svg { width: 14px; height: 14px; }
.v2f-card .tee-chip.is-on { background: var(--tt-fill-soft); border-color: var(--tt-border); font-weight: var(--tt-weight-label); }
.v2-voice-note { margin-bottom: var(--tt-space-5); font-size: 14px; line-height: 20px; padding: var(--tt-space-3) var(--tt-space-4); }
.v2-voice-note > span { flex: 1; }
.v2-voice-note .btn { flex: none; }
.v2-voice-note svg { width: 16px; height: 16px; flex: none; }
.v2-mini .rail-brand-actions .theme-switch { color: var(--tt-text-secondary); }
/* Twin ready. */
.v2c-page { flex-direction: column; }
.v2c-photo { margin: var(--tt-space-2) auto var(--tt-space-4); width: 160px !important; height: 160px !important; border-radius: 36px !important; }
.v2c-role { margin-top: var(--tt-space-1); color: var(--tt-text-secondary); }
.v2c-checks { list-style: none; margin: var(--tt-space-5) auto 0; padding: var(--tt-space-2) var(--tt-space-4); width: 100%; max-width: 440px; box-sizing: border-box; border-radius: var(--tt-radius-lg); background: var(--tt-fill-soft); text-align: left; }
.v2c-checks li { display: flex; align-items: center; gap: var(--tt-space-3); padding: var(--tt-space-2) 0; font-size: 14px; line-height: 20px; }
.v2c-checks li + li { border-top: var(--tt-border-thin) solid var(--tt-border); }
.v2c-checks b { font-weight: var(--tt-weight-label); color: var(--tt-text-primary); }
.v2c-meta { margin-left: auto; color: var(--tt-text-secondary); font-size: 13px; }
.v2c-ico { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; flex: none; }
.v2c-ico svg { width: 14px; height: 14px; }
.is-done .v2c-ico { background: var(--tt-success-subtle); color: var(--tt-success); }
.is-todo .v2c-ico { background: var(--tt-caution-subtle); color: var(--tt-caution); }
.is-todo .v2c-meta { color: var(--tt-caution); font-weight: var(--tt-weight-label); }
.v2c-call { margin-top: var(--tt-space-4); }
.celebrate .actions .btn svg { width: 16px; height: 16px; }

/* ===== Twin's brain: Knowledge, Training style (collapsed + expanded) and Test this rule ===== */
.flow-board:has(.flow-node.is-editing) .flow-node:not(.is-editing) { box-shadow: 0 1px 2px rgba(30,28,25,.05), 0 2px 6px rgba(30,28,25,.05); }
.flow-edit-icon { width: 32px; min-width: 32px; height: 32px; padding: 0; border-radius: 999px; }
.flow-connect-muted { margin-left: auto; font-size: 12px; color: var(--tt-text-tertiary); }
.ts-overview { display: block; margin-top: var(--tt-space-2); font-size: 14px; line-height: 20px; color: var(--tt-text-primary); text-align: left; white-space: normal; }
.ts-meta { margin: var(--tt-space-1) 0 0; font-size: 12px; line-height: 16px; color: var(--tt-text-secondary); }
.ts-actions { display: flex; align-items: center; gap: var(--tt-space-2); margin-top: var(--tt-space-3); }
.ts-expand svg { width: 14px; height: 14px; }
.flow-node .flow-hit { flex: 0 0 auto; }
.flow-node > .flow-edit-icon { margin-top: var(--tt-space-3); }
.kn-app { cursor: default; }
.kn-card .kn-badge, .kn-badge { position: static; flex: none; }
.kn-badge svg { width: 12px; height: 12px; }
.flow-node.is-editing .kn-h { margin: var(--tt-space-1) 0 0; }
.flow-node.is-editing .bot-drop { align-self: stretch; padding: var(--tt-space-3) var(--tt-space-4); }
.flow-node.is-editing:has(.kn-h) .studio-foot { margin-top: auto !important; align-self: stretch; }
.flow-node.is-editing:has(.kn-h) { display: flex; flex-direction: column; gap: var(--tt-space-3); }
.ts-sec { margin-top: var(--tt-space-3); }
.ts-h { margin: 0 0 var(--tt-space-1); font-size: 12px; line-height: 16px; font-weight: var(--tt-weight-label); color: var(--tt-text-secondary); text-transform: uppercase; letter-spacing: .04em; }
.ts-sec ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--tt-space-2); }
.ts-sec li { display: flex; align-items: flex-start; gap: var(--tt-space-2); font-size: 13px; line-height: 18px; color: var(--tt-text-primary); }
.ts-sec li .line-ico { margin-top: 2px; flex: none; color: var(--tt-text-secondary); }
.ts-sec li .input { flex: 1; }
.ts-yes, .ts-yes svg { color: var(--tt-primary) !important; }
.ts-edit { position: relative; padding-right: 32px; }
.ts-edit-btn { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 28px !important; min-width: 28px !important; height: 28px !important; padding: 0 !important; opacity: .7; }
.ts-edit-btn svg { width: 14px; height: 14px; }
.ts-edit:hover { background: var(--tt-fill-soft); border-radius: var(--tt-radius-xs); }
.ts-edit:hover .ts-edit-btn { opacity: 1; }
.ts-confirm { display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-3); margin-top: var(--tt-space-2); padding: var(--tt-space-2) var(--tt-space-3); border-radius: var(--tt-radius-md); background: var(--tt-fill-soft); }
.ts-confirm p { margin: 0; font-size: 13px; line-height: 18px; font-weight: var(--tt-weight-label); color: var(--tt-text-primary); }
.ts-confirm-actions { display: flex; gap: var(--tt-space-2); flex: none; }
.ts-confirm .btn svg { width: 14px; height: 14px; }
.tsf-add { padding: var(--tt-space-2); }
.ts-full { display: flex; flex-direction: column; gap: var(--tt-space-2) !important; }
.ts-full-head { display: flex; align-items: center; justify-content: space-between; align-self: stretch; margin: -4px -6px 0 0; }
.ts-full-body { flex: 1; min-height: 0; overflow: auto; align-self: stretch; display: flex; flex-direction: column; gap: var(--tt-space-2); }
.ts-full .ts-overview { margin-top: 0; }
.ts-full .ts-sec { margin-top: var(--tt-space-1); }
.tsf-title2 { margin-top: var(--tt-space-3); padding-top: var(--tt-space-3); border-top: var(--tt-border-thin) solid var(--tt-border); }
.tsf-group { margin: var(--tt-space-1) 0 0; }
.tsf-rules { display: flex; flex-direction: column; gap: var(--tt-space-2); }
.tsf-rule { display: flex; align-items: center; gap: var(--tt-space-2); padding: var(--tt-space-2); border: var(--tt-border-thin) solid var(--tt-card-border); border-radius: var(--tt-radius-md); background: var(--tt-surface); }
.tsf-rule .input { flex: 1; min-width: 0; }
.tsf-rule .flow-edit-row-copy { flex: 1; min-width: 0; }
.tsf-rule .flow-edit-row-copy b { font-weight: var(--tt-weight-label); font-size: 13px; line-height: 18px; }
.tsf-rule .flow-edit-row-copy span { font-size: 12px; line-height: 16px; }
.tsf-mark { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; flex: none; }
.tsf-mark svg { width: 13px; height: 13px; }
.tsf-mark--do { background: var(--tt-success-subtle); color: var(--tt-success); }
.tsf-mark--dont { background: var(--tt-fill-soft); color: var(--tt-text-secondary); }
.tsf-lock { display: grid; place-items: center; width: 40px; height: 24px; color: var(--tt-text-tertiary); flex: none; }
.tsf-lock svg { width: 16px; height: 16px; }
.tsf-test { flex: none; padding-inline: var(--tt-space-2); }
.tsf-test svg { width: 12px; height: 12px; }
.ts-full .studio-foot { margin-top: 0 !important; align-self: stretch; }
.main:has(.page--flow) { position: relative; }
.rt-widget[data-theme="dark"] { background: var(--tt-surface); color: var(--tt-text-primary); border-color: transparent !important; box-shadow: 0 16px 40px rgba(0,0,0,.35) !important; }
.rt-widget[data-theme="dark"] .tee-chat-field { background: var(--tt-surface-raised, var(--tt-surface)); }
.rt-widget { position: absolute !important; right: 16px; bottom: 16px; width: 320px !important; height: 460px !important; z-index: 50; box-shadow: var(--tt-elevation-3, 0 12px 32px rgba(30,28,25,.18)); border: var(--tt-border-thin) solid var(--tt-card-border); display: flex; flex-direction: column; gap: var(--tt-space-3); padding: var(--tt-space-4); box-sizing: border-box; }
.rt-close { position: absolute; top: 12px; right: 12px; }
.rt-head { padding-right: 36px; }
.rt-head h2 { margin: 0; font-size: 16px; line-height: 22px; font-weight: var(--tt-weight-title); }
.rt-head p { margin: var(--tt-space-1) 0 0; display: flex; align-items: center; gap: var(--tt-space-2); font-size: 13px; line-height: 18px; color: var(--tt-text-secondary); }
.rt-head .tsf-mark { width: 18px; height: 18px; }
.rt-head .tsf-mark svg { width: 11px; height: 11px; }
.rt-chat { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: var(--tt-space-2); padding-top: var(--tt-space-2); border-top: var(--tt-border-thin) solid var(--tt-border); }
.rt-chat .tee-msg { max-width: 85%; align-self: flex-start; margin: 0; }
.rt-chat .tee-msg.rt-learner { align-self: flex-end; background: var(--tt-primary-subtle); }
.rt-badge { position: static !important; align-self: flex-start; }
.rt-badge svg { width: 12px; height: 12px; }
.rt-chat .talk-feedback { margin-top: var(--tt-space-1); display: flex; gap: var(--tt-space-2); }
.rt-chat .talk-feedback .btn[aria-pressed="true"] { background: var(--tt-fill-soft); font-weight: var(--tt-weight-label); }

/* The Test-this-rule widget is a dark floating chat: scope the dark tokens to it. */
.rt-widget[data-theme="dark"] {
  --tt-canvas:         #141414;
  --tt-surface:        #1C1B1B;
  --tt-surface-raised: #2B2B2B;
  --tt-surface-sunken: #0A0A0A;

  --tt-text-primary:   #FEFEFF;
  --tt-text-secondary: #C4C4C4;
  --tt-text-tertiary:  #A3A3A3;
  --tt-text-muted:     #828282;

  --tt-primary:        #FF5A00;
  --tt-primary-hover:  #FF7E33;
  --tt-primary-ink:    #FF7E33;
  --tt-primary-subtle: #3A1300;
  --tt-on-primary:     #FFFFFF;

  --tt-cta-strong:       #FFFFFF;   /* neutral-0 — the mirror of light's near-black */
  --tt-cta-strong-hover: #F0F0F0;   /* neutral-100 — dims slightly on hover */
  --tt-on-cta-strong:    #0A0A0A;

  --tt-fill-soft:       #2B2B2B;
  --tt-fill-soft-hover: #4A4A4A;

  --tt-border:             #2B2B2B;
  --tt-card-border:        #242323;  /* blend toward the dark surface, half-way to -900 */
  --tt-border-interactive: #828282;
  --tt-border-field:       #4A4A4A;  /* neutral-700 — mirrors the light relationship */
  --tt-focus:              #FF5A00;

  --tt-danger:         #F58F93;
  --tt-danger-subtle:  #6B1216;
  --tt-live:           #E5484D;
  --tt-success:        #7FD1A0;
  --tt-success-subtle: #0E3E22;
  --tt-info:           #8FB6F5;
  --tt-info-subtle:    #12305F;
  --tt-caution:        #E9C86A;
  --tt-caution-subtle: #3A2A00;  /* gold-900: gold-700 was 3.65:1 under caution text */

  /* Status borders, dark. The 700 step — one rung above the -900 fill, so the
     edge is felt without competing with the -300 text sitting on it. */
  --tt-primary-border: #B83E00;
  --tt-success-border: #1A6739;
  /* Marketing badge border, dark — see the light block above. */
  --tt-primary-badge-border: #732600;
  --tt-info-border:    #1F4C9B;
  --tt-caution-border: #7F5F00;
  --tt-danger-border:  #A81F26;

  --tt-available: #7FD1A0;      /* green-300, 10.12:1 on the dark canvas */

  --tt-elevation-1: 0 0 0 1px rgb(253 251 247 / 0.05);
  --tt-card-shadow: 0 0 0 1px rgb(253 251 247 / 0.035);
  --tt-elevation-2: 0 0 0 1px rgb(253 251 247 / 0.07), 0 4px 16px rgb(0 0 0 / 0.5);
  --tt-elevation-3: 0 0 0 1px rgb(253 251 247 / 0.09), 0 12px 32px rgb(0 0 0 / 0.6);
}

/* Reports tiles in the twin Report card */
.rp-stat--reports { background: var(--tt-danger-subtle); color: var(--tt-danger); }
.rp-detail-stat--text { font-size: 18px; line-height: 24px; letter-spacing: -0.01em; }

/* Detail pages: a light lift under the cards so they sit off the page */
.rp-detail-layout .rp-detail,
.rp-detail-layout .rp-analytics { box-shadow: 0 1px 2px rgb(30 28 25 / 0.05), 0 4px 14px rgb(30 28 25 / 0.07); }
:root[data-theme="dark"] .rp-detail-layout .rp-detail,
:root[data-theme="dark"] .rp-detail-layout .rp-analytics { box-shadow: 0 0 0 1px rgb(253 251 247 / 0.035), 0 4px 14px rgb(0 0 0 / 0.35); }

/* Twin detail: a full-width details card (content left, usage credit right), then Report | Conversations this week */
.rp-detail-layout--bot > .rp-detail--wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--tt-space-8); align-items: start; }
.rp-detail--wide > .rp-detail-head { grid-column: 1 / -1; }
.rp-detail--wide .rp-detail-main { min-width: 0; }
.rp-detail--wide .rp-detail-main > .rp-detail-kicker:first-child { margin-top: 0; }
.rp-detail--wide .rp-detail-side { margin-top: 0; align-self: stretch; justify-content: center; }
.rp-detail-layout--bot .rp-analytics .rp-report { margin-bottom: 0; }
.rp-detail-layout--bot .rp-analytics .rp-report + .rp-detail-stats { margin-top: var(--tt-space-5); }
@media (max-width: 960px) { .rp-detail-layout--bot > .rp-detail--wide { grid-template-columns: 1fr; row-gap: var(--tt-space-5); } }
.rp-detail--wide > .rp-detail-head { margin-bottom: var(--tt-space-5); }
.rp-detail--wide .rp-detail-side { align-self: start; justify-content: flex-start; }
.rp-report-list { margin-top: var(--tt-space-5); }
/* Twin detail: the Report tiles grow to fill the card beside the taller chart */
.rp-detail-layout--bot > .rp-analytics:not(.rp-most-asked):not(.rp-conversations) { display: flex; flex-direction: column; }
.rp-detail-layout--bot > .rp-analytics > .rp-detail-stats--grid:only-of-type { flex: 1; grid-auto-rows: 1fr; margin-bottom: 0; }
.rp-detail-layout--bot > .rp-analytics > .rp-detail-stats--grid:only-of-type .rp-stat { min-height: 90px; display: flex; flex-direction: column; justify-content: space-between; }
.rp-detail-layout--bot > .rp-analytics > .rp-detail-stats--grid:only-of-type .rp-stat--link { flex-direction: row; align-items: flex-start; }
.rp-detail-layout--bot > .rp-analytics > .rp-report-list { margin-top: auto; }
.rp-detail-layout--bot > .rp-analytics > .rp-detail-stats--grid:only-of-type { margin-top: 0; }
/* Usage credit on the twin detail card: text left, progress ring right */
.rp-detail--wide .rp-detail-credit { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--tt-space-5); }
.rp-credit-text { display: flex; flex-direction: column; gap: var(--tt-space-2); min-width: 0; }
.rp-credit-ring { position: relative; flex: none; width: 72px; height: 72px; display: grid; place-items: center; font-size: 15px; line-height: 20px; font-weight: var(--tt-weight-title); color: var(--tt-text-primary); }
.rp-credit-ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--tt-orange-500), var(--tt-blue-600) var(--used), var(--tt-fill-soft) 0); background: conic-gradient(in oklch, var(--tt-orange-500), var(--tt-blue-600) var(--used), var(--tt-fill-soft) 0); -webkit-mask: radial-gradient(circle, transparent 28px, #000 28.5px); mask: radial-gradient(circle, transparent 28px, #000 28.5px); }
.rp-credit-ring.is-low::before { background: conic-gradient(var(--tt-caution) var(--used), var(--tt-fill-soft) 0); }
.rp-credit-ring span { position: relative; }
/* Twin detail card: title + what it does on the left, usage credit parallel on the right, a rule, then the scope */
.rp-detail--wide { grid-template-rows: auto auto auto auto; }
.rp-detail--wide > .rp-detail-head { grid-column: 1; grid-row: 1; margin-bottom: var(--tt-space-5); }
.rp-detail--wide > .rp-detail-main { grid-column: 1; grid-row: 2; }
.rp-detail--wide > .rp-detail-side { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
.rp-detail--wide > .rp-detail-rule { grid-column: 1 / -1; grid-row: 3; width: 100%; height: 0; margin: var(--tt-space-5) 0 0; border: 0; border-top: 1px solid var(--tt-border); }
.rp-detail--wide > .rp-detail-scopeblock { grid-column: 1 / -1; grid-row: 4; min-width: 0; }
.rp-detail--wide .rp-detail-scopeblock > .rp-detail-kicker:first-child { margin-top: var(--tt-space-5); }
@media (max-width: 960px) {
  .rp-detail--wide > .rp-detail-head, .rp-detail--wide > .rp-detail-main, .rp-detail--wide > .rp-detail-side, .rp-detail--wide > .rp-detail-rule, .rp-detail--wide > .rp-detail-scopeblock { grid-column: 1; grid-row: auto; }
}
/* Scope facts as light grey pills in one row */
.rp-detail--wide .rp-scope-list { display: flex; flex-direction: row; flex-wrap: wrap; gap: var(--tt-space-2); margin: var(--tt-space-4) 0 0; padding: 0; list-style: none; }
.rp-detail--wide .rp-scope-list li { display: inline-flex; align-items: center; gap: var(--tt-space-2); padding: 6px 14px 6px 10px; border-radius: var(--tt-radius-pill); background: var(--tt-fill-soft); font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.rp-detail--wide .rp-scope-list li svg { width: 16px; height: 16px; flex: none; margin: 0; color: var(--tt-success); }
.rp-detail--wide .rp-detail-credit { justify-content: flex-start; }
.rp-detail--wide > .rp-detail-side { justify-self: end; width: fit-content; }
@media (max-width: 960px) { .rp-detail--wide > .rp-detail-side { justify-self: stretch; width: auto; } }

/* Weekly chart hover: dim the other bars and show that column's numbers */
.rp-chart-hit { fill: transparent; }
.rp-chart-col { outline: none; cursor: default; }
.rp-chart-bar { transition: opacity var(--tt-duration-quick, 140ms) ease; }
.rp-chart:has(.rp-chart-col:hover) .rp-chart-bar,
.rp-chart:has(.rp-chart-col:focus-visible) .rp-chart-bar { opacity: 0.4; }
.rp-chart .rp-chart-col:hover .rp-chart-bar,
.rp-chart .rp-chart-col:focus-visible .rp-chart-bar { opacity: 1; }
.chart-tip { position: fixed; z-index: var(--tt-z-tooltip); min-width: 168px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; background: var(--tt-surface); color: var(--tt-text-primary); border-radius: var(--tt-radius-md); box-shadow: var(--tt-elevation-2); font-size: 13px; line-height: 18px; pointer-events: none; }
.chart-tip[hidden] { display: none; }
.chart-tip-title { font-weight: var(--tt-weight-label); margin-bottom: 2px; }
.chart-tip-row { display: flex; justify-content: space-between; gap: var(--tt-space-4); color: var(--tt-text-secondary); }
.chart-tip-row b { font-weight: var(--tt-weight-label); color: var(--tt-text-primary); }

/* Usage credit card: white with a soft shadow, and it tilts toward the cursor (see TILT_DEG in app.js) */
.rp-detail--wide .rp-detail-credit {
  position: relative; z-index: 0;
  background: var(--tt-surface); border: 1px solid var(--tt-card-border);
  transform-style: preserve-3d;
  transform: perspective(800px) rotateX(calc(var(--rx, 0) * 1deg)) rotateY(calc(var(--ry, 0) * 1deg)) scale(var(--sc, 1));
  box-shadow: 0 1px 2px rgb(30 28 25 / 0.05), calc(var(--tx, 0) * -1px) 8px 20px rgb(30 28 25 / 0.08);
  transition: transform .6s cubic-bezier(.2, .8, .2, 1), box-shadow .6s cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
}
.rp-detail--wide .rp-detail-credit.is-tilting {
  --sc: 1.04; z-index: 2;
  box-shadow: 0 2px 4px rgb(30 28 25 / 0.06), calc(var(--tx, 0) * -1px) 16px 32px rgb(30 28 25 / 0.14);
  transition: transform .09s linear, box-shadow .09s linear;
}
.rp-detail--wide .rp-detail-credit::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(farthest-corner circle at var(--gx, 50%) var(--gy, 50%), rgb(255 90 0 / 0.10), rgb(255 90 0 / 0.04) 35%, transparent 62%);
  transition: opacity .4s ease;
}
.rp-detail--wide .rp-detail-credit.is-tilting::after { opacity: 1; }
.rp-detail--wide .rp-credit-ring { transform: translateZ(16px); }
.rp-detail--wide .rp-credit-text { transform: translateZ(8px); }
:root[data-theme="dark"] .rp-detail--wide .rp-detail-credit { box-shadow: 0 0 0 1px rgb(253 251 247 / 0.04), calc(var(--tx, 0) * -1px) 8px 20px rgb(0 0 0 / 0.4); }
@media (prefers-reduced-motion: reduce) { .rp-detail--wide .rp-detail-credit { transition: none; } }
/* "View" link on a stat tile: a grey wash on hover instead of an underline */
.rp-stat-view { height: 24px; margin: -6px -8px -6px 0; transition: background-color var(--tt-duration-quick, 140ms) ease; }
.rp-stat-view:hover { text-decoration: none; background: rgb(30 28 25 / 0.08); }
/* Report rows: labels in the same caps style as the tile labels */
.rp-report-list li > span:first-child { font-size: 11px; line-height: 16px; font-weight: var(--tt-weight-label); letter-spacing: 0.09em; text-transform: uppercase; color: var(--tt-text-secondary); }

/* Twin agent and scenario cards: the quote bubble tilts toward the cursor while the card is hovered (see tiltTo in app.js) */
.rp-art .rp-quote-bubble {
  transform-style: preserve-3d;
  transform: perspective(700px) rotateX(calc(var(--rx, 0) * 1deg)) rotateY(calc(var(--ry, 0) * 1deg)) scale(var(--sc, 1));
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.08);
  transition: transform .6s cubic-bezier(.2, .8, .2, 1), box-shadow .6s cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
}
.rp-art .rp-quote-bubble.is-tilting {
  --sc: 1.04;
  box-shadow: calc(var(--tx, 0) * -1px) 12px 22px rgb(30 28 25 / 0.18), 0 2px 6px rgb(0 0 0 / 0.08);
  transition: transform .09s linear, box-shadow .09s linear;
}
.rp-art .rp-quote-bubble::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(farthest-corner circle at var(--gx, 50%) var(--gy, 50%), rgb(255 90 0 / 0.10), rgb(255 90 0 / 0.04) 35%, transparent 62%);
  transition: opacity .4s ease;
}
.rp-art .rp-quote-bubble.is-tilting::after { opacity: 1; }
.rp-art .rp-quote-face { transform: translateZ(14px); }
.rp-art .rp-quote-text { transform: translateZ(6px); }
@media (prefers-reduced-motion: reduce) { .rp-art .rp-quote-bubble { transition: none; } }

/* Bot processing: letters glitch across the card behind the progress (see letterGlitch in app.js) */
.bot-preview--wait { position: relative; }
.letter-glitch { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; }
.letter-glitch-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.bot-preview--wait > .bot-proc--wait { position: relative; z-index: 1; pointer-events: none; padding-inline: var(--tt-space-6); align-items: center; }
.bot-proc-panel { width: min(100%, 360px); display: flex; flex-direction: column; gap: var(--tt-space-3); padding: var(--tt-space-4) var(--tt-space-5); background: var(--tt-surface); border-radius: var(--tt-radius-md); box-shadow: 0 1px 2px rgb(30 28 25 / 0.06), 0 8px 24px rgb(30 28 25 / 0.12); }
.bot-proc-panel .bot-proc-track { background: var(--tt-fill-soft); }
/* Assign dialog: the minutes dropdown is greyed out, like Save and Assign, until the learner is ticked */
.assign-minbtn:disabled { background: var(--tt-fill-soft); color: var(--tt-text-muted); border-color: transparent; cursor: not-allowed; }
.assign-minbtn:disabled svg { color: var(--tt-text-muted); }
/* Assign dialog: the access period is a note beside the button, not a column */
.confirm-actions--note { justify-content: space-between; align-items: center; }
.assign-note { display: flex; align-items: center; gap: var(--tt-space-2); margin: 0; min-width: 0; font-size: 13px; line-height: 18px; color: var(--tt-text-secondary); }
.assign-note svg { flex: none; width: 16px; height: 16px; }
/* Assign dialog toolbar: the cohort filter sits on the left, the search takes the rest and sits on the right */
.assign-toolbar .assign-cohort { flex: none; }
.assign-toolbar .assign-find, .assign-toolbar .assign-find.is-open { flex: 1; width: auto; max-width: none; margin: 0; }
/* "8 ↗" report link: a grey wash on hover; the padding is pulled back out so the number keeps its place */
.bot-asked-link { padding: 2px 8px; margin: -2px -8px -2px 0; border-radius: var(--tt-radius-pill); transition: background-color var(--tt-duration-quick, 140ms) ease; }
.bot-asked-link:hover { background: rgb(30 28 25 / 0.08); }

/* Sessions summary: average help score with paid-by-learners under it on the left; Sessions and minutes above Questions and issues on the right */
.ts-metrics--split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--tt-space-4); align-items: stretch; padding: 0; border: 0; }
.ts-metrics--split .tm-left { display: flex; flex-direction: column; gap: var(--tt-space-4); min-width: 0; }
.ts-metrics--split .tm-left .tm-rating, .ts-metrics--split .tm-left .tm-hero { flex: 1; }
.ts-metrics--split .tm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: var(--tt-space-4); min-width: 0; padding: 0; border: 0; }
.ts-metrics--split .tm-grid .tm-metric, .ts-metrics--split .tm-grid .tm-metric + .tm-metric { display: flex; flex-direction: column; justify-content: center; border: 0; }
@media (max-width: 900px) { .ts-metrics--split { grid-template-columns: 1fr; } }
.ts-metrics--split .tm-grid .tm-metric, .ts-metrics--split .tm-grid .tm-metric:nth-child(odd), .ts-metrics--split .tm-grid .tm-metric:nth-child(even), .ts-metrics--split .tm-grid .tm-metric:nth-child(n + 3) { padding: var(--tt-space-4) var(--tt-space-5); border: 0; }

/* "Here's what we found": profiles arrive one by one, a loader on the right for 3 seconds, then the tick and "Not me" */
.v2-spin { display: none; flex: none; align-items: center; justify-content: center; width: 24px; height: 24px; }
.v2-spin .lattice-loader.lattice-loader--mini { --ll-cell: 5px; --ll-gap: 2px; color: var(--tt-text-primary); }
.v2-prof--wait { opacity: 0; transform: translateY(12px) scale(.98); pointer-events: none; }
.v2-prof--load .v2-spin { display: flex; }
.v2-prof--wait .v2-ok, .v2-prof--wait .head-copy-end .btn, .v2-prof--load .v2-ok, .v2-prof--load .head-copy-end .btn { display: none; }
.v2-prof--load.is-fresh { animation: v2-in .42s cubic-bezier(.2, .8, .2, 1) both; }
.v2-prof--load.is-fresh .profile-avatar { animation: v2-avatar .5s cubic-bezier(.2, .8, .2, 1) .08s both; }
@keyframes v2-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes v2-avatar { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.v2-prof--done.is-fresh .v2-ok { animation: v2-pop .45s cubic-bezier(.3, 1.6, .5, 1) both; }
.v2-prof--done.is-fresh .v2-ok path { stroke-dasharray: 24; animation: v2-draw .4s ease-out .05s both; }
.v2-prof--done.is-fresh .head-copy-end .btn { animation: v2-slide .35s cubic-bezier(.2, .8, .2, 1) .12s both; }
@keyframes v2-pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes v2-draw { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
@keyframes v2-slide { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .v2-prof--wait { transform: none; } .v2-prof.is-fresh, .v2-prof.is-fresh * { animation: none !important; } }
/* Finished steps: a tick inside the grey circle */
.setup-steps li.is-done .n { background: var(--tt-fill-soft); color: var(--tt-text-primary); }
.setup-steps li.is-done .n svg { width: 14px; height: 14px; stroke-width: 2.4; }
/* "Not me" is a grey bin icon; it darkens on hover */
.v2-found .v2-del { color: var(--tt-text-tertiary); }
.v2-found .v2-del:hover { color: var(--tt-text-primary); background: rgb(30 28 25 / 0.08); }
.v2-found .v2-del svg { width: 18px; height: 18px; }
.v2-found .v2-del { color: var(--tt-text-muted); }
.v2-found .v2-del:hover { color: var(--tt-text-primary); background: var(--tt-fill-soft); }
/* Add your voice flow: the full-width buttons are 52px tall */
.btn.vs-full { height: 52px; min-height: 52px; }

/* "Record your voice": a star runs around the border (see starBorder in app.js) */
.btn.vs-rec { position: relative; isolation: isolate; overflow: visible; }
.btn.vs-rec .star-border__light { position: absolute; top: -48px; left: -48px; z-index: -1; width: calc(100% + 96px); height: calc(100% + 96px); max-width: none; pointer-events: none; }
/* Add your voice, recorded: a yellow note under the button about knowledge not being added yet */
.vs-note { width: 100%; display: flex; align-items: flex-start; gap: var(--tt-space-3); margin: var(--tt-space-4) 0 0; padding: var(--tt-space-3) var(--tt-space-4); border-radius: var(--tt-radius-md); background: var(--tt-caution-subtle); color: var(--tt-caution); font-size: 13px; line-height: 18px; text-align: left; }
.vs-note svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.vs-note b { font-weight: var(--tt-weight-label); }
.setup-card .actions.v2-foot { justify-content: space-between; }
.btn .vs-dur { font-weight: var(--tt-weight-body); color: var(--tt-text-secondary); }
/* Waveform at rest: a light grey from the tokens, no opacity */
.vs-wave i { background: var(--tt-border-field); opacity: 1; }
.vs-wave.is-live i { background: var(--tt-primary); }
/* Script to read: white with a light stroke (it turns orange-tinted while recording) */
.vs-script { background: var(--tt-surface); border-color: var(--tt-border); }
.vs-script.is-live { border-color: var(--tt-primary-border); background: var(--tt-primary-subtle); }
/* Recording: the script is read along, a word at a time turning bold and 16px; the box keeps one height throughout. */
.vs-script.is-live .vs-w.is-read { font-weight: 700; font-size: 16px; }
/* The script is 14px; a word that has been read turns bold and 16px */
.vs-script { font-size: 14px; line-height: 28px; }
.vs-script { box-sizing: border-box; min-height: 148px; }
/* Twin ready checklist: white with a light grey border */
.v2c-checks { background: var(--tt-surface); border: var(--tt-border-thin) solid var(--tt-border); }

/* Twin ready: the menu opens from its narrow width, pushing the page across, and its items slide in one after another */
.rail.rail--opening { overflow: hidden; animation: rail-open .8s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rail-open { from { width: 72px; } to { width: 214px; } }
.rail--opening .nav-item, .rail--opening .nav-item span { white-space: nowrap; }
.rail--opening .rail-nav > *, .rail--opening .rail-foot > *, .rail--opening .rail-brand-actions { animation: rail-item-in .5s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rail-item-in { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.rail--opening .rail-nav > :nth-child(1) { animation-delay: .15s; }
.rail--opening .rail-nav > :nth-child(2) { animation-delay: .19s; }
.rail--opening .rail-nav > :nth-child(3) { animation-delay: .23s; }
.rail--opening .rail-nav > :nth-child(4) { animation-delay: .27s; }
.rail--opening .rail-nav > :nth-child(5) { animation-delay: .31s; }
.rail--opening .rail-nav > :nth-child(6) { animation-delay: .35s; }
.rail--opening .rail-nav > :nth-child(7) { animation-delay: .39s; }
.rail--opening .rail-nav > :nth-child(8) { animation-delay: .43s; }
.rail--opening .rail-nav > :nth-child(9) { animation-delay: .47s; }
.rail--opening .rail-nav > :nth-child(n + 10) { animation-delay: .51s; }
.rail--opening .rail-foot > * { animation-delay: .55s; }
.rail--opening .rail-nav .nav-item[aria-current="page"] { animation: rail-item-in .5s cubic-bezier(.2, .8, .2, 1) .3s both, rail-pop .5s cubic-bezier(.3, 1.5, .5, 1) .5s both; }
@keyframes rail-pop { 0% { transform: scale(.96); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .rail.rail--opening, .rail--opening .rail-nav > *, .rail--opening .rail-foot > *, .rail--opening .rail-brand-actions { animation: none; } }
/* Before anything is picked, a dropdown reads like a placeholder: grey. Options inside the list stay dark. */
.input.is-empty { color: var(--tt-text-muted); }
select.input.is-empty option { color: var(--tt-text-primary); }
select.input.is-empty option[value=""] { color: var(--tt-text-muted); }
/* A card that is open for editing sits in front; the other cards, tags and links blur until it is closed */
.flow-board > .flow-node, .flow-board > .flow-tag, .flow-board > .flow-links { transition: filter .3s ease, opacity .3s ease; }
.flow-board.has-focus > .flow-node:not(.is-editing), .flow-board.has-focus > .flow-tag, .flow-board.has-focus > .flow-links { filter: blur(4px); opacity: .55; pointer-events: none; }
.flow-board.has-focus > .flow-tag:has(+ .flow-node.is-editing) { filter: none; opacity: 1; }
.studio-foot.studio-foot--split { justify-content: space-between; }
@media (prefers-reduced-motion: reduce) { .flow-board > .flow-node, .flow-board > .flow-tag, .flow-board > .flow-links { transition: none; } }
/* Knowledge card: the sources scroll, the Cancel / Save row stays put at the bottom like the Training style card */
.flow-node.is-editing:has(.kn-body) { overflow: hidden; }
.kn-body { flex: 1; min-height: 0; overflow: auto; align-self: stretch; display: flex; flex-direction: column; gap: var(--tt-space-3); }
.flow-node.is-editing:has(.kn-body) .studio-foot { margin-top: 0 !important; flex: none; }
/* Rule actions line up as Edit | Test | switch: two secondary buttons of one width, then the switch */
.tsf-edit, .tsf-test { flex: none; min-width: 76px; justify-content: center; padding-inline: var(--tt-space-3); }
.tsf-edit svg, .tsf-test svg { width: 14px; height: 14px; }
.tsf-edit--none { display: block; height: 1px; }
.tsf-rule .rps-switch, .tsf-rule .tsf-lock { flex: none; }
/* About my twin: click the text to edit it where it stands */
.ts-overview--editable { cursor: text; margin: 4px -8px 10px; padding: 4px 8px; border-radius: var(--tt-radius-sm); transition: background-color var(--tt-duration-quick, 140ms) ease; }
.ts-overview--editable:hover { background: var(--tt-fill-soft); }
.ts-overview--editable:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 0; }
textarea.ts-overview-edit { flex: none; width: 100%; height: 60px; max-height: 60px; margin: 4px 0 10px; resize: none; font-size: 14px; line-height: 20px; padding: 8px; min-height: 0; overflow-y: auto; }
/* More air between the "About my twin" lines */
.ts-full .ts-sec ul { gap: var(--tt-space-4); }
/* Training style header: a link to the twin's memory, beside the collapse icon */
.ts-head-end { display: inline-flex; align-items: center; gap: var(--tt-space-3); }
.ts-memory-link { display: inline-flex; align-items: center; gap: var(--tt-space-1); padding: 4px 8px; border-radius: var(--tt-radius-pill); color: var(--tt-primary-ink); font-size: 13px; line-height: 18px; font-weight: var(--tt-weight-label); text-decoration: none; transition: background-color var(--tt-duration-quick, 140ms) ease; }
.ts-memory-link:hover { background: var(--tt-primary-subtle); }
.ts-memory-link:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }
.ts-memory-link svg { width: 14px; height: 14px; flex: none; }
/* Voice library: Back sits at the bottom left of the card */
.vs-foot { width: 100%; display: flex; justify-content: flex-start; margin-top: var(--tt-space-5); padding-top: var(--tt-space-4); border-top: var(--tt-border-thin) solid var(--tt-border); }
/* Step 1 title and line centred, like the other steps; the form fields stay left-aligned */
.v2-form > .page-title, .v2-form > .vs-sub { text-align: center; align-self: center; }
/* Voice library rows: light grey */
.vs-lib .voice-row { background: var(--tt-fill-soft); }
.v2-voice-note b { font-weight: var(--tt-weight-label); }
/* Training style: what we found about you, above the Do's & Don'ts */
.tsf-found { display: flex; flex-direction: column; gap: var(--tt-space-2); padding: var(--tt-space-3) var(--tt-space-4); border-radius: var(--tt-radius-md); background: var(--tt-fill-soft); }
.tsf-found .v2f-bullets { margin: 0; }
.tsf-found .know-section-sub { margin: 0; font-size: 12px; line-height: 16px; }
.tsf-sub { margin: 0; font-size: 13px; line-height: 18px; color: var(--tt-text-secondary); }
.tsf-chips { margin-top: var(--tt-space-1); }
/* Training style: tabs above the content */
.ts-tabs { display: flex; gap: var(--tt-space-5); border-bottom: var(--tt-border-thin) solid var(--tt-border); margin-bottom: var(--tt-space-4); }
.ts-tab { appearance: none; border: 0; background: transparent; margin: 0 0 -1px; padding: var(--tt-space-2) 0; font: inherit; font-size: 14px; line-height: 20px; font-weight: var(--tt-weight-label); color: var(--tt-text-secondary); cursor: pointer; border-bottom: 2px solid transparent; transition: color var(--tt-duration-quick, 140ms) ease, border-color var(--tt-duration-quick, 140ms) ease; }
.ts-tab:hover { color: var(--tt-text-primary); }
.ts-tab[aria-selected="true"] { color: var(--tt-text-primary); border-bottom-color: var(--tt-primary); }
.ts-tab:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; border-radius: var(--tt-radius-sm); }
/* Knowledge sources: a switch instead of a tick box */
.check.check--switch { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 40px; height: 24px; padding: 0; border: 0; border-radius: var(--tt-radius-pill); background: var(--tt-border); cursor: pointer; transition: background-color var(--tt-duration-quick) var(--tt-ease-standard); }
.check.check--switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; margin: 0; border: 0; border-radius: 50%; background: var(--tt-surface); box-shadow: 0 1px 2px rgb(0 0 0 / 0.2); transform: none; transition: transform var(--tt-duration-quick) var(--tt-ease-standard); }
.check.check--switch:hover, .check.check--switch:focus { border-color: transparent; }
.check.check--switch:checked { background: var(--tt-primary); border-color: transparent; }
.check.check--switch:checked::after { width: 20px; height: 20px; border: 0; rotate: none; translate: none; transform: translateX(16px); }
.check.check--switch { display: block; }
.check.check--switch:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }
/* Voice and avatar editor: one LinkedIn photo (or an upload), one voice */
.pres-row { display: flex; align-items: center; gap: var(--tt-space-3); padding: var(--tt-space-3); border-radius: var(--tt-radius-md); background: var(--tt-fill-soft); }
.pres-row .voice-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pres-row .voice-copy b { font-weight: var(--tt-weight-label); font-size: 14px; line-height: 20px; }
.pres-row .voice-copy p { margin: 0; font-size: 13px; line-height: 18px; color: var(--tt-text-secondary); }
.pres-row .voice-ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--tt-surface); color: var(--tt-text-primary); }
.pres-row .voice-ico svg { width: 18px; height: 18px; }
.pres-photo { flex: none; width: 56px; height: 56px; border-radius: var(--tt-radius-md); overflow: hidden; background: var(--tt-surface-sunken); }
.pres-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pres-btns { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tt-space-2); margin-top: var(--tt-space-3); }
.pres-btns svg { width: 14px; height: 14px; }
.pres-lib { margin-top: var(--tt-space-3); }
.pres-lib .voice-list { margin-top: 0; }
/* Card footers: Cancel is a plain grey button */
.studio-foot .btn[data-action="cancel-knowledge"], .studio-foot .btn[data-action="cancel-style-full"] { background: var(--tt-fill-soft); box-shadow: none; }
.studio-foot .btn[data-action="cancel-knowledge"]:hover:not(:disabled), .studio-foot .btn[data-action="cancel-style-full"]:hover:not(:disabled) { background: color-mix(in srgb, var(--tt-text-primary) 10%, var(--tt-surface)); box-shadow: none; }
/* Knowledge card: the uploaded-materials row */
.flow-line-ico--glyph { display: grid; place-items: center; color: var(--tt-text-secondary); }
/* Found page: platform icons on the left, no background circle */
.v2-prof .v2-tile { background: none; width: 28px; height: 28px; color: var(--tt-text-primary); }
.v2-prof .v2-tile svg { width: 24px; height: 24px; }
/* Found page: 4px between the title line and the line under it (the title row is 32px tall for the delete button) */
.v2-prof .head-copy-top + .card-sub { margin-top: -6px; }
/* Found page: the dot between the details is 3x the text size */
.v2-prof .card-sub .v2-dot { font-size: 3em; line-height: 0; vertical-align: middle; }
/* Call: what the twin is doing, just under its picture */
.talk-state { flex: none; display: inline-flex; align-items: center; gap: var(--tt-space-2); margin: var(--tt-space-4) 0 0; padding: 4px 14px 4px 12px; border-radius: var(--tt-radius-pill); background: var(--tt-fill-soft); color: var(--tt-text-secondary); font-size: 13px; line-height: 18px; font-weight: var(--tt-weight-label); }
.talk-state + .talk-thread { margin-top: var(--tt-space-5); }
.talk-state-ind { display: inline-flex; align-items: center; justify-content: center; gap: 2px; width: 18px; height: 16px; }
.talk-state-ind i { display: block; width: 3px; height: 4px; border-radius: 2px; background: currentColor; }
.talk-state--listening .talk-state-ind i { animation: talk-bar 1.6s ease-in-out infinite; }
.talk-state--speaking { color: var(--tt-primary-ink); background: var(--tt-primary-subtle); }
.talk-state--speaking .talk-state-ind i { animation: talk-bar .7s ease-in-out infinite; }
.talk-state--thinking .talk-state-ind { gap: 3px; }
.talk-state--thinking .talk-state-ind i { width: 4px; height: 4px; border-radius: 50%; animation: talk-dot 1s ease-in-out infinite; }
.talk-state--thinking .talk-state-ind i:nth-child(4) { display: none; }
.talk-state-ind i:nth-child(2) { animation-delay: .15s; }
.talk-state-ind i:nth-child(3) { animation-delay: .3s; }
.talk-state-ind i:nth-child(4) { animation-delay: .45s; }
@keyframes talk-bar { 0%, 100% { height: 4px; } 50% { height: 14px; } }
@keyframes talk-dot { 0%, 100% { transform: translateY(0); opacity: .45; } 50% { transform: translateY(-3px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .talk-state-ind i { animation: none !important; } }
/* Single-choice option in the same menu as the use-case picker */
.v2-ms-opt--single { width: 100%; justify-content: space-between; border: 0; background: transparent; font: inherit; font-size: 14px; line-height: 20px; text-align: left; }
.v2-ms-opt--single.is-selected { font-weight: var(--tt-weight-label); }
.v2-ms-opt--single svg { width: 16px; height: 16px; flex: none; color: var(--tt-text-primary); }
/* Step 1 form follows the design system: field text 14px, dropdown options 13.5px on 7px 10px rows, selected row on --tt-fill-soft */
.v2-form .input, .v2-form .v2-ms-trigger { font-size: 14px; }
.v2-ms-menu { padding: var(--tt-space-1); display: flex; flex-direction: column; gap: 1px; border: var(--tt-border-thin) solid var(--tt-border); }
.v2-ms-menu .v2-ms-opt { min-height: 0; padding: 7px 10px; border-radius: var(--tt-radius-sm); font-size: 13.5px; line-height: 20px; }
.v2-ms-menu .v2-ms-opt--single.is-selected { background: var(--tt-fill-soft); font-weight: var(--tt-weight-label); }
.v2-ms-menu .v2-ms-opt--single:not(.is-selected) { font-weight: 400; }
/* About me: the card and the pill morph into each other, and the call column slides to its new place */
.talk-page--ob .v2f-card, .talk-page--ob .v2f-float { view-transition-name: v2f-about; }
.talk-page--ob .talk-col { view-transition-name: v2f-talk; }
::view-transition-group(v2f-about), ::view-transition-group(v2f-talk) { animation-duration: 420ms; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
::view-transition-old(v2f-about), ::view-transition-new(v2f-about) { height: 100%; width: 100%; object-fit: none; object-position: top right; }
::view-transition-old(v2f-about) { animation-duration: 160ms; }
::view-transition-new(v2f-about) { animation-duration: 300ms; animation-delay: 120ms; animation-fill-mode: both; }
::view-transition-old(v2f-talk), ::view-transition-new(v2f-talk) { height: 100%; width: 100%; object-fit: none; object-position: top center; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
/* The twin's bubble on the call wears the brand colour (white on primary, D01) */
.talk-page .talk-col .talk-msg.is-twin .talk-bubble:not(.talk-bubble--ask) { background: var(--tt-primary); color: var(--tt-on-primary); }
/* Twin ready: the sources as icon links under the role line */
.v2c-links { display: flex; align-items: center; justify-content: center; gap: var(--tt-space-1); margin-top: var(--tt-space-3); }
.v2c-link { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--tt-radius-pill); color: var(--tt-text-secondary); text-decoration: none; transition: background-color var(--tt-duration-quick) var(--tt-ease-standard), color var(--tt-duration-quick) var(--tt-ease-standard); }
.v2c-link:hover, .v2c-link:focus-visible { background: var(--tt-fill-soft); color: var(--tt-text-primary); }
.v2c-link:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }
.v2c-link::after { content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + 6px); z-index: var(--tt-z-tooltip); transform: translate(-50%, 2px); padding: 4px 10px; border-radius: var(--tt-radius-sm); background: var(--tt-cta-strong); color: var(--tt-on-cta-strong); font-size: 12px; line-height: 16px; font-weight: var(--tt-weight-label); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity var(--tt-duration-quick) var(--tt-ease-standard), transform var(--tt-duration-quick) var(--tt-ease-standard); }
.v2c-link:hover::after, .v2c-link:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
/* Persona page: card / list switch beside the section title */
.rps-panel-head--page > .seg { flex: none; }
/* Persona list view: one row per persona */
.rps-list { margin-top: var(--tt-space-2); background: var(--tt-surface); border: var(--tt-border-thin) solid var(--tt-border); border-radius: var(--tt-radius-lg); overflow: hidden; }
.rps-list .rps-row { display: grid; grid-template-columns: 40px minmax(150px, 1.1fr) minmax(130px, 1fr) minmax(0, 2fr) minmax(90px, .8fr) 36px; align-items: center; gap: var(--tt-space-4); padding: var(--tt-space-3) var(--tt-space-4); cursor: pointer; transition: background-color var(--tt-duration-quick) var(--tt-ease-standard); }
.rps-list .rps-row + .rps-row { border-top: var(--tt-border-thin) solid var(--tt-border); }
.rps-list .rps-row:hover, .rps-list .rps-row:focus-visible { background: var(--tt-fill-soft); outline: none; }
.rps-row-photo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--tt-fill-soft); }
.rps-row-photo--initial { display: grid; place-items: center; font-size: 15px; font-weight: var(--tt-weight-label); color: var(--tt-text-secondary); }
.rps-row-who { display: flex; flex-direction: column; min-width: 0; }
.rps-row-who b { font-size: 14px; line-height: 20px; font-weight: var(--tt-weight-label); }
.rps-row-who span { font-size: 13px; line-height: 18px; color: var(--tt-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rps-row-role { font-size: 14px; line-height: 20px; color: var(--tt-text-primary); }
.rps-row-tags { display: flex; flex-wrap: wrap; gap: var(--tt-space-1); min-width: 0; }
.rps-row-tag { padding: 2px 10px; border-radius: var(--tt-radius-pill); background: var(--tt-fill-soft); color: var(--tt-text-secondary); font-size: 12px; line-height: 20px; font-weight: var(--tt-weight-label); white-space: nowrap; }
.rps-list .rps-row:hover .rps-row-tag { background: var(--tt-surface); }
.rps-row-voice { font-size: 13px; line-height: 18px; color: var(--tt-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rps-row-edit { position: static; justify-self: end; }
@media (max-width: 900px) { .rps-list .rps-row { grid-template-columns: 40px minmax(0, 1fr) 36px; } .rps-row-role, .rps-row-tags, .rps-row-voice { display: none; } }
.rps-row-tags { flex-wrap: nowrap; }
.rps-row-tag:first-child { overflow: hidden; text-overflow: ellipsis; }
.rps-list .rps-row:hover .rps-card-edit, .rps-list .rps-row:focus-within .rps-card-edit { opacity: 1; }
/* Twin's brain: floating tabs under the toolbar, and the Questions / Reports card in the middle */
.flow-tabs { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); z-index: 6; background: var(--tt-surface); box-shadow: var(--tt-elevation-2); }
.flow-tabs button { display: inline-flex; align-items: center; gap: var(--tt-space-2); }
.flow-tabs button[aria-selected="true"] { background: var(--tt-fill-soft); color: var(--tt-text-primary); box-shadow: none; }
.flow-canvas.is-bare .flow-board { display: none; }
.flow-zoom[hidden] { display: none; }
.brain-pane { position: absolute; inset: 120px 0 0 0; z-index: 4; overflow-y: auto; display: flex; justify-content: center; align-items: flex-start; padding: 0 var(--tt-space-4) var(--tt-space-8); pointer-events: none; }
.brain-pane > * { pointer-events: auto; }
.brain-card { width: min(820px, 100%); min-height: 0; box-sizing: border-box; box-shadow: var(--tt-elevation-1); }
/* Questions / Reports card: the same lift as the Knowledge, Training style and Voice cards */
.brain-card { border-color: var(--tt-card-border); box-shadow: 0 2px 4px rgb(30 28 25 / 0.0525), 0 8px 20px rgb(30 28 25 / 0.0825); }
/* Dismiss a question: a light grey bin, dark on hover */
.inbox-del { color: var(--tt-text-muted); }
.inbox-del:hover { color: var(--tt-text-primary); background: var(--tt-fill-soft); }
.inbox-del svg { width: 18px; height: 18px; }
/* Answering a question: the card turns grey and the box you type in stays white */
.inbox-card.is-answering { background: var(--tt-fill-soft); border-color: var(--tt-fill-soft); }
.inbox-card.is-answering .inbox-answer .input { background: var(--tt-surface); }
.inbox-card.is-answering .inbox-agent { background: var(--tt-surface); }
.inbox-card.is-answering .btn--ghost:hover:not(:disabled) { background: rgb(30 28 25 / 0.06); }
/* Questions: Unanswered / History menu inside the card, list on the right */
.brain-card--split { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: var(--tt-space-6); align-items: start; }
.brain-menu { display: flex; flex-direction: column; gap: 2px; }
.brain-list { min-width: 0; display: flex; flex-direction: column; gap: var(--tt-space-3); }
@media (max-width: 720px) { .brain-card--split { grid-template-columns: minmax(0, 1fr); } .brain-menu { flex-direction: row; } }
/* A line between the menu and the list, running the full height of the card */
.brain-card--split { column-gap: 0; align-items: stretch; }
.brain-menu { align-self: stretch; margin-block: calc(var(--tt-space-5) * -1); padding: var(--tt-space-5) var(--tt-space-5) var(--tt-space-5) 0; border-right: var(--tt-border-thin) solid var(--tt-border); }
.brain-list { padding-left: var(--tt-space-6); }
@media (max-width: 720px) { .brain-menu { margin-block: 0; padding: 0 0 var(--tt-space-3); border-right: 0; border-bottom: var(--tt-border-thin) solid var(--tt-border); } .brain-list { padding-left: 0; } }
.brain-menu-label { display: inline-flex; align-items: center; gap: var(--tt-space-3); }
.brain-menu-label svg { width: 18px; height: 18px; flex: none; }
/* Questions menu: grey like the main left nav, with the same white lifted pill for the open item */
.brain-card--split { grid-template-columns: 216px minmax(0, 1fr); }
.brain-menu { margin: calc(var(--tt-space-5) * -1) 0 calc(var(--tt-space-5) * -1) calc(var(--tt-space-6) * -1); padding: var(--tt-space-5) var(--tt-space-4) var(--tt-space-5) var(--tt-space-4); background: var(--tt-surface-sunken); border-radius: calc(var(--tt-radius-lg) - 1px) 0 0 calc(var(--tt-radius-lg) - 1px); }
.brain-menu .inbox-menu-item:hover { background: rgb(30 28 25 / 0.05); }
.brain-menu .inbox-menu-item[aria-current="page"] { background: var(--tt-surface); color: var(--tt-primary-ink); font-weight: var(--tt-weight-label); box-shadow: var(--tt-elevation-1); }
.brain-menu .inbox-menu-item[aria-current="page"] svg { color: var(--tt-primary); }
@media (max-width: 720px) { .brain-menu { margin: 0 0 var(--tt-space-3); padding: var(--tt-space-3); border-radius: var(--tt-radius-md); } }
/* Questions menu items: 8px corner, the same as the left nav items */
.brain-menu .inbox-menu-item { border-radius: var(--tt-radius-sm); }
/* Questions menu rows are sized like the left nav: 32px tall, 8px side padding, 20px icon, 8px to the label */
.brain-menu { gap: var(--tt-space-2); }
.brain-menu .inbox-menu-item { min-height: 32px; height: 32px; padding: 0 var(--tt-space-2); font-size: 14px; }
.brain-menu .brain-menu-label { gap: var(--tt-space-2); }
.brain-menu .brain-menu-label svg { width: 20px; height: 20px; }
/* Questions menu: a small orange dot when something is waiting, like the Inbox in the left nav */
.brain-menu .inbox-count { min-width: 0; width: 8px; height: 8px; padding: 0; margin-right: var(--tt-space-1); font-size: 0; line-height: 0; }
.flow-tabs .inbox-count { min-width: 0; width: 8px; height: 8px; padding: 0; font-size: 0; line-height: 0; }
/* Questions: filter chips under the subtext, search on the right */
.bq-filters { display: flex; align-items: center; gap: var(--tt-space-2); flex-wrap: wrap; margin: var(--tt-space-1) 0 var(--tt-space-1); }
.bq-grow { flex: 1; }
.bq-chip-wrap.twin-hero-ask-type { margin-left: 0; }
.bq-chip { display: inline-flex; align-items: center; gap: var(--tt-space-2); height: 32px; padding: 0 var(--tt-space-4); border: var(--tt-border-thin) solid var(--tt-border-field, var(--tt-border)); border-radius: var(--tt-radius-pill); background: var(--tt-surface); color: var(--tt-text-primary); font: inherit; font-size: 13px; line-height: 18px; font-weight: var(--tt-weight-label); cursor: pointer; transition: background-color var(--tt-duration-quick) var(--tt-ease-standard), border-color var(--tt-duration-quick) var(--tt-ease-standard); }
.bq-chip:hover { border-color: var(--tt-border-interactive); }
.bq-chip.is-on { background: var(--tt-fill-soft); border-color: transparent; }
.bq-chip:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }
.bq-sep { width: 1px; height: 14px; background: var(--tt-border); }
.bq-ico { display: inline-grid; place-items: center; }
.bq-ico svg { width: 16px; height: 16px; }
.bq-ico--open { color: var(--tt-text-secondary); }
.bq-ico--history { color: var(--tt-success, #2E7D32); }
.bq-chip-wrap .twin-hero-ask-menu { min-width: 180px; z-index: var(--tt-z-dropdown); }
.bq-search-btn { color: var(--tt-text-secondary); }
.bq-search { display: flex; align-items: center; gap: var(--tt-space-1); position: relative; }
.bq-search .input { width: 220px; height: 32px; padding-left: 34px; font-size: 14px; }
.bq-search-ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--tt-text-tertiary); display: grid; pointer-events: none; }
.bq-item[hidden], .bq-none[hidden] { display: none; }
.bq-item + .bq-item { margin-top: var(--tt-space-3); }
.bq-filters { flex-wrap: nowrap; }
.bq-search { flex: 0 1 220px; min-width: 130px; }
.bq-search .input { width: 100%; min-width: 0; }
.bq-chip { white-space: nowrap; flex: none; }
.bq-chip-wrap { flex: none; }
/* Questions as a list: wider card, one compact row per question */
.brain-card.brain-card--split { width: min(1120px, 100%); }
.bq-list { background: var(--tt-surface); border: var(--tt-border-thin) solid var(--tt-border); border-radius: var(--tt-radius-md); overflow: hidden; }
.bq-item + .bq-item { margin-top: 0; border-top: var(--tt-border-thin) solid var(--tt-border); }
.bq-list .inbox-card { border: 0; border-radius: 0; box-shadow: none; padding: var(--tt-space-2) var(--tt-space-4); background: transparent; }
.bq-list .inbox-card:not(.is-answering):hover { background: var(--tt-fill-soft); }
.bq-list .inbox-card.is-answering { padding-top: var(--tt-space-3); padding-bottom: var(--tt-space-4); }
.bq-list .inbox-row { align-items: center; gap: var(--tt-space-4); }
.bq-list .inbox-main { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(150px, 190px) minmax(0, 1fr) auto; align-items: center; column-gap: var(--tt-space-4); row-gap: var(--tt-space-1); }
.bq-list .inbox-who { margin: 0; min-width: 0; flex-wrap: nowrap; }
.bq-list .inbox-who b { font-size: 13px; white-space: nowrap; }
.bq-list .inbox-who-detail { display: none; }
.bq-list .inbox-title { margin: 0; font-size: 14px; line-height: 20px; font-weight: var(--tt-weight-label); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bq-list .inbox-agent { margin: 0; white-space: nowrap; }
.bq-list .inbox-quote { grid-column: 1 / -1; margin: 0; }
.bq-list .inbox-actions { flex: none; }
@media (max-width: 900px) { .bq-list .inbox-main { grid-template-columns: minmax(0, 1fr); } .bq-list .inbox-title { white-space: normal; } }
.bq-list .inbox-main { grid-template-columns: minmax(110px, 130px) minmax(0, 1fr) auto; }
.bq-list .inbox-who { gap: var(--tt-space-2); }
/* Questions card fills the height under the tabs, so the menu column runs top to bottom */
.brain-card.brain-card--split { align-self: stretch; }
/* Questions menu is as wide as the left nav (214px, 12px side padding, 190px rows) */
.brain-card--split { grid-template-columns: 190px minmax(0, 1fr); }
.brain-menu { padding-left: 12px; padding-right: 12px; }
.bq-chip .bq-ico { color: var(--tt-text-secondary); }
.bq-chip { gap: var(--tt-space-2); padding-left: var(--tt-space-3); }
/* Average-rating stars: 75% of the old 66px */
.tm-rating .tm-illus { width: 50px; height: 50px; }
/* Issues: same wide, full-height card and compact rows as Questions */
.brain-card.brain-card--wide { width: min(1120px, 100%); align-self: stretch; }
/* Column labels for the Questions and Issues lists; columns have fixed widths so labels line up with the rows */
.bq-list .inbox-main { grid-template-columns: 130px minmax(0, 1fr) 190px; }
.bq-list .inbox-agent { justify-self: start; }
.bq-list--q .inbox-actions, .bq-list--q .bq-head-act { width: 112px; }
.bq-list--issues .inbox-actions, .bq-list--issues .bq-head-act { width: 248px; }
.bq-list--q .inbox-actions, .bq-list--issues .inbox-actions { justify-content: flex-end; }
.bq-head { display: flex; align-items: center; gap: var(--tt-space-4); padding: var(--tt-space-2) var(--tt-space-4); background: var(--tt-fill-soft); border-bottom: var(--tt-border-thin) solid var(--tt-border); font-size: 12px; line-height: 16px; font-weight: var(--tt-weight-label); color: var(--tt-text-secondary); }
.bq-head-main { flex: 1; min-width: 0; display: grid; grid-template-columns: 130px minmax(0, 1fr) 190px; column-gap: var(--tt-space-4); }
.bq-head-act { flex: none; }
.bq-list--hist .bq-head-act { width: 0; }
@media (max-width: 900px) { .bq-head { display: none; } }
/* Search: the close button sits inside the box, at its right end */
.bq-search { display: block; position: relative; }
.bq-search .input { padding-right: 36px; }
.bq-search .btn { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; min-height: 0; color: var(--tt-text-secondary); }
.bq-search .btn:hover { color: var(--tt-text-primary); }
.bq-search input[type="search"]::-webkit-search-cancel-button { display: none; }
/* Issue rows: one three-dot button, menu opens to the left edge of the button */
.bq-list--issues .inbox-actions, .bq-list--issues .bq-head-act { width: 40px; }
.bq-more { margin-left: 0; }
.bq-more .twin-hero-ask-menu { left: auto; right: 0; min-width: 190px; }
.bq-list { overflow: visible; }
.bq-head { border-radius: calc(var(--tt-radius-md) - 1px) calc(var(--tt-radius-md) - 1px) 0 0; }
.bq-item:last-child .inbox-card { border-radius: 0 0 calc(var(--tt-radius-md) - 1px) calc(var(--tt-radius-md) - 1px); }
/* Search close icon: 12px */
.bq-search .btn svg { width: 12px; height: 12px; }
/* About me card: Make changes sits beside the collapse icon at the top right */
.v2f-head-end { margin-left: auto; align-self: flex-start; display: flex; align-items: center; gap: var(--tt-space-2); flex: none; }
.v2f-head-end .v2f-collapse { margin-left: 0; }
.v2f-edit svg { width: 14px; height: 14px; }
/* Training style (expanded): 24px left and right padding */
.flow-node.is-editing:has(.ts-full-head) { padding-left: var(--tt-space-6); padding-right: var(--tt-space-6); }
/* Check your email: an icon at the top, everything left aligned */
.auth-card--verify, .auth-card--verify .auth-copy, .auth-card--verify .auth-title, .auth-card--verify .auth-sub { text-align: left; }
.auth-verify-ico { display: inline-flex; margin-bottom: var(--tt-space-4); }
/* End-call confirm: an icon at the top, left aligned like the Check your email popup */
.upsell-card--end { align-items: flex-start; text-align: left; }
.upsell-card--end .upsell-title { text-align: left; max-width: none; }
.upsell-card--end .talk-end-ico { margin-bottom: var(--tt-space-4); }
.upsell-card--end .talk-confirm-actions { width: 100%; }
/* Persona list: three-dot menu (Edit, Remove) */
.rps-list { overflow: visible; }
.rps-list .rps-row:first-of-type { border-radius: calc(var(--tt-radius-lg) - 1px) calc(var(--tt-radius-lg) - 1px) 0 0; }
.rps-list .rps-row:last-of-type { border-radius: 0 0 calc(var(--tt-radius-lg) - 1px) calc(var(--tt-radius-lg) - 1px); }
.rps-row-more { margin-left: 0; justify-self: end; }
.rps-row-more .twin-hero-ask-menu { left: auto; right: 0; min-width: 160px; }
.rps-opt-remove, .rps-opt-remove .twin-hero-ask-opt-ico { color: var(--tt-danger); }
.upsell-card--end .rps-remove-sub { margin: var(--tt-space-2) 0 var(--tt-space-5); text-align: left; color: var(--tt-text-secondary); font-size: 14px; line-height: 20px; }
/* Remove-persona confirm: title and line under it sit 8px apart */
.upsell-card--end .upsell-title:has(+ .rps-remove-sub) { margin-bottom: 0; }
.upsell-card--end .rps-remove-sub { margin-bottom: 0; }
/* Voice library rows: white with a light grey border; Play is a light grey button */
.vs-lib .voice-row { background: var(--tt-surface); border: var(--tt-border-thin) solid var(--tt-border); }
.vs-lib .voice-row .btn--ghost { background: var(--tt-fill-soft); }
.vs-lib .voice-row .btn--ghost:hover:not(:disabled) { background: color-mix(in srgb, var(--tt-text-primary) 10%, var(--tt-surface)); }
/* Page-header filter dropdowns: fully rounded */
.ts-filters .bot-range .home-ask-mode { border-radius: var(--tt-radius-pill); }

/* Twin detail: "Build this agent from" list + right slide panel */
.rp-detail--wide .rp-detail-scopeblock .bf-head { display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-3); margin-top: var(--tt-space-5); }
.rp-detail--wide .rp-detail-scopeblock .bf-head .rp-detail-kicker { margin: 0; }
.bf-all svg { width: 16px; height: 16px; flex: none; }
.bf-count { display: inline-block; margin: var(--tt-space-3) 0 0; padding: 0; border: 0; background: none; font: inherit; font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); cursor: pointer; }
.bf-count:hover { color: var(--tt-text-primary); text-decoration: underline; }
.bf-list { list-style: none; margin: var(--tt-space-3) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--tt-space-1); }
.bf-item { display: flex; align-items: center; gap: var(--tt-space-3); min-height: 40px; padding: 0 var(--tt-space-3); border-radius: 8px; background: var(--tt-fill-soft); font-size: 14px; line-height: 20px; color: var(--tt-text-primary); }
.bf-ico { flex: none; display: grid; place-items: center; width: 20px; height: 20px; color: var(--tt-text-secondary); }
.bf-ico svg { width: 20px; height: 20px; }
.bf-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-more { margin: var(--tt-space-2) 0 0; padding: 0; border: 0; background: none; font: inherit; font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); cursor: pointer; }
.bf-more:hover { color: var(--tt-text-primary); text-decoration: underline; }
.sidepanel { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); z-index: var(--tt-z-modal); display: flex; flex-direction: column; background: var(--tt-surface-raised); box-shadow: var(--tt-elevation-3); animation: sidepanel-in .24s cubic-bezier(.2,.8,.2,1); }
.sidepanel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--tt-space-3); padding: var(--tt-space-5) var(--tt-space-6); border-bottom: var(--tt-border-thin) solid var(--tt-border); }
.sidepanel-body { flex: 1; min-height: 0; overflow: auto; margin: 0; padding: var(--tt-space-4) var(--tt-space-6) var(--tt-space-6); }
.bf-list--all { gap: var(--tt-space-2); }
.bf-list--all .bf-name { white-space: normal; overflow: visible; }
.bf-list--all .bf-item { padding-block: var(--tt-space-2); align-items: flex-start; }
.bf-list--all .bf-ico { margin-top: 0; }
@keyframes sidepanel-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sidepanel { animation: none; } }

.bf-open { width: 100%; margin: var(--tt-space-3) 0 0; border: 0; font: inherit; font-size: 14px; line-height: 20px; text-align: left; cursor: pointer; transition: background var(--tt-duration-fast, .12s) ease; }
.bf-open:hover { background: var(--tt-fill-hover, var(--tt-fill-soft)); }
.bf-open .bf-name { flex: 1; }
.bf-arrow { flex: none; width: 16px; height: 16px; color: var(--tt-text-secondary); }

/* Twin detail: Assigned to tab */
.bot-assigned { list-style: none; margin: var(--tt-space-4) 0 0; padding: 0; }
.bot-assigned-row { display: flex; align-items: center; gap: var(--tt-space-4); padding: 14px 0; }
.bot-assigned-row + .bot-assigned-row { border-top: 1px solid var(--tt-border); }
.bot-assigned-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--tt-space-1); }
.bot-assigned-name { font-size: 15px; line-height: 20px; color: var(--tt-text-primary); }
.bot-assigned-meta { font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-assigned-actions { flex: none; display: flex; gap: var(--tt-space-2); }
.bot-assigned-empty { display: flex; flex-direction: column; align-items: flex-start; gap: var(--tt-space-2); padding: var(--tt-space-6) 0 var(--tt-space-2); }
.bot-assigned-empty .card-sub { margin: 0 0 var(--tt-space-2); }
.bot-reassign-field { width: 100%; text-align: left; margin-top: var(--tt-space-4); }
@media (max-width: 640px) { .bot-assigned-row { flex-wrap: wrap; } .bot-assigned-actions { width: 100%; padding-left: 44px; } }
.bf-viewall { flex: none; display: inline-flex; align-items: center; gap: var(--tt-space-1); color: var(--tt-text-secondary); font-size: 14px; line-height: 20px; }
.bf-open:hover .bf-viewall { color: var(--tt-text-primary); }

/* "Here's what we found": each profile is a selectable tile — ticked = this is me, unticked = removed */
.v2-found .v2-prof { cursor: pointer; transition: border-color .15s ease, background .15s ease, opacity .15s ease; }
.v2-found .v2-prof.is-on { border-color: var(--tt-border); }
.v2-found .v2-prof.is-off { opacity: 1; background: var(--tt-surface-sunken); }
.v2-found .v2-prof.is-off .card-title, .v2-found .v2-prof.is-off .card-sub, .v2-found .v2-prof.is-off .profile-avatar { opacity: .5; }
.v2-pick { flex: none; display: grid; place-items: center; width: 22px; height: 22px; margin-right: var(--tt-space-1); padding: 0; border: 1.5px solid var(--tt-border-interactive); border-radius: 6px; background: var(--tt-surface); color: transparent; cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.v2-pick svg { width: 14px; height: 14px; }
.v2-pick[aria-checked="true"] { background: var(--tt-primary); border-color: var(--tt-primary); color: var(--tt-on-primary); }
.v2-pick:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: 2px; }
.v2-prof--wait .v2-pick, .v2-prof--load .v2-pick { visibility: hidden; }

/* Account menu (profile chip in the left nav) */
.rail-user-wrap { position: relative; }
.rail-user-menu { position: fixed; width: 264px; max-width: calc(100vw - 32px); padding: 0; z-index: var(--tt-z-modal); background: var(--tt-surface); border: var(--tt-border-thin) solid var(--tt-card-border); border-radius: var(--tt-radius-md); box-shadow: var(--tt-elevation-3); overflow: hidden; }
.rum-email { margin: 0; padding: var(--tt-space-4); font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); border-bottom: var(--tt-border-thin) solid var(--tt-border); overflow: hidden; text-overflow: ellipsis; }
.rum-list { padding: var(--tt-space-2); display: flex; flex-direction: column; gap: 2px; }
.rum-sep { height: 1px; background: var(--tt-border); }
.rail-user-menu button { display: flex; align-items: center; gap: var(--tt-space-3); width: 100%; height: 40px; padding: 0 var(--tt-space-3); border: 0; border-radius: 8px; background: transparent; color: var(--tt-text-primary); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.rail-user-menu button:hover { background: var(--tt-surface-sunken); }
.rail-user-menu svg { width: 20px; height: 20px; flex: none; }
/* Account pages: Voices, Developer API, Team, Profile */
.set-page { max-width: 860px; }
.set-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--tt-space-4); padding-bottom: var(--tt-space-5); margin-bottom: var(--tt-space-5); border-bottom: var(--tt-border-thin) solid var(--tt-border); }
.set-title { margin: 0; display: flex; align-items: center; gap: var(--tt-space-3); font-size: 18px; line-height: 24px; font-weight: var(--tt-weight-title); }
.set-sub { margin: var(--tt-space-1) 0 0; font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.set-tool .btn svg { width: 16px; height: 16px; flex: none; }
.set-seg { margin-bottom: var(--tt-space-4); }
.set-search { position: relative; max-width: 360px; margin-bottom: var(--tt-space-3); }
.set-search svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--tt-text-secondary); pointer-events: none; }
.set-search .input { width: 100%; padding-left: 36px; }
.set-list { list-style: none; margin: 0; padding: 0; }
.set-list > li { display: flex; align-items: center; gap: var(--tt-space-3); padding: 14px 0; }
.set-list > li + li { border-top: var(--tt-border-thin) solid var(--tt-border); }
.set-list > li[hidden] { display: none; }
.set-list > li.is-off { opacity: .55; }
.set-voices { background: var(--tt-surface); border: var(--tt-border-thin) solid var(--tt-card-border); border-radius: var(--tt-radius-lg); box-shadow: var(--tt-elevation-1); }
.set-voices > li { padding: 14px var(--tt-space-4); }
.set-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.set-row-name { font-size: 15px; line-height: 20px; color: var(--tt-text-primary); }
.set-row-sub { font-size: 13px; line-height: 18px; color: var(--tt-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-you { color: var(--tt-text-secondary); }
.set-play { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--tt-fill-soft); color: var(--tt-text-primary); cursor: pointer; }
.set-play:hover { background: var(--tt-border); }
.set-play svg { width: 18px; height: 18px; }
.set-card { padding: var(--tt-space-5); margin-bottom: var(--tt-space-5); }
.set-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--tt-space-4); }
.set-h2 { margin: 0; font-size: 16px; line-height: 22px; font-weight: var(--tt-weight-title); }
.set-count { font-weight: 400; color: var(--tt-text-secondary); }
.set-help { margin: var(--tt-space-2) 0 0; font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.set-gen { margin-top: var(--tt-space-4); }
.set-rule { border: 0; border-top: var(--tt-border-thin) solid var(--tt-border); margin: var(--tt-space-5) 0; }
.set-note { margin: var(--tt-space-5) 0 0; font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.set-note code, .set-newkey code { padding: 2px 6px; border-radius: 6px; background: var(--tt-fill-soft); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.set-newkey { margin-top: var(--tt-space-4); padding: var(--tt-space-3) var(--tt-space-4); border-radius: 12px; background: var(--tt-success-subtle); display: flex; flex-direction: column; gap: var(--tt-space-2); }
.set-newkey code { background: var(--tt-surface); word-break: break-all; }
.set-keys > li { padding: 12px 0; }
.set-photo { display: flex; align-items: center; gap: var(--tt-space-4); }
.set-photo-img { width: 56px; height: 56px; }
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--tt-space-4) var(--tt-space-5); margin-bottom: var(--tt-space-5); }
.set-actions { display: flex; justify-content: flex-end; margin-top: var(--tt-space-5); }
@media (max-width: 720px) { .set-grid { grid-template-columns: 1fr; } }

/* Twin for all use cases: one wide card above the specific agents */
.twin-all { position: relative; flex-direction: row; align-items: center; gap: var(--tt-space-5); padding: var(--tt-space-5); margin-bottom: var(--tt-space-8); cursor: pointer; overflow: visible; }
.twin-all:hover { border-color: var(--tt-border-interactive); }
.twin-all-photo { flex: none; width: 76px; height: 76px; border-radius: 16px; object-fit: cover; object-position: center 18%; background: var(--tt-fill-soft); }
.twin-all-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--tt-space-2); }
.twin-all-name { margin: 0; font-size: 18px; line-height: 24px; font-weight: var(--tt-weight-title); color: var(--tt-text-primary); }
.twin-all-meta { margin: 0; display: flex; align-items: center; gap: var(--tt-space-1); font-size: 15px; line-height: 20px; color: var(--tt-text-secondary); }
.twin-all-meta svg { width: 12px; height: 12px; }
.twin-all .rp-learners { align-self: flex-start; }
.twin-all-more { flex: none; background: var(--tt-fill-soft); }
.set-gen { align-self: flex-start; }
.set-card { display: flex; flex-direction: column; }
.rail-user-menu button { justify-content: flex-start; }
.rail-user-menu button span { flex: 1; min-width: 0; }

/* The flow opens on a full-page sign up / log in card; sign up leads on to Build my twin */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: var(--tt-space-5); background: var(--tt-surface-sunken); }
.auth-page .auth-card { width: min(760px, 100%); }
.auth-page .auth-card--verify { width: min(420px, 100%); }
.auth-switch { margin: var(--tt-space-4) 0 0; text-align: center; font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.auth-switch-btn { appearance: none; border: 0; background: none; padding: 0; font: inherit; font-weight: var(--tt-weight-label); color: var(--tt-text-primary); text-decoration: underline; cursor: pointer; }
.auth-form-panel .btn--strong.auth-submit { width: 100%; }

/* Voice-recording waves: canvas from react-animated-waves */
.vs-wave { height: 72px; display: block; }
.vs-wave canvas { width: 100%; height: 100%; display: block; }

/* Usage, Billing and Contact support */
.nav-meta { margin-left: auto; font-style: normal; font-size: 13px; line-height: 18px; color: var(--tt-text-secondary); }
.rail.is-collapsed .nav-meta { display: none; }
.us-page { max-width: 1000px; }
.us-h2 { margin: 0; font-size: 18px; line-height: 24px; font-weight: var(--tt-weight-title); }
.us-h2--gap { margin-top: var(--tt-space-8); }
.us-sub { margin: var(--tt-space-1) 0 var(--tt-space-4); font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.us-muted { color: var(--tt-text-secondary); }
.us-card { padding: var(--tt-space-5); margin-bottom: var(--tt-space-8); gap: var(--tt-space-4); }
.us-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--tt-space-4); }
.us-label { margin: 0; font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.us-big { margin: var(--tt-space-1) 0 0; font-size: 40px; line-height: 44px; font-weight: var(--tt-weight-title); color: var(--tt-text-primary); }
.us-big span { font-size: 18px; font-weight: 400; color: var(--tt-text-secondary); }
.us-bar-row { display: flex; align-items: center; gap: var(--tt-space-4); }
.us-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--tt-fill-soft); overflow: hidden; }
.us-bar i { display: block; height: 100%; border-radius: 999px; background: var(--tt-text-primary); }
.us-of { font-size: 13px; line-height: 18px; color: var(--tt-text-secondary); white-space: nowrap; }
.us-note { margin: 0; font-size: 14px; line-height: 22px; color: var(--tt-text-secondary); }
.us-table { background: var(--tt-surface); border: var(--tt-border-thin) solid var(--tt-card-border); border-radius: var(--tt-radius-lg); overflow: hidden; box-shadow: var(--tt-elevation-1); }
.us-row { display: grid; align-items: center; gap: var(--tt-space-3); padding: 14px var(--tt-space-5); font-size: 14px; line-height: 20px; color: var(--tt-text-primary); }
.us-row + .us-row { border-top: var(--tt-border-thin) solid var(--tt-border); }
.us-row--head { background: var(--tt-surface-sunken); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--tt-text-secondary); padding-top: 10px; padding-bottom: 10px; }
.us-row--credits { grid-template-columns: minmax(0, 1fr) 140px 140px 120px; }
.us-row--twins { grid-template-columns: minmax(0, 1fr) 120px 80px 110px 110px; }
.us-row--team { grid-template-columns: minmax(0, 1fr) 110px 90px 100px 90px; }
.us-row--log { grid-template-columns: 10px minmax(0, 1fr) 150px 90px; }
.us-row--learners { grid-template-columns: minmax(0, 1fr) 110px 110px 130px; }
.us-row--learners[hidden] { display: none; }
.us-num { text-align: right; font-variant-numeric: tabular-nums; }
.us-row--learners .us-num { text-align: left; }
.us-who { display: flex; align-items: center; gap: var(--tt-space-3); min-width: 0; }
.us-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tt-primary); }
.us-dot--tried { background: #7C93D6; }
.us-dot--credit { background: var(--tt-success); }
.us-low { margin-left: var(--tt-space-1); }
.us-foot { display: flex; align-items: center; justify-content: space-between; padding: 10px var(--tt-space-5); border-top: var(--tt-border-thin) solid var(--tt-border); font-size: 14px; }
.us-pager { display: flex; gap: var(--tt-space-2); }
.us-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--tt-space-4); }
.us-sec-head--gap { margin-top: var(--tt-space-8); }
.us-range { display: flex; gap: 2px; margin-bottom: var(--tt-space-4); }
.us-range button { border: 0; background: transparent; padding: 4px 12px; border-radius: 999px; font: inherit; font-size: 14px; color: var(--tt-text-secondary); cursor: pointer; }
.us-range button[aria-pressed="true"] { background: var(--tt-fill-soft); color: var(--tt-text-primary); }
.us-tools { display: flex; align-items: center; gap: var(--tt-space-2); margin-bottom: var(--tt-space-4); }
.us-tools .btn svg { width: 16px; height: 16px; flex: none; }
.us-select { height: 32px; min-height: 32px; font-size: 14px; }
.us-search { margin-bottom: var(--tt-space-4); width: 260px; }
.bl-card { padding: var(--tt-space-4) var(--tt-space-5); margin: var(--tt-space-3) 0 0; }
.bl-card--row { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--tt-space-4); }
.bl-title { margin: 0; display: flex; align-items: center; gap: var(--tt-space-2); font-size: 15px; line-height: 22px; color: var(--tt-text-primary); }
.bl-sub { margin: 2px 0 0; font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.bl-actions { display: flex; align-items: center; gap: var(--tt-space-3); flex: none; }
.bl-inv { padding: 0; }
.bl-inv-row { display: flex; align-items: center; gap: var(--tt-space-4); padding: 14px var(--tt-space-5); }
.bl-inv-name { flex: 1; min-width: 0; font-size: 15px; }
.bl-inv-amt { min-width: 80px; text-align: right; font-weight: 400; }
.bl-foot { margin-top: var(--tt-space-3); font-size: 13px; }
.bl-info { padding: 0; }
.bl-info > div { padding: 14px var(--tt-space-5); }
.bl-info > div + div { border-top: var(--tt-border-thin) solid var(--tt-border); }
.bl-menu-wrap { position: relative; }
.bl-menu { position: absolute; left: auto; right: 0; top: calc(100% + 4px); width: 200px; min-width: 0; padding: var(--tt-space-2); z-index: 20; }
.bl-menu button { display: flex; align-items: center; gap: var(--tt-space-3); width: 100%; height: 40px; padding: 0 var(--tt-space-3); border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: 14px; color: var(--tt-text-primary); text-align: left; cursor: pointer; }
.bl-menu button:hover { background: var(--tt-surface-sunken); }
.bl-menu svg { width: 18px; height: 18px; flex: none; }
.sup-card { position: relative; width: min(660px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: var(--tt-space-2); padding: var(--tt-space-5); }
.sup-x { position: absolute; top: var(--tt-space-4); right: var(--tt-space-4); }
.sup-sub { margin: 0 0 var(--tt-space-3); font-size: 14px; line-height: 20px; color: var(--tt-text-secondary); }
.sup-card .label { margin-top: var(--tt-space-2); }
.sup-card textarea.input { min-height: 84px; resize: vertical; }
.sup-actions { display: flex; justify-content: flex-end; gap: var(--tt-space-3); margin-top: var(--tt-space-4); }
@media (max-width: 720px) {
  .us-row--credits, .us-row--twins, .us-row--team, .us-row--learners { grid-template-columns: minmax(0, 1fr) auto; }
  .us-row--credits > :nth-child(2), .us-row--credits > :nth-child(3), .us-row--twins > :nth-child(n+3), .us-row--team > :nth-child(n+3), .us-row--learners > :nth-child(n+3) { display: none; }
  .bl-card--row { flex-direction: column; align-items: flex-start; }
}
.bl-inv { overflow: visible; }
.us-page .set-head { border-bottom: 0; padding-bottom: 0; margin-bottom: var(--tt-space-4); }

.an-row--twinusers { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) 110px 100px 140px minmax(0, 1.2fr); }
.lr-name-ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-row--twinusers .lr-text { display: flex; align-items: center; gap: var(--tt-space-2); }
@media (max-width: 720px) {
  .an-row--twinusers { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .an-row--twinusers > :nth-child(2), .an-row--twinusers > :nth-child(3), .an-row--twinusers > :nth-child(4), .an-row--twinusers > :nth-child(5) { display: none; }
}
.twin-bots-head--stack { flex-direction: column; align-items: flex-start; gap: var(--tt-space-1); }
.an-row--twinusers { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) 100px 100px 140px minmax(190px, 1.3fr); }
.an-row--twinusers .lr-text { white-space: nowrap; }

/* Clickable learner rows and the learner page */
.us-link { cursor: pointer; }
.us-link:hover { background: var(--tt-surface-sunken); }
.us-link:focus-visible { outline: 2px solid var(--tt-primary); outline-offset: -2px; }
.us-row--sessions { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.7fr) 90px 110px 24px; }
.ld-head { display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-5); margin: var(--tt-space-4) 0 var(--tt-space-8); flex-wrap: wrap; }
.ld-who { display: flex; align-items: center; gap: var(--tt-space-4); min-width: 0; }
.ld-avatar { width: 80px; height: 80px; font-size: 32px; flex: none; }
.ld-name { margin: 0; font-size: 20px; line-height: 28px; font-weight: var(--tt-weight-title); }
.ld-email { margin: 2px 0 0; font-size: 16px; line-height: 22px; color: var(--tt-text-secondary); }
.ld-credits { flex-direction: row; align-items: center; gap: var(--tt-space-5); padding: var(--tt-space-4) var(--tt-space-5); width: min(580px, 100%); }
.ld-credits-body { flex: 1; min-width: 0; }
.ld-eyebrow { margin: 0; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--tt-text-secondary); }
.ld-left { margin: var(--tt-space-1) 0 var(--tt-space-2); color: var(--tt-text-secondary); font-size: 18px; }
.ld-left b { font-size: 28px; line-height: 32px; font-weight: var(--tt-weight-title); color: var(--tt-text-primary); }
.ld-used { margin: var(--tt-space-2) 0 0; font-size: 14px; color: var(--tt-text-secondary); }
.ld-chips { display: flex; flex-wrap: wrap; gap: var(--tt-space-2); }
.ld-chip { padding: 2px 10px; border: var(--tt-border-thin) solid var(--tt-border); border-radius: 999px; font-size: 13px; line-height: 20px; white-space: nowrap; }
.ld-go { color: var(--tt-text-secondary); display: grid; place-items: center; }
.ld-go svg { width: 14px; height: 14px; }
@media (max-width: 720px) {
  .us-row--sessions { grid-template-columns: minmax(0, 1fr) auto; }
  .us-row--sessions > :nth-child(2), .us-row--sessions > :nth-child(4) { display: none; }
  .ld-credits { flex-direction: column; align-items: stretch; }
}
.ld-credits { margin-left: auto; }
@media (max-width: 720px) { .ld-credits { margin-left: 0; } }
.ld-head { flex-wrap: nowrap; }
.ld-who { flex: 1 1 auto; }
.ld-credits { width: auto; flex: 0 1 460px; min-width: 0; margin-left: auto; }
@media (max-width: 720px) { .ld-head { flex-wrap: wrap; } .ld-credits { flex-basis: 100%; margin-left: 0; } }
.us-who .set-row-name { font-weight: var(--tt-weight-title); }

/* Activity log side panel */
.al-tools { display: flex; align-items: center; gap: var(--tt-space-3); padding: var(--tt-space-4) var(--tt-space-6); border-bottom: var(--tt-border-thin) solid var(--tt-border); }
.al-tools .btn svg { width: 16px; height: 16px; flex: none; }
.al-count { margin-left: auto; font-size: 13px; white-space: nowrap; }
.al-list { list-style: none; }
.al-row { display: flex; align-items: center; gap: var(--tt-space-3); padding: 14px 0; }
.al-row + .al-row { border-top: var(--tt-border-thin) solid var(--tt-border); }
.al-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 20px; }
.al-when { font-size: 13px; line-height: 18px; }
.al-amt { font-weight: var(--tt-weight-title); font-size: 14px; white-space: nowrap; }

/* One shadow for every list / table across the product (same as .an-table) */
.us-table, .set-voices, .rp-table-card { box-shadow: 0 2px 4px rgb(30 28 25 / 0.035), 0 8px 20px rgb(30 28 25 / 0.055); }
.an-flat .us-table, .an-flat .rp-table-card { box-shadow: none; }
.rps-list[role="list"] { box-shadow: 0 2px 4px rgb(30 28 25 / 0.035), 0 8px 20px rgb(30 28 25 / 0.055); }
.rps-list .rps-row--head { background: var(--tt-surface-sunken); cursor: default; padding-top: 10px; padding-bottom: 10px; font-size: 12px; line-height: 18px; letter-spacing: .04em; text-transform: uppercase; color: var(--tt-text-secondary); border-radius: calc(var(--tt-radius-lg) - 1px) calc(var(--tt-radius-lg) - 1px) 0 0; }
.rps-list .rps-row--head:hover { background: var(--tt-surface-sunken); }
.rps-list .rps-row--head ~ .rps-row:first-of-type { border-radius: 0; }
.bl-plan { gap: var(--tt-space-4); }
.bl-plan-row { display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-4); }
.bl-addon-label { margin: var(--tt-space-2) 0 calc(var(--tt-space-2) * -1); font-size: 12px; line-height: 18px; letter-spacing: .04em; text-transform: uppercase; color: var(--tt-text-secondary); }
.bl-addon { display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-4); padding: var(--tt-space-4); border: var(--tt-border-thin) solid var(--tt-border); border-radius: var(--tt-radius-md); background: var(--tt-surface-sunken); }
@media (max-width: 720px) { .bl-plan-row, .bl-addon { flex-direction: column; align-items: flex-start; } }
.bl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tt-space-5); align-items: stretch; }
.bl-col { display: flex; flex-direction: column; min-width: 0; }
.bl-col > .card { flex: 1; }
.bl-col > .us-sec-head { align-items: center; }
.bl-col > .us-sec-head .btn { margin-bottom: 0; }
.bl-grid .bl-addon { flex-direction: column; align-items: flex-start; }
.bl-grid .bl-plan-row { align-items: flex-start; }
.bl-grid .bl-info > div { padding: 14px var(--tt-space-5); }
@media (max-width: 720px) { .bl-grid { grid-template-columns: 1fr; } }
.bl-col > .us-sec-head { min-height: 32px; margin-bottom: 0; }
.set-tool .btn svg { width: 16px; height: 16px; flex: none; }
.bl-grid .bl-addon .bl-actions { align-self: flex-end; }
.bl-card { box-shadow: 0 2px 4px rgb(30 28 25 / 0.035), 0 8px 20px rgb(30 28 25 / 0.055); }
.bl-inv-row + .bl-inv-row { border-top: var(--tt-border-thin) solid var(--tt-border); }
.bl-inv { overflow: visible; }
.bl-title { font-weight: var(--tt-weight-title); }
.bl-inv-amt { font-weight: var(--tt-weight-title); }
/* Dialogs follow the system's dialog spec: padding 24, title 20/28 600, sub 14/20, help 13/20, close 32px at 12/12 */
.sup-card { padding: var(--tt-space-6); }
.sup-card .issue-title { font-size: 20px; line-height: 28px; font-weight: var(--tt-weight-title); letter-spacing: 0; margin: 0; padding-right: 40px; }
.sup-card .set-help { font-size: 13px; line-height: 20px; margin: 0; }
.sup-x { top: 12px; right: 12px; width: 32px; height: 32px; }
.us-strong { font-weight: var(--tt-weight-title); }
.us-row--credits:not(.us-row--head) .us-num, .us-row--credits:not(.us-row--head) .us-num b { font-weight: var(--tt-weight-title); }
.bl-price { font-weight: var(--tt-weight-title); color: var(--tt-text-primary); }
.bl-inv-ico { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--tt-fill-soft); color: var(--tt-text-secondary); }
.bl-inv-ico svg { width: 20px; height: 20px; }
.bl-grid { margin-top: 60px; }
.bl-addon { margin-top: 12px; }
.bl-addon { border: 0; }
.bl-info > div { display: flex; align-items: center; gap: var(--tt-space-3); }
.bl-info-text { min-width: 0; }
.bl-info-text .bl-sub { overflow-wrap: anywhere; }
.bl-crown { display: inline-grid; place-items: center; margin-right: var(--tt-space-2); color: var(--tt-text-primary); }
.bl-crown svg { width: 18px; height: 18px; }
.bl-addon .bl-sub { padding-top: 8px; }
.bl-addon > div:first-child { align-self: stretch; }
.bl-addon .bl-title .badge { margin-left: auto; }
.bl-addon-badge { box-sizing: border-box; gap: var(--tt-space-1); padding: 3px 10px 3px 8px; border: 1px solid color-mix(in srgb, var(--tt-caution) 40%, transparent); }
.bl-addon-badge .bl-crown { margin: 0; color: inherit; }
.bl-addon-badge .bl-crown svg { width: 14px; height: 14px; }
.bl-active { gap: var(--tt-space-1); padding-left: 8px; }
.bl-active svg { width: 14px; height: 14px; flex: none; }
.bl-card { box-shadow: none; }
.bl-card { box-shadow: 0 2px 4px rgb(30 28 25 / 0.035), 0 8px 20px rgb(30 28 25 / 0.055); }
.bl-grid { grid-template-columns: minmax(0, 1fr); gap: var(--tt-space-8); }
.bl-col > .card { flex: none; }
.bl-grid .bl-addon { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: var(--tt-space-4); }
.bl-grid .bl-addon .bl-actions { align-self: flex-start; }
.bl-addon > div:first-child { align-self: auto; flex: 1; min-width: 0; }
.bl-addon .bl-title .badge { margin-left: 0; }
@media (max-width: 720px) { .bl-grid .bl-addon { flex-direction: column; } }
.bl-card.bl-inv { box-shadow: none; }
.bl-card.bl-inv { border: 0; }
.bl-inv-row { padding-left: 0; padding-right: 0; }
.bl-info-text { display: contents; }
.bl-info .bl-title { flex: 1; min-width: 0; }
.bl-info .bl-sub { margin: 0; text-align: right; max-width: 60%; }
.bl-info .bl-sub { white-space: pre-line; }
.bl-info > div { align-items: center; }
.bl-inv-cr { min-width: 96px; text-align: right; font-size: 14px; color: var(--tt-text-secondary); white-space: nowrap; font-variant-numeric: tabular-nums; }
