@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("./inter-latin.woff2") format("woff2");
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("./inter-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

:root {
  font-family: Inter, Arial, sans-serif;
  color: var(--text-primary);
  --surface: var(--background);
  --foreground: var(--text-primary);
  --muted: #535353;
  --quiet: #636363;
  --border: #e4e4e4;
  --brand-ink: #51451d;
  --success: #117454;
  --success-soft: #e7f6ee;
  --violet: #6742bd;
  --violet-soft: #f1ebfc;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

body,
button,
input {
  font: inherit;
}

a,
button,
input {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--brand-dark-gold);
  outline-offset: 3px;
}

button:disabled {
  cursor: default;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
p,
ol,
ul {
  margin: 0;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.stage {
  position: relative;
}

html[data-capture] {
  overflow: hidden;
  scrollbar-gutter: auto;
}

html[data-capture] .stage {
  width: 1440px;
  height: 810px;
  min-height: 0;
  transform-origin: top left;
}

html[data-capture] .stage .sidebar {
  height: 810px;
}

html[data-capture] .stage .main {
  padding-block: 24px 0;
}

html[data-capture] .call-page-header {
  display: none;
}

.call-context a {
  color: inherit;
  text-underline-offset: 2px;
}

.workspace {
  display: grid;
  gap: 17px;
}

.card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow:
    0 2px 6px #00000008,
    0 10px 18px -15px #0000002b;
}

.call-card {
  min-height: 108px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 14px 22px;
}

.call-heading,
.call-data,
.call-context {
  display: flex;
  align-items: center;
}

.call-heading {
  gap: 15px;
}

.call-data {
  gap: 16px;
}

.call-symbol {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid var(--brand-border);
  background: var(--brand-accent);
  color: var(--brand-ink);
}

.call-symbol .icon {
  width: 26px;
  height: 26px;
}

.call-card[data-phase="ongoing"] .call-symbol {
  background: var(--success-soft);
  border-color: #d0eedf;
  color: var(--success);
}

.call-card[data-phase="ended"] .call-symbol {
  background: var(--background-secondary);
  border-color: var(--border);
  color: var(--muted);
}

.eyebrow {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.call-heading h2 {
  margin: 4px 0;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 740;
  letter-spacing: -0.042em;
}

.call-context {
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.middle-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #9a9a9a;
}

.audio-source {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 58px;
  padding: 0 12px 0 9px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fafafa;
}

.source-logo {
  display: grid;
  place-items: center;
  height: 34px;
  padding: 0 2px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
}

.source-logo img {
  width: 102px;
  height: auto;
  margin-block: -5px;
}

.audio-details {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.waveform {
  height: 20px;
  display: flex;
  align-items: center;
  gap: 3px;
  width: 142px;
}

.waveform span {
  width: 3px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--brand-accent);
  transform: scaleY(0.16);
}

.waveform[data-voice="operator"] span:nth-child(3n + 1) {
  background: var(--brand-dark-gold);
}

.waveform[data-voice="customer"] span:nth-child(3n + 1) {
  background: var(--brand-dark-gold);
}

.waveform[data-voice="customer"] span {
  background: var(--brand-primary);
}

.call-controls {
  min-width: 138px;
  display: grid;
}

.call-clock {
  display: grid;
  justify-items: end;
  gap: 2px;
  padding-right: 2px;
}

.call-clock-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--success);
  font-size: 12px;
  font-weight: 650;
}

[data-phase="ended"] .call-clock-label {
  color: var(--muted);
}

.call-clock strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.06em;
}

.button,
.badge {
  display: inline-flex;
  width: fit-content;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
}

.button {
  padding: 0 13px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--foreground);
  background: var(--surface);
  cursor: pointer;
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
}

.button .icon {
  width: 16px;
  height: 16px;
}

.button-outline {
  border-color: #d9d9d9;
}

.button-outline:hover {
  background: var(--background-secondary);
}

.button-primary,
.button-positive {
  color: var(--brand-secondary);
  background: var(--brand-primary);
}

.button-primary:hover,
.button-positive:hover {
  background: var(--brand-accent);
}

.button-positive {
  justify-self: end;
}

.badge {
  height: 25px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.badge .icon {
  width: 13px;
  height: 13px;
}

.badge-outline {
  color: var(--muted);
  border-color: var(--border);
  background: #fafafa;
}

.badge-neutral {
  color: var(--muted);
  background: var(--background-secondary);
}

.badge-live {
  color: var(--success);
  background: var(--success-soft);
}

.badge-working {
  color: var(--brand-ink);
  background: var(--brand-accent);
}

.status-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}

.panels {
  height: 523px;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 18px;
}

.assistant-panels {
  display: grid;
  min-width: 0;
  grid-template-rows: 254px 253px;
  gap: 16px;
}

.panel-header {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid #ededed;
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--brand-ink);
  background: var(--brand-tint);
}

.panel-icon-decision {
  color: #51451d;
  background: var(--brand-tint);
}

.panel-icon-insight {
  color: var(--violet);
  background: var(--violet-soft);
}

.panel-icon .icon {
  width: 20px;
  height: 20px;
}

.panel-header h2 {
  margin-bottom: 3px;
  font-size: 17px;
  line-height: 1.12;
  font-weight: 730;
  letter-spacing: -0.035em;
}

.panel-header p {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.transcript {
  display: grid;
  min-height: 0;
  overflow: hidden;
  grid-template-rows: 64px minmax(0, 1fr) 44px;
}

.transcript-content {
  position: relative;
  min-height: 0;
}

.transcript-scroll {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.transcript-content[data-scrolled]::before {
  position: absolute;
  content: "";
  inset: 0 0 auto;
  height: 14px;
  background: linear-gradient(white, #ffffff00);
  pointer-events: none;
  z-index: 1;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 16px 16px 15px;
  list-style: none;
}

.message {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
}

.message-avatar {
  display: grid;
  place-items: center;
  margin-top: 6px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--background-secondary);
  color: var(--muted);
}

.message-avatar .icon {
  width: 16px;
  height: 16px;
}

.message[data-speaker="customer"] .message-avatar {
  color: #51451d;
  background: var(--brand-tint);
  border-color: var(--brand-border);
}

.message-box {
  min-height: 68px;
  padding: 9px 12px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafafa;
}

.message[data-speaker="customer"] .message-box {
  background: var(--brand-tint);
  border-color: var(--brand-border);
}

.message[data-live] .message-box {
  border-color: var(--brand-dark-gold);
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.message[data-speaker="customer"] .message-meta {
  color: #51451d;
}

.message-meta time {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 550;
}

.message-text {
  font-size: 16px;
  line-height: 1.47;
  font-weight: 480;
  letter-spacing: -0.012em;
  overflow-wrap: anywhere;
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 3px;
  border-radius: 2px;
  vertical-align: -0.13em;
  background: currentColor;
  color: var(--brand-ink);
}

.transcript-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-top: 1px solid #ededed;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.transcript-footer .icon {
  width: 15px;
  height: 15px;
}

.transcript-footer[data-voice="operator"] {
  color: var(--muted);
}

.transcript-footer[data-voice="customer"] {
  color: #51451d;
}

.empty-state {
  display: grid;
  place-content: center;
  justify-items: center;
  height: 100%;
  gap: 8px;
  padding: 14px;
  text-align: center;
  color: var(--muted);
}

.empty-state strong {
  font-size: 14px;
  font-weight: 670;
}

.empty-state p {
  font-size: 13px;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 3px;
  color: #51451d;
  background: var(--brand-tint);
  border-radius: 11px;
}

.empty-icon .icon {
  width: 21px;
  height: 21px;
}

.intents {
  padding: 7px 12px 4px;
  display: grid;
  gap: 1px;
  list-style: none;
}

.intent,
.insight-entry {
  --intent-color: #6742bd;
  --intent-bar: #875de0;
  --intent-tint: #f6f1ff;
  --intent-border: #dfd0fa;
}

[data-color="blue"] {
  --intent-color: #315acf;
  --intent-bar: #5383ec;
  --intent-tint: #eff4ff;
  --intent-border: #d6e4ff;
}

[data-color="amber"] {
  --intent-color: #8b5318;
  --intent-bar: #d99439;
  --intent-tint: #fff5e7;
  --intent-border: #f8e2c1;
}

[data-color="teal"] {
  --intent-color: #09746b;
  --intent-bar: #1ba79a;
  --intent-tint: #eaf9f5;
  --intent-border: #c6eee4;
}

[data-color="rose"] {
  --intent-color: #a34770;
  --intent-bar: #d5699b;
  --intent-tint: #fdf0f6;
  --intent-border: #f2d8e5;
}

.intent {
  display: grid;
  grid-template-columns: minmax(163px, 1fr) minmax(100px, 1.38fr) 54px;
  align-items: center;
  gap: 10px;
  height: 29px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 12px;
  color: var(--muted);
}

.intent[data-state="candidate"] {
  background: var(--intent-tint);
}

.intent[data-state="detected"] {
  background: var(--intent-tint);
  border-color: var(--intent-border);
  color: var(--intent-color);
}

.intent-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 630;
}

.intent-name::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--intent-bar);
}

.intent-track {
  display: block;
  position: relative;
  height: 6px;
  border-radius: 20px;
  background: #ebebeb;
}

.intent-track::after {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: calc(var(--threshold, 90%) - 1px);
  width: 1px;
  background: #777;
  content: "";
}

.intent-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--intent-bar);
  opacity: 0.72;
}

.intent[data-state="detected"] .intent-fill {
  opacity: 1;
}

.intent-value {
  justify-self: end;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  white-space: nowrap;
}

.intent[data-state="detected"] .intent-value {
  padding: 2px 6px;
  border-radius: 5px;
  color: white;
  background: var(--intent-color);
}

.decision-clock[data-running] {
  color: #51451d;
  border-color: var(--brand-border);
  background: var(--brand-tint);
}

.decision-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
  padding: 0 16px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 550;
}

.decision-footer span {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.decision-footer strong {
  color: var(--text-primary);
  font-weight: 750;
}

.decision-footer .icon {
  width: 13px;
  height: 13px;
}

.threshold-key {
  width: 1px;
  height: 11px;
  background: var(--muted);
}

#decision-event[data-color="violet"] {
  color: var(--violet);
}

#decision-event[data-color="teal"] {
  color: #09746b;
}

.insight {
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
}

.insight[data-working] {
  border-color: var(--brand-border);
  box-shadow:
    0 0 0 2px var(--brand-tint),
    0 8px 25px -18px #806e2840;
}

.insight-content {
  min-height: 0;
  padding: 9px 12px 10px;
}

.insight-empty {
  background: #fafafa;
  border: 1px dashed var(--border);
  border-radius: 10px;
}

.insight-empty .empty-icon {
  color: #8a73b8;
  background: #f2edf9;
}

#insight-cards {
  display: grid;
  gap: 5px;
}

.insight-entry {
  min-width: 0;
  min-height: 0;
  padding: 8px 10px;
  border: 1px solid var(--intent-border);
  border-radius: 9px;
  background: var(--intent-tint);
}

.insight-entry[open] + .insight-entry {
  margin-top: 1px;
}

.insight-entry > summary {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--intent-color);
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 740;
}

.insight-entry > summary::-webkit-details-marker {
  display: none;
}

.insight-entry > summary .icon {
  width: 15px;
  height: 15px;
}

.insight-entry .entry-chevron {
  margin-left: auto;
}

.insight-entry[open] .entry-chevron {
  transform: rotate(90deg);
}

.insight-data {
  display: grid;
  gap: 5px;
  padding-top: 5px;
}

.answer {
  min-height: 35px;
  color: #252525;
  font-size: 13px;
  line-height: 1.42;
  font-weight: 500;
}

.answer strong {
  font-weight: 750;
}

.answer .caret {
  color: var(--intent-color);
}

.search-step {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--intent-color);
  font-size: 13px;
  font-weight: 600;
}

.search-step .icon {
  width: 15px;
  height: 15px;
}

.knowledge-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 10px;
}

.knowledge-label {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 2px;
  color: var(--muted);
  font-weight: 650;
}

.knowledge-label .icon {
  width: 13px;
  height: 13px;
}

.source-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  border: 1px solid var(--intent-border);
  border-radius: 5px;
  color: var(--intent-color);
  background: var(--surface);
  font-weight: 650;
  text-decoration: none;
}

.source-link:hover {
  text-decoration: underline;
}

.source-link .icon {
  width: 11px;
  height: 11px;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.sms-button {
  height: 27px;
  padding-inline: 8px;
  border-radius: 6px;
  font-size: 11px;
}

.sms-button .icon {
  height: 13px;
  width: 13px;
}

.sms-button:disabled {
  color: var(--success);
  background: #d9f2e6;
  border-color: #bde8d2;
}

.sms-receipt {
  color: var(--success);
  font-size: 10px;
  font-weight: 650;
}

.signal-path {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 620;
}

.signal-label {
  margin-right: 4px;
  color: var(--muted);
  font-weight: 750;
}

.signal-node {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 25px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fafafa;
}

.signal-node .icon,
.path-arrow {
  height: 13px;
  width: 13px;
}

.signal-node[data-active] {
  color: var(--text-primary);
  border-color: var(--brand-border);
  background: var(--brand-tint);
}

#signal-insight[data-active] {
  color: var(--violet);
  border-color: #ddcff9;
  background: var(--violet-soft);
}

.demo-pointer {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  pointer-events: none;
}

.demo-pointer .icon {
  position: absolute;
  top: -3px;
  left: -3px;
  width: 26px;
  height: 26px;
  fill: var(--brand-secondary);
  stroke: white;
  stroke-width: 1.5;
  filter: drop-shadow(0 2px 3px #0000005c);
}

.demo-pointer span {
  display: block;
  width: 28px;
  height: 28px;
  margin: -14px;
  border: 2px solid var(--brand-dark-gold);
  border-radius: 50%;
  background: #ffdc0050;
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  width: min(100%, 420px);
}

.player-play {
  min-width: 144px;
}

.icon-button {
  width: 36px;
  padding: 0;
}

.player-timeline {
  flex: 1 1 110px;
}

.player-timeline input {
  display: block;
  width: 100%;
  height: 23px;
  margin: 0;
  accent-color: var(--brand-primary);
  cursor: pointer;
}

.player-time {
  min-width: 83px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.knowledge-dialog {
  width: min(490px, calc(100% - 24px));
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--foreground);
  box-shadow: 0 17px 50px #00000035;
}

.knowledge-dialog::backdrop {
  background: #00000066;
}

.knowledge-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.knowledge-dialog h2 {
  margin: 5px 0 10px;
}

.knowledge-dialog p {
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 1050px) {
  .call-page-header {
    flex-wrap: wrap;
  }
}

@media (max-width: 980px) {
  .panels {
    height: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 440px auto;
  }

  .assistant-panels {
    grid-template-rows: auto minmax(242px, auto);
  }
}

@media (max-width: 640px) {
  .call-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 14px;
  }

  .call-data {
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
  }

  .call-clock {
    justify-items: start;
  }

  .panels {
    grid-template-rows: 390px auto;
  }

  .intent {
    grid-template-columns: minmax(122px, 1fr) minmax(42px, 0.9fr) 46px;
    gap: 5px;
  }

  .decision-footer {
    flex-wrap: wrap;
  }

  .decision-footer span {
    white-space: normal;
  }

  .signal-path {
    flex-wrap: wrap;
  }

  .player-controls {
    justify-content: flex-start;
  }

  .player-timeline {
    order: 1;
    flex-basis: calc(100% - 100px);
  }

  .player-time {
    order: 2;
  }
}
