/* Аудио и транскрипция доступны отдельно от демонстрации заранее подготовленного анализа. */
.speech-note { font-size: 12px; line-height: 1.7; color: var(--color-text-secondary); }
.speech-conversation[hidden] { display: none; }
.speech-conversation > h3 { font-size: 22px; line-height: 1.4; color: var(--color-text); margin: 26px 0 12px; }
.speech-case-intro p { font-size: 15px; line-height: 1.75; }
.speech-player { padding: 14px 18px; border: 1px solid var(--color-line-teal); border-radius: 12px; background: white; display: grid; gap: 8px; margin: 20px 0; }
.speech-player label { font-size: 13px; font-weight: 650; color: var(--color-teal); }
.speech-player audio { width: 100%; min-width: 0; height: 40px; display: block; }
.speech-player > a { color: var(--color-teal); font-size: 12px; width: fit-content; }
.speech-transcript-details, .speech-detailed-results details, .speech-route { padding: 16px; border: 1px solid var(--color-line); border-radius: 10px; background: white; margin: 12px 0; }
.speech-demo summary { cursor: pointer; color: var(--color-teal); font-size: 14px; line-height: 1.6; font-weight: 650; }
.speech-demo details[open] > summary { margin-bottom: 18px; }
.speech-transcript-scroll { max-height: min(430px, 45vh); overflow-y: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; padding-right: 8px; }
.speech-utterance { margin: 0 0 12px; padding: 12px; border-radius: 8px; background: #f4f8fa; font-size: 13px; line-height: 1.75; color: var(--color-text-secondary); scroll-margin-top: 90px; }
.speech-utterance > span { display: block; font-size: 11px; font-weight: 700; color: var(--color-text); margin-bottom: 5px; }
.speech-utterance mark { color: inherit; background: transparent; padding: 1px 2px; border-radius: 3px; transition: background .3s ease; }
.speech-utterance.is-keyed mark { background: #d4eee7; color: #006f66; }
/* Целевая цитата выделяется целиком; повторный переход не зависит от :target. */
.speech-utterance.is-evidence-target, .speech-demo:not(.is-enhanced) .speech-utterance:target { background: #eaf7f3; box-shadow: inset 3px 0 0 var(--color-teal); outline: 1px solid #9ccfc2; outline-offset: -1px; }
.speech-utterance-number { display: inline-block; min-width: 22px; margin-right: 7px; color: #8b999f; font-size: 10px; font-weight: 400; font-variant-numeric: tabular-nums; }
.speech-analysis-tools { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--color-line); }
.speech-analysis-tools .capability-controls, .speech-route-controls { padding-bottom: 0; border-bottom: 0; gap: 8px; }
.speech-analysis-tools button, .speech-route-controls button { padding: 10px 12px; font-size: 12px; }
.speech-demo [data-analysis-start], .speech-demo [data-route-start] { background: var(--color-teal); color: white; border-color: var(--color-teal); }
.speech-analysis-status { font-size: 12px; color: var(--color-text-secondary); line-height: 1.7; min-height: 64px; margin: 12px 0 0; }
.speech-workbench { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin: 20px 0; }
.speech-panel { position: relative; padding: 20px; border: 1px solid var(--color-line-teal); border-radius: 12px; background: white; min-width: 0; }
.speech-panel h4, .speech-detailed-results h4 { margin: 0 0 18px; font-size: 14px; color: var(--color-teal); }
.speech-result { background: #f5fafc; border-color: #c5dbea; }
.speech-result-grid { display: grid; gap: 22px; }
.speech-facts { margin: 0; }
.speech-facts > div { padding: 10px 0; border-bottom: 1px solid var(--color-line); }
.speech-facts dt, .speech-small-label { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--color-teal); font-weight: 700; }
.speech-facts dd { margin: 5px 0 0; font-size: 13px; line-height: 1.65; color: var(--color-text); }
.speech-summary, .speech-task, .speech-missing, .speech-coach { font-size: 13px; line-height: 1.75; color: var(--color-text-secondary); margin: 12px 0; }
.speech-task { font-weight: 650; color: var(--color-text); }
.speech-missing { font-size: 12px; }
.speech-review-badge { display: inline-block; font-size: 10px; padding: 5px 8px; color: #665a89; background: #eee9f7; border-radius: 5px; }
.speech-evidence-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.speech-evidence { display: inline-block; font-size: 12px; color: var(--color-teal); padding: 5px 0; }
.speech-demo.is-enhanced [data-revealed=false] { opacity: 0; visibility: hidden; }
.speech-demo.is-enhanced [data-revealed=true] { opacity: 1; visibility: visible; }
.speech-demo [data-zone] { transition: opacity .3s ease; }
.speech-demo.is-enhanced:not(.is-extracted) .speech-analysis::after { content: 'После запуска демонстрации ключевые фразы станут фактами и договорённостями.'; }
.speech-demo.is-enhanced .speech-result:has([data-revealed=false])::after { content: 'После анализа появятся проект действия, рекомендация и ссылки на исходные реплики.'; }
.speech-panel::after { position: absolute; top: 66px; left: 20px; right: 20px; font-size: 13px; line-height: 1.7; color: var(--color-text-secondary); }
.speech-table-wrap { overflow-x: auto; margin: 16px 0; }
.speech-table-wrap table { border-collapse: collapse; width: 100%; font-size: 13px; line-height: 1.6; }
.speech-table-wrap th, .speech-table-wrap td { border-bottom: 1px solid var(--color-line); text-align: left; vertical-align: top; padding: 10px 12px; min-width: 100px; }
.speech-table-wrap th { color: var(--color-teal); background: #f1f8f7; font-weight: 650; }
.speech-detailed-results { margin: 28px 0; }
.speech-detailed-results .process-prose p, .speech-detailed-results .process-prose li { font-size: 14px; line-height: 1.8; }
.speech-demo .capability-status { min-height: 135px; height: 135px; overflow-y: auto; }
.speech-graph { padding: 24px 24px; margin: 8px -12px; }
.speech-graph .capability-graph__nodes { grid-template-columns: repeat(3,minmax(0,1fr)); grid-template-rows: repeat(4,minmax(96px,auto)); gap: 72px 30px; }
.speech-graph .capability-node { padding: 12px; }
.speech-graph .capability-node.is-current { padding: 11px; }
.speech-graph .capability-node[data-node=audio] { grid-area: 1 / 1; }
.speech-graph .capability-node[data-node=prepare] { grid-area: 1 / 2; }
.speech-graph .capability-node[data-node=stt] { grid-area: 1 / 3; }
.speech-graph .capability-node[data-node=transcript] { grid-area: 2 / 1; }
.speech-graph .capability-node[data-node=semantic] { grid-area: 2 / 2; }
.speech-graph .capability-node[data-node=sales-draft] { grid-area: 3 / 1; }
.speech-graph .capability-node[data-node=support-draft] { grid-area: 3 / 2; }
.speech-graph .capability-node[data-node=meeting-draft] { grid-area: 3 / 3; }
.speech-graph .capability-node[data-node=validate] { grid-area: 4 / 1; }
.speech-graph .capability-node[data-node=history] { grid-area: 4 / 2; }
.speech-graph .capability-node[data-node=delivery] { grid-area: 4 / 3; }
@media (max-width: 760px) {
  .speech-workbench { grid-template-columns: minmax(0,1fr); }
  .speech-panel, .speech-player { padding: 16px; }
  .speech-graph { margin: 0; padding: 24px 32px 24px 12px; }
  .speech-graph .capability-graph__nodes { grid-template-columns: minmax(0,1fr); grid-template-rows: none; gap: 32px; }
  .speech-graph .capability-node[data-node] { grid-area: auto; min-height: 90px; padding: 14px; }
  .speech-graph .capability-node.is-current { padding: 13px; }
  .speech-demo .capability-status { min-height: 205px; height: 205px; }
  .speech-route { padding: 12px 6px; }
  .speech-route > summary, .speech-route > p { margin-left: 6px; margin-right: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .speech-demo [data-zone], .speech-utterance mark { transition: none !important; }
}

/* Поле сохраняет высоту, пока реплики демонстрации появляются последовательно. */
.speech-demo.is-enhanced .speech-transcript-scroll { height: min(430px, 45vh); }
.speech-utterance[hidden], .speech-transcript-empty[hidden], .speech-graph .capability-node[hidden] { display: none; }
.speech-transcript-empty { font-size: 13px; line-height: 1.75; color: var(--color-text-secondary); margin: 12px; }
.speech-route-controls { margin-bottom: 16px; }
/* Единственный выбранный маршрут идёт змейкой без пересечений и чужих веток. */
@media (min-width: 761px) {
  .speech-demo.is-enhanced .speech-graph .capability-graph__nodes { grid-template-rows: repeat(3,minmax(96px,auto)); }
  .speech-demo.is-enhanced .capability-node[data-node=transcript] { grid-area: 2 / 3; }
  .speech-demo.is-enhanced .capability-node[data-node=semantic] { grid-area: 2 / 2; }
  .speech-demo.is-enhanced .capability-node[data-node$="-draft"] { grid-area: 2 / 1; }
  .speech-demo.is-enhanced .capability-node[data-node=validate] { grid-area: 3 / 1; }
  .speech-demo.is-enhanced .capability-node[data-node=history] { grid-area: 3 / 2; }
  .speech-demo.is-enhanced .capability-node[data-node=delivery] { grid-area: 3 / 3; }
}
