/* Rehearsal room — as delivered: stats + annotated take.
   Canvas stays grey/blue. Teal stays on Talk to KoLi only. */

:where(html:not([data-kouli-theme='light'])) body.kouli-speech-active .ted-results-coach-first {
  gap: 22px;
}

/* Same results top bar as Interview Shadow / Pitch Shadow. */
:where(html:not([data-kouli-theme='light'])) body.kouli-speech-active #ted-score-section .kouli-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  margin: 0 0 4px;
}

:where(html:not([data-kouli-theme='light'])) body.kouli-speech-active #ted-score-section .kouli-wordmark {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 0 22px rgba(255, 255, 255, 0.12);
}

:where(html:not([data-kouli-theme='light'])) body.kouli-speech-active #ted-score-section .kouli-pill {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.92);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: default;
  width: auto;
}

:where(html:not([data-kouli-theme='light'])) body.kouli-speech-active #ted-score-section .kouli-mist-button {
  min-height: 210px;
  margin: 8px 0 10px;
  padding: 44px 24px 40px;
}

:where(html:not([data-kouli-theme='light'])) .speech-as-delivered.ted-flip-card {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #f4f7f8;
}

:where(html:not([data-kouli-theme='light'])) .speech-as-delivered .ted-flip-card-front,
:where(html:not([data-kouli-theme='light'])) .speech-as-delivered .ted-flip-card-back {
  gap: 0;
}

:where(html:not([data-kouli-theme='light'])) .speech-as-delivered-kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a99ab;
}

:where(html:not([data-kouli-theme='light'])) .speech-as-delivered-title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.96);
}

:where(html:not([data-kouli-theme='light'])) .speech-as-delivered-lead {
  margin: 0 0 12px;
  color: #b8cdd8;
  font-size: 0.95rem;
  line-height: 1.45;
}

:where(html:not([data-kouli-theme='light'])) .speech-as-delivered-thinking {
  margin: 0 0 12px;
  color: #7a99ab;
  font-size: 0.85rem;
}

:where(html:not([data-kouli-theme='light'])) .speech-as-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

:where(html:not([data-kouli-theme='light'])) .speech-as-try-btn {
  appearance: none;
  align-self: flex-start;
  margin: 0 0 4px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.88);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  width: auto;
}

:where(html:not([data-kouli-theme='light'])) .speech-as-try-btn:hover,
:where(html:not([data-kouli-theme='light'])) .speech-as-try-btn:focus-visible {
  border-color: rgba(255, 255, 255, 0.32);
  outline: none;
}

:where(html:not([data-kouli-theme='light'])) .speech-as-toggle {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 12px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

:where(html:not([data-kouli-theme='light'])) .speech-as-toggle-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #7a99ab;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 7px 12px;
  cursor: pointer;
  width: auto;
}

:where(html:not([data-kouli-theme='light'])) .speech-as-toggle-btn.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.94);
}

:where(html:not([data-kouli-theme='light'])) .speech-as-stat {
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #b8cdd8;
  font-size: 0.8rem;
}

:where(html:not([data-kouli-theme='light'])) .speech-as-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

:where(html:not([data-kouli-theme='light'])) .speech-mark-key {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7a99ab;
  padding: 2px 0;
}

:where(html:not([data-kouli-theme='light'])) .speech-mark-key--hesitation::before,
:where(html:not([data-kouli-theme='light'])) .speech-mark-key--hedge::before,
:where(html:not([data-kouli-theme='light'])) .speech-mark-key--offscript::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 3px;
  margin-right: 6px;
  vertical-align: middle;
  border-radius: 2px;
}

:where(html:not([data-kouli-theme='light'])) .speech-mark-key--hesitation::before { background: #e5a000; }
:where(html:not([data-kouli-theme='light'])) .speech-mark-key--hedge::before { background: rgba(224, 160, 80, 0.85); }
:where(html:not([data-kouli-theme='light'])) .speech-mark-key--offscript::before { background: #7a99ab; }

:where(html:not([data-kouli-theme='light'])) .speech-as-transcript {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.86);
  white-space: pre-wrap;
}

:where(html:not([data-kouli-theme='light'])) .speech-as-transcript--script {
  color: rgba(184, 205, 216, 0.92);
}

:where(html:not([data-kouli-theme='light'])) .speech-mark {
  border-radius: 3px;
  cursor: help;
  padding: 0 1px;
}

:where(html:not([data-kouli-theme='light'])) .speech-mark--hesitation {
  background: rgba(229, 160, 0, 0.22);
  border-bottom: 1px solid rgba(229, 160, 0, 0.7);
}

:where(html:not([data-kouli-theme='light'])) .speech-mark--hedge {
  background: rgba(224, 160, 80, 0.16);
  border-bottom: 1px solid rgba(224, 160, 80, 0.55);
}

:where(html:not([data-kouli-theme='light'])) .speech-mark--offscript {
  background: rgba(122, 153, 171, 0.18);
  border-bottom: 1px solid rgba(184, 205, 216, 0.55);
}

:where(html:not([data-kouli-theme='light'])) .speech-as-tip {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #b8cdd8;
  font-size: 0.86rem;
  line-height: 1.45;
}

/* Same Talk to KoLi control as Interview Shadow and Pitch Shadow. */
:where(html:not([data-kouli-theme='light'])) .kouli-mist-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 148px;
  margin: 4px 0 0;
  padding: 28px 16px 24px;
  border: 0;
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(0, 196, 160, 0.10), transparent 62%),
    rgba(255, 255, 255, 0.02);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

:where(html:not([data-kouli-theme='light'])) .kouli-mist-button:focus-visible {
  outline: 3px solid rgba(0, 196, 160, 0.85);
  outline-offset: 4px;
}

:where(html:not([data-kouli-theme='light'])) .kouli-mist-button:hover .kouli-mist-label {
  border-color: rgba(0, 229, 192, 0.72);
  background: rgba(0, 196, 160, 0.16);
}

:where(html:not([data-kouli-theme='light'])) .kouli-mist-button:active .kouli-mist-label {
  transform: scale(0.98);
}

:where(html:not([data-kouli-theme='light'])) .kouli-mist-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: min(94%, 26rem);
  pointer-events: none;
}

:where(html:not([data-kouli-theme='light'])) .kouli-mist-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border: 1px solid rgba(0, 229, 192, 0.55);
  border-radius: 999px;
  background: rgba(0, 196, 160, 0.12);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.98);
  text-shadow: 0 0 18px rgba(0, 229, 192, 0.35);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
  box-shadow:
    0 0 0 1px rgba(0, 196, 160, 0.12),
    0 10px 28px rgba(0, 0, 0, 0.35),
    0 0 36px rgba(0, 196, 160, 0.18);
  white-space: nowrap;
}

:where(html:not([data-kouli-theme='light'])) .kouli-mist-sub {
  margin: 0;
  max-width: 18.5rem;
  font-size: 0.86rem;
  line-height: 1.45;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: center;
  color: #7A99AB;
}
