/* Grant, the live demo agent (SITE_TRY_ME=1). Styled like the PaceNotes agent window and the Companion's chatter bubble:
   the agent's face and Barlow Condensed name in the header, dark bubbles with the faint orange ring, TC black and orange. */
@font-face { font-family: 'TM Barlow Condensed'; src: url('/companion-web/BarlowCondensed-ExtraBold.ttf') format('truetype'); font-weight: 800; font-style: normal; font-display: swap; }
.tm { --tm-bg: #0b0c10; --tm-panel: #111217; --tm-card: #18181b; --tm-line: #27272a; --tm-edge: #3f3f46; --tm-text: #e4e4e7; --tm-dim: #a1a1aa; --tm-accent: #FF5600; --tm-accent-dark: #e64d00; --tm-navy: #0a2d5c; font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif; --tm-bubble: rgba(22, 23, 30, 0.96); --tm-ring: rgba(255, 86, 0, 0.32); color: var(--tm-text); line-height: 1.45; text-align: left; }
.tm *, .tm *::before, .tm *::after { box-sizing: border-box; }
.tm [hidden] { display: none !important; }
.tm .tm-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tm button, .tm input { font: inherit; color: inherit; }
.tm :where(a, button, input):focus-visible { outline: 2px solid var(--tm-accent); outline-offset: 2px; }
.tm a { color: var(--tm-accent); }

/* Page styles never leak in: every page has its own section, header, footer, h2 and button rules, so the widget
   resets them here and every widget rule is scoped under .tm. */
.tm section, .tm header, .tm footer, .tm ol, .tm li, .tm p, .tm h2, .tm form { margin: 0; padding: 0; max-width: none; border: 0; background: none; text-align: left; letter-spacing: normal; text-transform: none; position: static; box-shadow: none; }
.tm button { margin: 0; width: auto; padding: 0; letter-spacing: normal; text-transform: none; box-shadow: none; }
.tm li::marker { content: none; }

/* The character, docked bottom right. The 3D Companion replaces the still one once it loads. */
.tm .tm-buddy { position: fixed; right: 16px; bottom: 16px; z-index: 2147482990; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0; border: 0; background: transparent; cursor: pointer; touch-action: none; -webkit-tap-highlight-color: transparent; }
.tm .tm-still { width: 84px; height: 84px; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5)); transition: transform 0.2s; animation: tm-bob 3.2s ease-in-out infinite; }
.tm .tm-buddy:hover .tm-still { transform: translateY(-3px) scale(1.04); }
.tm[data-size="small"] .tm-still { width: 64px; height: 64px; }
.tm[data-size="large"] .tm-still { width: 110px; height: 110px; }
.tm.tm-left .tm-buddy { right: auto; left: 16px; }
.tm.tm-tuck .tm-buddy { right: 0; bottom: 96px; }
.tm.tm-tuck .tm-still { width: 48px; height: 48px; }
.tm.tm-packed:not(.tm-has-3d) .tm-still { width: 52px; height: 52px; animation: none; border-radius: 12px; background: var(--tm-navy); padding: 4px; border: 2px solid var(--tm-accent); }
.tm.tm-has-3d .tm-buddy { display: none; }
.tm[data-state="speaking"] .tm-still { animation: tm-talk 0.28s ease-in-out infinite alternate; }
.tm[data-state="listening"] .tm-still { animation: tm-bob 1.4s ease-in-out infinite; }
@keyframes tm-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes tm-talk { from { transform: scale(1); } to { transform: scale(1.05) translateY(-2px); } }

/* "Click me to try": the Companion's chatter bubble, above the character until the first click or a dismiss. */
.tm .tm-nudge { position: fixed; z-index: 2147482992; display: flex; align-items: center; gap: 2px; padding: 4px 4px 4px 2px; border-radius: 12px; background: var(--tm-bubble); box-shadow: inset 0 0 0 1px var(--tm-ring), 0 4px 14px rgba(0, 0, 0, 0.3); right: 22px; bottom: 112px; animation: tm-pop 0.25s ease-out; }
.tm .tm-nudge::after { content: ''; position: absolute; bottom: -13px; right: 30px; width: 22px; height: 14px; background: var(--tm-bubble); clip-path: polygon(0 0, 100% 0, 100% 100%); }
.tm .tm-nudge.tm-at-3d::after { right: auto; left: calc(50% - 11px); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.tm .tm-nudge-go { min-height: 32px; padding: 0 6px 0 10px; border: 0; background: none; color: #F5F5F4; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.tm .tm-nudge-x { width: 28px; height: 28px; border: 0; border-radius: 8px; background: none; color: #a1a1aa; font-size: 18px; line-height: 1; cursor: pointer; }
.tm .tm-nudge-x:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.tm.tm-is-open .tm-nudge, .tm.tm-packed .tm-nudge, .tm.tm-tuck .tm-nudge { display: none; }
@keyframes tm-pop { from { opacity: 0; transform: translateY(6px) scale(0.96); } }

/* The chat: the PaceNotes agent window in TC black and orange. */
.tm .tm-panel { position: fixed; right: 16px; bottom: 132px; z-index: 2147482995; width: 380px; max-height: min(640px, calc(100vh - 156px)); display: flex; flex-direction: column; background: #111217; border: 1px solid var(--tm-ring); border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); overflow: hidden; font-size: 14px; }
.tm .tm-head { display: flex; align-items: center; gap: 12px; padding: 12px 8px 10px 14px; border-bottom: 1px solid var(--tm-line); }
.tm .tm-face { flex: none; position: relative; width: 52px; height: 52px; border-radius: 50%; background: #0a2d5c; box-shadow: 0 0 0 2px #3f3f46; overflow: hidden; transition: box-shadow 0.2s; }
.tm .tm-face img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tm .tm-panel[data-state="listening"] .tm-face { box-shadow: 0 0 0 2px #2a7400, 0 0 0 5px rgba(111, 208, 47, 0.25); }
.tm .tm-panel[data-state="speaking"] .tm-face, .tm .tm-panel[data-state="thinking"] .tm-face { box-shadow: 0 0 0 2px var(--tm-accent), 0 0 0 5px rgba(255, 86, 0, 0.22); }
.tm .tm-who { flex: 1 1 auto; min-width: 0; }
.tm .tm-who h2 { margin: 0; font-family: 'TM Barlow Condensed', 'Barlow Condensed', system-ui, sans-serif; font-weight: 800; font-size: 24px; line-height: 1.05; color: #fafafa; letter-spacing: 0.01em; }
.tm .tm-role { margin: 3px 0 0; display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; color: var(--tm-dim); }
.tm .tm-status { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm .tm-badge { flex: none; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: #18181b; background: var(--tm-accent); border-radius: 5px; padding: 1px 6px; }
.tm .tm-icon { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--tm-dim); font-size: 24px; line-height: 1; cursor: pointer; }
.tm .tm-icon:hover, .tm .tm-icon[aria-expanded="true"] { color: #fafafa; border-color: var(--tm-edge); }

.tm .tm-meter { display: flex; align-items: center; justify-content: center; gap: 4px; height: 22px; padding: 0 16px; }
.tm .tm-meter i { display: block; width: 4px; height: 16px; border-radius: 2px; background: var(--tm-edge); transform: scaleY(0.12); transform-origin: center; transition: transform 0.08s linear; }
.tm .tm-panel[data-state="speaking"] .tm-meter i { background: var(--tm-accent); }
.tm .tm-panel[data-state="listening"] .tm-meter i { background: #6fd02f; }

/* Bubbles: Grant's are the chatter bubble (dark, faint orange ring, tail at the bottom left); yours sit right. */
.tm .tm-lines { list-style: none; margin: 0; padding: 6px 14px 14px; flex: 1 1 auto; min-height: 120px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; overscroll-behavior: contain; }
.tm .tm-lines:empty::before { content: 'Ask about PaceNotes, project rooms, pricing or how to start. Out loud, or type it.'; color: var(--tm-dim); font-size: 14px; padding: 18px 4px; text-align: center; }
.tm .tm-line { margin: 0; position: relative; max-width: 88%; padding: 8px 11px 9px; border-radius: 12px; }
.tm .tm-who-label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.tm .tm-text { margin: 0; font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; }
.tm .tm-grant { align-self: flex-start; background: var(--tm-bubble); box-shadow: inset 0 0 0 1px var(--tm-ring), 0 4px 14px rgba(0, 0, 0, 0.3); margin-bottom: 6px; }
.tm .tm-grant::after { content: ''; position: absolute; bottom: -12px; left: 14px; width: 20px; height: 13px; background: var(--tm-bubble); clip-path: polygon(0 0, 100% 0, 0 100%); }
.tm .tm-grant .tm-who-label { color: #ff8a4d; }
.tm .tm-grant .tm-text { color: #F5F5F4; }
.tm .tm-you { align-self: flex-end; background: #26272e; }
.tm .tm-you .tm-who-label { display: none; }
.tm .tm-you .tm-text { color: #e4e4e7; }
.tm .tm-you.tm-live .tm-text { color: var(--tm-dim); font-style: italic; }
.tm .tm-err .tm-text { color: #fca5a5; }
.tm .tm-over-card { max-width: 100%; align-self: stretch; }
.tm .tm-over-card .tm-ctas { margin-top: 10px; }

.tm .tm-controls { padding: 10px 14px 10px; border-top: 1px solid var(--tm-line); display: flex; flex-direction: column; gap: 8px; }
.tm .tm-talk { width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 2px solid var(--tm-accent); border-radius: 12px; background: rgba(255, 86, 0, 0.08); color: #ff8a4d; font-size: 16px; font-weight: 700; cursor: pointer; }
.tm .tm-talk:hover { background: rgba(255, 86, 0, 0.16); }
.tm .tm-talk[aria-pressed="true"] { border-color: #6fd02f; background: rgba(111, 208, 47, 0.1); color: #e4ffd0; }
.tm .tm-talk:disabled { border-color: var(--tm-edge); background: transparent; color: #71717a; cursor: not-allowed; }
.tm .tm-mic { width: 12px; height: 18px; border: 2.5px solid currentColor; border-radius: 7px; position: relative; }
.tm .tm-mic::after { content: ''; position: absolute; left: 50%; bottom: -7px; width: 2.5px; height: 5px; background: currentColor; transform: translateX(-50%); }
.tm .tm-note { margin: 0; font-size: 12px; color: var(--tm-dim); text-align: center; }
.tm.tm-mic-on .tm-note, .tm.tm-no-voice .tm-talk, .tm.tm-no-voice .tm-note { display: none; }
.tm .tm-type { display: flex; gap: 8px; }
.tm .tm-type input { flex: 1 1 auto; min-width: 0; min-height: 42px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--tm-edge); background: #0b0c10; font-size: 16px; }
.tm .tm-type input::placeholder { color: #8b8b94; }
.tm .tm-send { flex: none; min-height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--tm-edge); background: #18181b; font-weight: 600; cursor: pointer; }
.tm .tm-send:hover { border-color: var(--tm-accent); }

/* The end of the free demo: the controls go, the card with the sign-up pair takes their place. Nothing is spoken. */
.tm.tm-over .tm-controls, .tm.tm-over .tm-foot .tm-ctas { display: none; }

.tm .tm-settings { padding: 10px 14px; border-top: 1px solid var(--tm-line); display: flex; flex-direction: column; gap: 10px; background: #0e0f13; max-height: 46vh; overflow-y: auto; }
.tm .tm-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tm .tm-label { flex: none; width: 74px; font-size: 13px; color: var(--tm-dim); }
.tm .tm-seg { display: inline-flex; border: 1px solid var(--tm-edge); border-radius: 10px; overflow: hidden; }
.tm .tm-seg button { min-height: 36px; padding: 0 12px; border: 0; background: transparent; color: var(--tm-dim); font-size: 13px; font-weight: 600; cursor: pointer; }
.tm .tm-seg button[aria-pressed="true"] { background: var(--tm-accent); color: #fff; }
.tm .tm-bodies { display: flex; flex-wrap: wrap; gap: 6px; }
.tm .tm-pill { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--tm-edge); background: transparent; font-size: 13px; cursor: pointer; }
.tm .tm-pill[aria-pressed="true"] { border-color: var(--tm-accent); color: #fff; background: rgba(255, 86, 0, 0.15); }
.tm .tm-swatches { display: flex; flex-direction: column; gap: 8px; flex: 1 1 100%; }
.tm .tm-swatch-row { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.tm .tm-swatch-kind { width: 79px; font-size: 13px; color: var(--tm-dim); text-transform: capitalize; }
.tm .tm-swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--tm-edge); background: #52525b; cursor: pointer; padding: 0; }
.tm .tm-swatch[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 0 2px var(--tm-accent); }
.tm .tm-btn { min-height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--tm-edge); background: var(--tm-card); font-size: 13px; font-weight: 600; cursor: pointer; }
.tm .tm-desk { font-size: 13px; font-weight: 600; }
.tm .tm-fine { margin: 0; font-size: 11.5px; color: #8b8b94; }
.tm .tm-fine a { color: inherit; text-decoration: underline; }

.tm .tm-foot { display: flex; flex-direction: column; gap: 8px; padding: 10px 14px 12px; border-top: 1px solid var(--tm-line); background: #0b0c10; }
.tm .tm-ctas { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 12px; }
.tm .tm-cta { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 12px; background: var(--tm-accent); color: #fff !important; font-weight: 700; font-size: 16px; text-decoration: none !important; }
.tm .tm-cta:hover { background: var(--tm-accent-dark); }
.tm .tm-cta-note { font-size: 12px; color: var(--tm-dim); }
.tm .tm-plans { justify-self: end; font-size: 13px; font-weight: 600; color: #ff8a4d !important; }
.tm .tm-ctas .tm-plans:only-of-type:first-of-type { justify-self: center; }

/* Settings take the transcript's place while they are open. */
.tm .tm-panel.tm-set-open .tm-lines, .tm .tm-panel.tm-set-open .tm-meter { display: none; }
.tm .tm-panel.tm-set-open .tm-settings { max-height: none; flex: 1 1 auto; }

/* Phones: the panel is a sheet across the bottom, above the character. */
@media (max-width: 600px) {
  .tm .tm-buddy { right: 10px; bottom: 10px; }
  .tm .tm-still { width: 72px; height: 72px; }
  .tm.tm-is-open .tm-buddy { display: none; }
  .tm .tm-panel { left: 8px; right: 8px; bottom: 8px; width: auto; max-height: calc(100dvh - 76px); border-radius: 18px; }
  .tm .tm-lines { min-height: 90px; }
  .tm .tm-nudge { right: 14px; bottom: 98px; }
}
@media (prefers-reduced-motion: reduce) { .tm-still, .tm[data-state] .tm-still { animation: none !important; } .tm-meter i { transition: none; } }
@media print { .tm { display: none !important; } }
