@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap");

/* Habar AI, интерактивная карточка звонка для сайта IT-Lab05.
   Все классы с префиксом .hx-, токены из globals.css приложения (светлая тема). */

.hx-demo {
  --hx-bg: #f7f8fa;
  --hx-surface: #ffffff;
  --hx-surface-2: #f1f3f7;
  --hx-text: #1c2431;
  --hx-text-2: #66707e;
  --hx-faint: #98a1ae;
  --hx-border: #e8eaf0;
  --hx-border-strong: #d7dbe4;
  --hx-primary: #0066ff;
  --hx-primary-hover: #0052cc;
  --hx-primary-soft: #e5edff;
  --hx-success: #12a150;
  --hx-success-soft: #e3f6ec;
  --hx-warning: #b25e00;
  --hx-warning-soft: #fbeede;
  --hx-error: #e5484d;
  --hx-error-soft: #fdeaea;
  --hx-ring: rgba(0, 102, 255, 0.35);
  --hx-shadow-1: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --hx-shadow-2: 0 4px 16px rgba(16, 24, 40, 0.08);
  --hx-shadow-3: 0 20px 48px rgba(16, 24, 40, 0.14);
  --hx-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --hx-ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  position: relative;
  max-width: 1240px;
  margin-inline: auto;
  color: var(--hx-text);
  background: var(--hx-bg);
  font-family: var(--hx-font);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0;
  text-align: left;
  color-scheme: light;
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}
.hx-demo *,
.hx-demo *::before,
.hx-demo *::after {
  box-sizing: border-box;
}
:where(.hx-demo) :is(h1, h2, h3, p, ul, li, figure) {
  margin: 0;
  padding: 0;
}
:where(.hx-demo) ul {
  list-style: none;
}
:where(.hx-demo) button,
:where(.hx-demo) input,
:where(.hx-demo) select,
:where(.hx-demo) textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  margin: 0;
}
:where(.hx-demo) button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: inherit;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 160ms var(--hx-ease),
    box-shadow 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    opacity 160ms ease;
}
:where(.hx-demo) button:active:not(:disabled) {
  transform: scale(0.97);
}
:where(.hx-demo) button:disabled {
  cursor: not-allowed;
}
.hx-demo a {
  color: var(--hx-primary);
  text-decoration: none;
}
.hx-demo a:hover {
  text-decoration: underline;
}
/* Заголовки: сайт задаёт шрифт и размер голым h2/h3, здесь перебиваем специфичностью. */
.hx-demo h1,
.hx-demo h2,
.hx-demo h3 {
  font: 600 15px/1.2 var(--hx-font);
  letter-spacing: -0.015em;
  text-wrap: auto;
  color: inherit;
}
.hx-demo .hx-name,
.hx-demo .hx-list-title {
  font-size: 22px;
}
.hx-demo .hx-h3 {
  font-size: 13px;
}
.hx-demo table {
  border-spacing: 0;
}
.hx-demo :focus-visible:not(input, textarea, select) {
  outline: 2px solid var(--hx-primary);
  outline-offset: 2px;
  border-radius: 6px;
}
.hx-demo :is(input, textarea, select):focus-visible {
  outline: none;
}
.hx-demo svg {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}
.hx-ui {
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.hx-tnum {
  font-variant-numeric: tabular-nums;
}
.hx-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Окно ===== */
.hx-window {
  position: relative;
  display: flex;
  flex-direction: column;
  height: min(80vh, 820px);
  min-height: 520px;
  overflow: hidden;
  background: var(--hx-bg);
}

/* Верхняя полоса окна: вкладки сценариев, счётчик, «Открыть полностью», закрыть */
.hx-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  height: 48px;
  padding: 0 12px;
  border-bottom: 1px solid var(--hx-border);
  background: var(--hx-surface);
}
.hx-tabs {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  padding: 4px;
  border-radius: 10px;
  background: var(--hx-surface-2);
  overflow-x: auto;
  scrollbar-width: none;
}
.hx-tabs::-webkit-scrollbar {
  display: none;
}
.hx-tab {
  position: relative;
  z-index: 1;
  height: 32px;
  padding: 0 14px;
  border-radius: 7px;
  font-size: 14px;
  white-space: nowrap;
  color: var(--hx-text-2);
  transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}
.hx-tab:hover {
  color: var(--hx-text);
}
.hx-tab[aria-selected="true"] {
  font-weight: 500;
  color: var(--hx-text);
  background: var(--hx-surface);
  box-shadow: var(--hx-shadow-1);
}
.hx-top-count {
  margin-left: 8px;
  color: var(--hx-text-2);
  white-space: nowrap;
}
.hx-top-esc {
  margin-left: 12px;
  font-size: 12px;
  color: var(--hx-faint);
  white-space: nowrap;
}
.hx-top-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--hx-border);
  border-radius: 8px;
  color: var(--hx-text);
  white-space: nowrap;
}
.hx-top-open:hover {
  background: var(--hx-bg);
}
.hx-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--hx-text-2);
}
.hx-icon-btn:hover {
  background: var(--hx-bg);
}

/* Прокручиваемое тело окна */
.hx-scroll {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 24px 150px;
}
/* Пока идёт автодемо, колесо и палец листают страницу, а не окно: окно прокручивает только сам курсор демо. */
.hx-window.hx-auto-on .hx-scroll,
.hx-window.hx-auto-on .hx-lines {
  overflow-y: hidden;
}


/* ===== Шапка карточки ===== */
.hx-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.hx-head-main {
  min-width: 0;
}
.hx-name {
  font-size: 22px;
  font-weight: 600;
}
.hx-meta {
  margin-top: 4px;
  min-width: 0;
  font-size: 14px;
  color: var(--hx-text-2);
}
.hx-meta a {
  white-space: nowrap;
}
.hx-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.hx-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.hx-badge-info {
  background: var(--hx-primary-soft);
  color: var(--hx-primary);
}
.hx-badge-positive {
  background: var(--hx-success-soft);
  color: var(--hx-success);
}
.hx-badge-negative {
  background: var(--hx-error-soft);
  color: var(--hx-error);
}
.hx-badge-warning {
  background: var(--hx-warning-soft);
  color: var(--hx-warning);
}
.hx-badge-neutral {
  background: var(--hx-border);
  color: var(--hx-text-2);
}
.hx-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
}
.hx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--hx-border);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--hx-text);
  white-space: nowrap;
  flex-shrink: 0;
}
.hx-btn:hover:not(:disabled) {
  background: var(--hx-primary-soft);
  border-color: var(--hx-primary-soft);
}
.hx-btn:disabled {
  opacity: 0.5;
}
.hx-btn-primary {
  height: 40px;
  padding: 0 16px;
  font-size: 14px;
  border-color: var(--hx-primary);
  background: var(--hx-primary);
  color: #fff;
  box-shadow: var(--hx-shadow-1);
}
.hx-btn-primary:hover:not(:disabled) {
  background: var(--hx-primary-hover);
  border-color: var(--hx-primary-hover);
}
.hx-btn-md {
  height: 40px;
  padding: 0 16px;
  font-size: 14px;
}
.hx-btn .hx-ok {
  color: var(--hx-success);
}
.hx-msg {
  margin-top: 8px;
  font-size: 13px;
}
.hx-msg-ok {
  color: var(--hx-success);
}
.hx-msg-err {
  color: var(--hx-error);
}
.hx-deferred {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--hx-warning-soft);
  font-size: 13px;
}
.hx-deferred b {
  font-weight: 500;
}
.hx-deferred span {
  display: block;
  margin-top: 2px;
  white-space: pre-wrap;
}
@keyframes hx-spin {
  to {
    transform: rotate(360deg);
  }
}
.hx-spin {
  animation: hx-spin 1s linear infinite;
}

/* ===== Сетка карточек ===== */
.hx-main {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.hx-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.hx-aside {
  min-width: 0;
  position: sticky;
  top: 0;
  height: var(--hx-aside-h, 600px);
}
.hx-card {
  border-radius: 16px;
  border: 1px solid var(--hx-border);
  background: var(--hx-surface);
  box-shadow: var(--hx-shadow-1);
  padding: 20px;
}
.hx-h2 {
  font-size: 15px;
  font-weight: 600;
}
.hx-h3 {
  font-size: 13px;
  font-weight: 600;
}

/* ===== Оценка скрипта + нарушения ===== */
.hx-score {
  container-type: inline-size;
  container-name: hx-score;
}
.hx-score-grid {
  display: grid;
  gap: 20px;
}
@container hx-score (min-width: 36rem) {
  .hx-score-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
  .hx-viol {
    position: sticky;
    top: 16px;
  }
}
.hx-score-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 12px;
}
.hx-score-pct {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.hx-score-sub {
  margin-bottom: 8px;
}
.hx-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hx-item {
  display: grid;
  grid-template-columns: 1.5rem 1.25rem minmax(0, 1fr);
  column-gap: 6px;
  font-size: 13px;
}
.hx-item-n {
  color: var(--hx-text-2);
}
.hx-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border-radius: 5px;
  background: var(--hx-success-soft);
  color: var(--hx-success);
}
.hx-mark[aria-checked="false"] {
  background: var(--hx-error-soft);
  color: var(--hx-error);
}
.hx-mark:hover {
  box-shadow: 0 0 0 3px var(--hx-ring);
}
.hx-mark svg {
  width: 12px;
  height: 12px;
}
.hx-item-body {
  min-width: 0;
}
.hx-quote {
  color: var(--hx-text-2);
  text-decoration: underline dotted var(--hx-border-strong);
  text-underline-offset: 3px;
}
.hx-quote:hover {
  color: var(--hx-primary);
  text-decoration-color: var(--hx-primary);
}
.hx-quote-miss {
  color: var(--hx-error);
  text-decoration-color: var(--hx-error);
}
.hx-why {
  margin-top: 2px;
  font-size: 12px;
  color: var(--hx-faint);
}

.hx-viol {
  min-width: 0;
  padding: 16px;
  border-radius: 12px;
  background: var(--hx-surface-2);
}
.hx-viol-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hx-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  min-width: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--hx-error-soft);
  color: var(--hx-error);
  font-size: 11px;
  font-weight: 500;
}
.hx-viol-empty {
  margin-top: 12px;
  color: var(--hx-text-2);
}
.hx-viol-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}
.hx-check {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.hx-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.hx-check-box {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 5px;
  border: 1px solid var(--hx-border-strong);
  background: var(--hx-surface);
  color: #fff;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.hx-check:hover .hx-check-box {
  border-color: var(--hx-faint);
}
.hx-check input:checked + .hx-check-box {
  border-color: var(--hx-error);
  background: var(--hx-error);
}
.hx-check input:focus-visible + .hx-check-box {
  box-shadow: 0 0 0 3px var(--hx-ring);
}
.hx-check-box svg {
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 150ms ease, transform 150ms ease;
}
.hx-check input:checked + .hx-check-box svg {
  opacity: 1;
  transform: scale(1);
}
.hx-check-label {
  font-size: 13px;
  line-height: 1.375;
  color: var(--hx-error);
}
.hx-chip {
  display: inline-flex;
  align-items: center;
  height: 20px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  vertical-align: middle;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.hx-chip-b1 {
  background: var(--hx-error-soft);
  color: var(--hx-error);
}
.hx-chip-b2 {
  background: var(--hx-surface);
  color: var(--hx-text-2);
}
.hx-chip-sent {
  background: var(--hx-error-soft);
  color: var(--hx-error);
}
.hx-chip-untyped {
  border: 1px dashed var(--hx-border-strong);
  color: var(--hx-text-2);
  font-weight: 400;
}
.hx-manual {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}
.hx-manual-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hx-input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--hx-border);
  background: var(--hx-surface);
  font-size: 13px;
  color: var(--hx-text);
}
.hx-input::placeholder {
  color: var(--hx-faint);
}
.hx-input:focus {
  border-color: var(--hx-border-strong);
}
.hx-manual-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--hx-text-2);
}
.hx-manual-x:hover {
  background: var(--hx-surface);
  color: var(--hx-error);
}
.hx-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  font-size: 12px;
  color: var(--hx-primary);
}
.hx-more:hover {
  text-decoration: underline;
}
.hx-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--hx-text-2);
}
.hx-viol-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.hx-send {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--hx-primary);
  background: var(--hx-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.015em;
  white-space: nowrap;
  box-shadow: var(--hx-shadow-1);
}
.hx-send:hover:not(:disabled) {
  background: var(--hx-primary-hover);
  border-color: var(--hx-primary-hover);
}
.hx-send:disabled {
  opacity: 0.5;
}
.hx-send-n {
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  font-size: 11px;
}
.hx-review {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-left: auto;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--hx-border-strong);
  background: var(--hx-surface);
  color: var(--hx-text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.015em;
  box-shadow: var(--hx-shadow-1);
}
.hx-review:hover {
  border-color: var(--hx-success);
}
.hx-review-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid var(--hx-border-strong);
  background: var(--hx-surface);
  color: transparent;
}
.hx-review[aria-pressed="true"] {
  border-color: var(--hx-success);
  background: var(--hx-success);
  color: #fff;
}
.hx-review[aria-pressed="true"] .hx-review-box {
  border-color: #fff;
  background: #fff;
  color: var(--hx-success);
}
.hx-bx-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
}
.hx-viol .hx-msg {
  margin-top: 12px;
}

/* ===== Поля анализа ===== */
.hx-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  margin-top: 16px;
}
.hx-field {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hx-border);
}
.hx-field-k {
  color: var(--hx-text-2);
}
.hx-field-v {
  font-weight: 500;
  text-align: right;
}
.hx-field-wide {
  grid-column: 1 / -1;
  display: block;
}
.hx-field-wide .hx-field-v {
  margin-top: 4px;
  text-align: left;
  white-space: pre-wrap;
}
.hx-briefs {
  margin-top: 20px;
  padding: 16px;
  border-radius: 12px;
  background: var(--hx-surface-2);
}
.hx-briefs .hx-h2 {
  margin-bottom: 8px;
}
.hx-briefs p {
  line-height: 1.625;
  white-space: pre-wrap;
}
.hx-brief-call {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--hx-border-strong);
}
.hx-brief-call .hx-h2 {
  margin-bottom: 12px;
}
.hx-brief-row + .hx-brief-row {
  margin-top: 8px;
}
.hx-brief-k {
  font-size: 12px;
  color: var(--hx-text-2);
}
.hx-brief-row p {
  margin-top: 4px;
}
.hx-brief-row .hx-strong {
  font-weight: 500;
}

/* ===== Транскрипт ===== */
.hx-transcript {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.hx-tr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
  margin-bottom: 12px;
}
.hx-tr-now {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--hx-primary-soft);
  color: var(--hx-primary);
  font-size: 12px;
  font-weight: 500;
}
.hx-tr-now[hidden] {
  display: none;
}
.hx-lines {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin: 0 -4px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hx-line {
  display: flex;
  justify-content: flex-start;
}
.hx-line-client {
  justify-content: flex-end;
}
.hx-bubble {
  max-width: 92%;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--hx-primary-soft);
  transition: box-shadow 160ms ease;
}
.hx-line-client .hx-bubble {
  background: var(--hx-bg);
  border: 1px solid var(--hx-border);
}
.hx-bubble:hover {
  box-shadow: inset 0 0 0 2px rgba(0, 102, 255, 0.4);
}
.hx-bubble:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(0, 102, 255, 0.6);
  border-radius: 16px;
}
.hx-line-active .hx-bubble {
  box-shadow: inset 0 0 0 2px var(--hx-primary);
}
.hx-bubble-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--hx-text-2);
}
.hx-bubble-time {
  color: var(--hx-primary);
}
.hx-bubble-text {
  font-size: 13px;
  line-height: 1.625;
}

/* ===== Плеер ===== */
.hx-player {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 20;
  width: min(920px, calc(100% - 24px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid var(--hx-border);
  background: var(--hx-surface);
  box-shadow: var(--hx-shadow-3);
}
.hx-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--hx-border);
  color: var(--hx-text-2);
}
.hx-nav:hover:not(:disabled) {
  background: var(--hx-bg);
  color: var(--hx-text);
}
.hx-nav:disabled {
  opacity: 0.35;
}
.hx-player-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hx-player-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hx-player-ctl {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.hx-seek {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: var(--hx-text-2);
}
.hx-seek:hover {
  background: var(--hx-bg);
  color: var(--hx-text);
}
.hx-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--hx-primary);
  color: #fff;
  box-shadow: var(--hx-shadow-1);
}
.hx-play:hover {
  background: var(--hx-primary-hover);
}
.hx-play .hx-ic-play {
  margin-left: 2px;
}
.hx-play[aria-pressed="true"] .hx-ic-play,
.hx-play[aria-pressed="false"] .hx-ic-pause {
  display: none;
}
.hx-time {
  min-width: 0;
  white-space: nowrap;
  font-size: 14px;
  color: var(--hx-text-2);
}
.hx-time b {
  font-weight: 400;
  color: var(--hx-text);
}
.hx-player-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.hx-rates {
  display: inline-flex;
  height: 32px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--hx-border);
  font-size: 13px;
}
.hx-rate {
  padding: 0 10px;
  color: var(--hx-text-2);
}
.hx-rate:hover {
  background: var(--hx-bg);
}
.hx-rate[aria-checked="true"] {
  background: var(--hx-primary-soft);
  color: var(--hx-primary);
  font-weight: 500;
}
.hx-rate-cycle {
  display: none;
  margin-left: auto;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--hx-border);
  color: var(--hx-text-2);
  font-size: 14px;
  font-weight: 500;
}
.hx-rate-cycle.hx-on {
  border-color: transparent;
  background: var(--hx-primary-soft);
  color: var(--hx-primary);
}
.hx-vol {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hx-vol input[type="range"] {
  width: 80px;
  height: 4px;
  cursor: pointer;
  accent-color: var(--hx-primary);
}
.hx-track {
  position: relative;
  height: 24px;
  border-radius: 6px;
  background: var(--hx-surface-2);
  cursor: pointer;
}
.hx-seg {
  position: absolute;
  top: 50%;
  height: 14px;
  transform: translateY(-50%);
  border-radius: 3px;
}
.hx-seg-operator {
  background: rgba(0, 102, 255, 0.25);
}
.hx-seg-client {
  background: var(--hx-border-strong);
}
.hx-track-played {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hx-track-played .hx-seg-operator {
  background: var(--hx-primary);
}
.hx-track-played .hx-seg-client {
  background: var(--hx-text-2);
}
.hx-cursor {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--hx-primary);
  pointer-events: none;
}
.hx-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  font-size: 12px;
  color: var(--hx-text-2);
}
.hx-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hx-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--hx-primary);
}
.hx-legend i.hx-i-client {
  background: var(--hx-text-2);
}
.hx-legend .hx-legend-hint {
  margin-left: auto;
  color: var(--hx-faint);
}
.hx-bar {
  position: relative;
  display: none;
  align-items: center;
  height: 28px;
  cursor: pointer;
  touch-action: none;
}
.hx-bar-rail {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--hx-surface-2);
}
.hx-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--hx-primary);
}
.hx-bar-knob {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  border: 2px solid #fff;
  background: var(--hx-primary);
  box-shadow: var(--hx-shadow-1);
  pointer-events: none;
}
.hx-now-line {
  display: none;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.375;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.hx-ic-mute,
.hx-muted .hx-ic-vol {
  display: none;
}
.hx-muted .hx-ic-mute {
  display: inline-block;
}
.hx-now-line b {
  font-weight: 500;
  color: var(--hx-primary);
}
.hx-now-line b.hx-now-client {
  color: var(--hx-text-2);
}
.hx-now-line:empty {
  display: none;
}

/* ===== Окошки и уведомления внутри окна ===== */
.hx-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  background: rgba(0, 0, 0, 0.4);
  overflow-y: auto;
}
.hx-dialog {
  width: 100%;
  max-width: 448px;
  padding: 24px;
}
.hx-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.hx-dialog-text {
  margin-bottom: 8px;
  color: var(--hx-text-2);
}
.hx-dialog label span {
  display: block;
  font-size: 12px;
  color: var(--hx-text-2);
}
.hx-textarea,
.hx-select {
  width: 100%;
  margin-top: 4px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--hx-border);
  background: var(--hx-surface);
  font-size: 14px;
  color: var(--hx-text);
  resize: vertical;
}
.hx-select {
  height: 40px;
  padding: 0 12px;
  font-size: 13px;
}
.hx-select.hx-err {
  border-color: var(--hx-error);
  box-shadow: 0 0 0 2px rgba(229, 72, 77, 0.25);
}
.hx-textarea:focus,
.hx-select:focus {
  border-color: var(--hx-border-strong);
}
.hx-dialog-err {
  margin-top: 6px;
  font-size: 12px;
  color: var(--hx-error);
}
.hx-dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.hx-toasts {
  position: absolute;
  right: 16px;
  top: 60px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(380px, calc(100% - 32px));
  pointer-events: none;
}
.hx-toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 8px 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--hx-border);
  background: var(--hx-surface);
  box-shadow: var(--hx-shadow-3);
  pointer-events: auto;
  animation: hx-toast-in 220ms ease-out;
  transition: opacity 200ms ease-out, transform 200ms ease-out;
}
.hx-toast.hx-leaving {
  opacity: 0;
  transform: translateY(8px);
}
.hx-toast-ic {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: 999px;
  background: var(--hx-success-soft);
  color: var(--hx-success);
}
.hx-toast-ic.hx-toast-info {
  background: var(--hx-primary-soft);
  color: var(--hx-primary);
}
.hx-toast-body {
  flex: 1;
  min-width: 0;
}
.hx-toast-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}
.hx-toast-text {
  margin-top: 2px;
  font-size: 13px;
  line-height: 18px;
  color: var(--hx-text-2);
  word-break: break-word;
}
.hx-toast-x {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: var(--hx-faint);
}
.hx-toast-x:hover {
  background: var(--hx-surface-2);
  color: var(--hx-text);
}
@keyframes hx-toast-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ===== Верхняя полоса: кнопка демо, стрелки на телефоне ===== */
.hx-screen[hidden],
.hx-player[hidden],
.hx-top-nav[hidden],
.hx-icon-btn[hidden],
.hx-pointer[hidden] {
  display: none;
}
.hx-top-nav {
  display: none;
  gap: 2px;
}
.hx-auto {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--hx-primary-soft);
  color: var(--hx-primary);
  font-weight: 500;
  white-space: nowrap;
}
.hx-auto:hover {
  background: #d6e3ff;
}
.hx-auto[aria-pressed="true"] {
  background: var(--hx-surface);
  border-color: var(--hx-border);
  color: var(--hx-text-2);
}
.hx-auto[aria-pressed="true"] .hx-ic-play,
.hx-auto[aria-pressed="false"] .hx-ic-stop {
  display: none;
}

/* ===== Экран списка звонков ===== */
.hx-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.hx-list-title {
  font-size: 22px;
  font-weight: 600;
}
.hx-list-sub {
  margin-top: 4px;
  color: var(--hx-text-2);
}
.hx-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.hx-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--hx-border-strong);
  background: var(--hx-surface);
  color: var(--hx-text-2);
  font-size: 14px;
  white-space: nowrap;
}
.hx-filter.hx-filter-on {
  color: var(--hx-text);
}
.hx-table-card {
  padding: 0;
  overflow: hidden;
}
.hx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.hx-table th {
  padding: 12px 10px;
  border-bottom: 1px solid var(--hx-border);
  font-weight: 400;
  color: var(--hx-text-2);
  text-align: left;
  white-space: nowrap;
}
.hx-table th:first-child,
.hx-table td:first-child {
  padding-left: 16px;
}
.hx-table th:last-child,
.hx-table td:last-child {
  padding-right: 16px;
}
.hx-table th .hx-sort {
  margin-left: 4px;
  color: var(--hx-primary);
}
.hx-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--hx-border);
  vertical-align: middle;
}
.hx-row {
  cursor: pointer;
  transition: background-color 120ms ease;
}
.hx-row:hover {
  background: var(--hx-bg);
}
.hx-row:focus-visible {
  outline: 2px solid var(--hx-primary);
  outline-offset: -2px;
}
.hx-row-cur {
  background: var(--hx-primary-soft);
}
.hx-row-cur:hover {
  background: var(--hx-primary-soft);
}
.hx-type-ic {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--hx-success-soft);
  color: var(--hx-success);
}
.hx-type-ic.hx-type-out {
  background: var(--hx-primary-soft);
  color: var(--hx-primary);
}
.hx-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--hx-text-2);
}
.hx-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--hx-success);
}
.hx-listmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid var(--hx-border-strong);
  background: var(--hx-surface);
  color: transparent;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.hx-listmark:hover {
  border-color: var(--hx-success);
}
.hx-listmark[aria-pressed="true"] {
  border-color: var(--hx-success);
  background: var(--hx-success);
  color: #fff;
}
.hx-n-viol {
  color: var(--hx-text-2);
}
.hx-n-viol.hx-n-red {
  color: var(--hx-error);
  font-weight: 500;
}
.hx-b24 {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--hx-warning-soft);
  color: var(--hx-warning);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.hx-deferred-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  margin-left: 8px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--hx-warning-soft);
  color: var(--hx-warning);
  font-size: 11px;
  font-weight: 500;
  vertical-align: middle;
}
.hx-list-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  color: var(--hx-text-2);
  font-size: 12px;
}

/* ===== Курсор автодемо ===== */
.hx-pointer {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 70;
  width: 0;
  height: 0;
  pointer-events: none;
  will-change: transform;
}
.hx-pointer-arrow {
  position: absolute;
  left: -2px;
  top: -1px;
  filter: drop-shadow(0 2px 4px rgba(16, 24, 40, 0.35));
  transform-origin: 2px 1px;
  transition: transform 120ms ease;
}
.hx-pointer.hx-pressed .hx-pointer-arrow {
  transform: scale(0.86);
}
.hx-pointer-ring {
  position: absolute;
  left: -16px;
  top: -16px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 2px solid var(--hx-primary);
  background: rgba(0, 102, 255, 0.18);
  opacity: 0;
  transform: scale(0.3);
}
.hx-pointer-ring.hx-ring-go {
  animation: hx-ring 420ms ease-out forwards;
}
@keyframes hx-ring {
  0% {
    opacity: 0.9;
    transform: scale(0.3);
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

/* ===== Плашка с секундомером и счётчиком ===== */
.hx-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  padding: 10px 20px;
  border-top: 1px solid var(--hx-border);
  background: var(--hx-surface);
  font-size: 13px;
  color: var(--hx-text-2);
}
.hx-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.hx-stat b {
  font-weight: 600;
  color: var(--hx-text);
}
.hx-stat-ai b {
  color: var(--hx-primary);
}
.hx-stat-note {
  margin-left: auto;
  font-size: 11px;
  color: var(--hx-faint);
}
.hx-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  border-top: 1px solid var(--hx-border);
  background: var(--hx-surface);
  font-size: 12px;
  color: var(--hx-faint);
}

/* ===== Адаптив ===== */
@media (max-width: 1023px) {
  .hx-main {
    grid-template-columns: minmax(0, 1fr);
  }
  .hx-aside {
    position: static;
    height: auto;
  }
  .hx-lines {
    max-height: 420px;
  }
}
@media (max-width: 759px) {
  .hx-window {
    height: 80vh;
    max-height: 80vh;
    min-height: 440px;
  }
  .hx-top {
    padding: 0 8px;
  }
  .hx-top-esc,
  .hx-top-count {
    display: none;
  }
  .hx-tab {
    font-size: 13px;
    padding: 0 10px;
  }
  .hx-top-open span {
    display: none;
  }
  .hx-scroll {
    padding: 12px 12px 170px;
  }
  .hx-head {
    margin-bottom: 12px;
  }
  .hx-btn-label {
    display: none;
  }
  .hx-card {
    padding: 16px;
  }
  .hx-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .hx-lines {
    max-height: 360px;
  }
  .hx-player {
    bottom: 8px;
    width: calc(100% - 16px);
    padding: 10px 12px;
  }
  .hx-nav,
  .hx-player-right,
  .hx-track,
  .hx-legend {
    display: none;
  }
  .hx-rate-cycle {
    display: inline-flex;
    align-items: center;
  }
  .hx-bar {
    display: flex;
  }
  .hx-now-line {
    display: -webkit-box;
  }
  .hx-now-line:empty {
    display: none;
  }
  .hx-player-body {
    gap: 6px;
  }
  .hx-review .hx-review-label {
    display: none;
  }
  .hx-toasts {
    right: 8px;
    top: 56px;
  }
  .hx-top-nav {
    display: inline-flex;
  }
  .hx-auto {
    padding: 0 9px;
  }
  .hx-auto span {
    display: none;
  }
  .hx-td-x {
    display: none;
  }
  .hx-table th,
  .hx-table td {
    padding: 10px 6px;
  }
  .hx-table th:first-child,
  .hx-table td:first-child {
    padding-left: 12px;
  }
  .hx-table th:last-child,
  .hx-table td:last-child {
    padding-right: 12px;
  }
  .hx-demo .hx-list-title {
    font-size: 18px;
  }
  .hx-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    margin-inline: -12px;
    padding-inline: 12px;
    scrollbar-width: none;
  }
  .hx-stats {
    padding: 10px 12px;
    gap: 6px 16px;
    font-size: 12px;
  }
  .hx-stat-note {
    margin-left: 0;
    width: 100%;
  }
  .hx-stat {
    display: block;
    white-space: normal;
  }
  .hx-stat-ai,
  .hx-stat-manual {
    width: 100%;
  }
  .hx-top {
    flex-wrap: wrap;
    height: auto;
    padding: 6px 8px;
    row-gap: 6px;
  }
  .hx-tabs {
    order: 9;
    width: 100%;
  }
  .hx-tab {
    flex: 1 1 auto;
  }
  .hx-viol-actions {
    flex-wrap: wrap;
  }
  .hx-overlay {
    padding: 16px 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hx-demo *,
  .hx-demo *::before,
  .hx-demo *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hx-toast {
    animation: none;
  }
}

/* Сайт задаёт section{padding-block:96px}; экраны демо это не должно задевать. */
.hx-demo section{padding-block:0;padding-inline:0}
