:root {
  --bg: #edf1f6;
  --bg-deep: #dfe6ef;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-strong: rgba(248, 250, 253, 0.96);
  --line: rgba(18, 38, 63, 0.1);
  --line-strong: rgba(18, 38, 63, 0.18);
  --text: #152235;
  --muted: #5f6f85;
  --accent: #0e6ba8;
  --accent-strong: #0a5484;
  --accent-soft: rgba(14, 107, 168, 0.1);
  --success: #177d57;
  --warm: #d98e04;
  --shadow: 0 28px 80px rgba(31, 51, 73, 0.14);
  --shadow-soft: 0 18px 40px rgba(31, 51, 73, 0.08);
  --radius: 26px;
  --radius-sm: 18px;
  --font-display: "Cambria", "Times New Roman", serif;
  --font-ui: "Segoe UI", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(14, 107, 168, 0.16), transparent 26%),
    radial-gradient(circle at 100% 10%, rgba(23, 125, 87, 0.12), transparent 20%),
    linear-gradient(180deg, #f6f8fb 0%, var(--bg) 52%, var(--bg-deep) 100%);
}

body.help-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.88), transparent);
}

.page-shell {
  width: min(1280px, calc(100vw - 32px));
  margin: 22px auto 40px;
  display: grid;
  gap: 20px;
}

.topbar,
.hero-panel,
.panel,
.chat-panel,
.kpi-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
}

.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(252, 253, 255, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 12px;
  z-index: 20;
}

.app-nav-btn {
  min-width: 136px;
  padding: 12px 16px;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  border: 1px solid transparent;
}

.app-nav-btn:hover {
  background: rgba(14, 107, 168, 0.08);
}

.app-nav-btn.active {
  color: #f7fbff;
  background: linear-gradient(135deg, var(--accent) 0%, #0d81c9 100%);
  box-shadow: 0 12px 22px rgba(14, 107, 168, 0.2);
}

.app-view-section {
  animation: sectionFade 180ms ease;
}

.brand-mark {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-subtitle,
.panel-copy,
.hero-copy p,
.hero-point span,
.roadmap-item span,
.kpi-card small,
.doc-list-head span {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.topbar-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(14, 107, 168, 0.1);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow.muted {
  background: rgba(21, 34, 53, 0.06);
  color: var(--muted);
}

.hero-panel {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 22px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.hero-panel.compact {
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  padding: 22px 24px;
}

.hero-copy h1 {
  margin: 16px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4.9rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.hero-copy p {
  max-width: 60ch;
  font-size: 1.04rem;
}

.hero-panel.compact .hero-copy h1 {
  margin: 10px 0 10px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

.hero-panel.compact .hero-copy p {
  max-width: 54ch;
  font-size: 0.98rem;
}

.hero-points {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.hero-panel.compact .hero-points {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.hero-point {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(18, 38, 63, 0.08);
}

.hero-panel.compact .hero-point {
  padding: 12px 14px;
  border-radius: 16px;
}

.hero-point strong,
.metric-tile strong,
.kpi-card strong,
.doc-item strong,
.message-role {
  display: block;
}

.hero-point strong {
  margin-bottom: 6px;
  font-size: 1rem;
}

.avatar-stage {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 18px;
  min-height: 460px;
  padding: 22px;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.85), transparent 24%),
    linear-gradient(145deg, rgba(224, 236, 247, 0.96), rgba(198, 217, 232, 0.84));
}

.hero-panel.compact .avatar-stage {
  min-height: 340px;
  padding: 18px;
}

.avatar-stage::after {
  content: "";
  position: absolute;
  inset: auto -40px -100px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 107, 168, 0.16), transparent 70%);
}

.avatar {
  position: relative;
  justify-self: center;
  width: 280px;
  height: 320px;
  animation: floaty 4.8s ease-in-out infinite;
}

.hero-panel.compact .avatar {
  width: 220px;
  height: 250px;
}

.hero-panel.compact .halo {
  top: 10px;
  width: 170px;
  height: 170px;
}

.hero-panel.compact .head {
  top: 30px;
  width: 136px;
  height: 152px;
}

.hero-panel.compact .face {
  inset: 20px 12px 0;
}

.hero-panel.compact .body {
  top: 138px;
  width: 168px;
  height: 110px;
}

.hero-panel.compact .hair-front {
  left: 10px;
  width: 116px;
  height: 64px;
}

.hero-panel.compact .brow {
  top: 44px;
  width: 22px;
  height: 5px;
}

.hero-panel.compact .brow-left {
  left: 30px;
}

.hero-panel.compact .brow-right {
  right: 30px;
}

.hero-panel.compact .eye {
  top: 58px;
  width: 18px;
  height: 14px;
}

.hero-panel.compact .eye-left {
  left: 31px;
}

.hero-panel.compact .eye-right {
  right: 31px;
}

.hero-panel.compact .blush {
  top: 82px;
  width: 18px;
  height: 10px;
}

.hero-panel.compact .blush-left {
  left: 22px;
}

.hero-panel.compact .blush-right {
  right: 22px;
}

.hero-panel.compact .nose {
  top: 70px;
  width: 8px;
  height: 14px;
}

.hero-panel.compact .mouth-wrap {
  bottom: 18px;
  width: 28px;
  height: 18px;
}

.hero-panel.compact .mouth {
  width: 22px;
  height: 8px;
}

.hero-panel.compact .coach-card {
  gap: 12px;
}

.hero-panel.compact .status-card,
.hero-panel.compact .metric-tile {
  padding: 12px 14px;
}

.halo {
  position: absolute;
  top: 20px;
  left: 50%;
  width: 220px;
  height: 220px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.18) 58%, transparent 74%);
  filter: blur(2px);
}

.head {
  position: absolute;
  z-index: 3;
  top: 42px;
  left: 50%;
  width: 168px;
  height: 188px;
  transform: translateX(-50%);
}

.face {
  position: absolute;
  inset: 24px 16px 0;
  border-radius: 46% 46% 42% 42% / 42% 42% 56% 56%;
  background: linear-gradient(180deg, #f9e9cc 0%, #efd3af 100%);
  box-shadow: inset 0 -8px 18px rgba(145, 95, 54, 0.12);
}

.hair {
  position: absolute;
  background: linear-gradient(180deg, #34425f 0%, #212d45 100%);
}

.hair-back {
  inset: 4px 4px 26px;
  border-radius: 50% 50% 36% 36%;
}

.hair-front {
  top: 0;
  left: 12px;
  width: 144px;
  height: 86px;
  border-radius: 48% 52% 34% 56%;
  clip-path: polygon(0 0, 100% 0, 100% 56%, 76% 34%, 60% 58%, 40% 32%, 18% 62%, 0 48%);
}

.brow,
.eye,
.blush,
.nose,
.mouth-wrap {
  position: absolute;
}

.brow {
  top: 58px;
  width: 28px;
  height: 6px;
  border-radius: 999px;
  background: #5a4335;
}

.brow-left {
  left: 38px;
  transform: rotate(-8deg);
}

.brow-right {
  right: 38px;
  transform: rotate(8deg);
}

.eye {
  top: 76px;
  width: 22px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #15181d 0 38%, #fff 40% 100%);
  animation: blink 6s infinite;
  transform-origin: center 60%;
}

.eye-left {
  left: 40px;
}

.eye-right {
  right: 40px;
}

.blush {
  top: 110px;
  width: 24px;
  height: 14px;
  border-radius: 50%;
  background: rgba(220, 129, 122, 0.25);
}

.blush-left {
  left: 28px;
}

.blush-right {
  right: 28px;
}

.nose {
  top: 96px;
  left: 50%;
  width: 10px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 50%;
  border-right: 2px solid rgba(140, 92, 52, 0.5);
}

.mouth-wrap {
  left: 50%;
  bottom: 24px;
  width: 38px;
  height: 26px;
  transform: translateX(-50%);
}

.mouth {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 28px;
  height: 10px;
  transform: translateX(-50%);
  border-radius: 0 0 18px 18px;
  background: #8a4450;
}

.body {
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 220px;
  height: 148px;
  transform: translateX(-50%);
}

.neck {
  position: absolute;
  top: 0;
  left: 50%;
  width: 28px;
  height: 36px;
  transform: translateX(-50%);
  border-radius: 18px;
  background: #edc79f;
  z-index: 2;
}

.torso {
  position: absolute;
  inset: 18px 20px 0;
  border-radius: 46% 46% 22% 22%;
  background: linear-gradient(180deg, #325d79 0%, #1f425d 100%);
  box-shadow: inset 0 10px 18px rgba(255, 255, 255, 0.12);
}

.cape {
  position: absolute;
  inset: 12px 0 0;
  border-radius: 50% 50% 24% 24%;
  background: linear-gradient(180deg, #91a4b5 0%, #607286 100%);
}

.avatar.speaking .mouth {
  animation: talk 0.32s ease-in-out infinite alternate;
}

.avatar.listening .eye {
  transform: scaleY(1.2);
}

.coach-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
}

.status-card,
.metric-tile,
.kpi-card,
.roadmap-item,
.doc-item,
.message,
.scorecard-item {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(18, 38, 63, 0.08);
}

.status-card {
  padding: 16px 18px;
  border-radius: 20px;
}

.status-label,
.message-role,
.metric-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.status-text {
  margin-top: 6px;
  font-weight: 800;
  font-size: 1rem;
}

.coach-metrics {
  display: grid;
  gap: 12px;
}

.metric-tile {
  padding: 14px 16px;
  border-radius: 18px;
}

.metric-label {
  display: block;
  margin-bottom: 6px;
}

.kpi-strip,
.workspace-grid,
.insight-grid {
  display: grid;
  gap: 20px;
}

.kpi-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kpi-card {
  padding: 18px 20px;
}

.kpi-card span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.kpi-card strong {
  margin: 12px 0 6px;
  font-size: 1.8rem;
}

.workspace-grid {
  grid-template-columns: 1.05fr 0.95fr;
}

.panel,
.chat-panel {
  padding: 22px;
}

.panel-head,
.action-row,
.checkbox-row,
.doc-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel h2 {
  margin: 0;
  font-size: 1.08rem;
}

label {
  display: block;
  margin: 14px 0 8px;
  font-weight: 700;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.toggle-stack {
  display: grid;
  gap: 4px;
  margin-top: 10px;
}

input[type="text"],
select,
textarea {
  width: 100%;
  border: 1px solid rgba(21, 34, 53, 0.12);
  border-radius: 18px;
  padding: 14px 16px;
  font: inherit;
  color: var(--text);
  background: rgba(252, 253, 255, 0.94);
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 90px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(14, 107, 168, 0.45);
  box-shadow: 0 0 0 4px rgba(14, 107, 168, 0.12);
}

button,
.upload-box {
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

button {
  border: 0;
  border-radius: 18px;
  padding: 14px 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  color: #f7fbff;
  background: linear-gradient(135deg, var(--accent) 0%, #0d81c9 100%);
  box-shadow: 0 14px 28px rgba(14, 107, 168, 0.24);
}

button:hover,
.upload-box:hover {
  transform: translateY(-1px);
}

button.secondary {
  background: linear-gradient(135deg, var(--success) 0%, #239364 100%);
  box-shadow: 0 14px 28px rgba(23, 125, 87, 0.2);
}

button.ghost {
  background: rgba(21, 34, 53, 0.08);
  color: var(--text);
  box-shadow: none;
}

button.small {
  padding: 10px 14px;
  font-size: 0.9rem;
}

.topbar-help-btn {
  border: 1px solid rgba(18, 38, 63, 0.12);
}

.synthetic-file-state {
  display: block;
  line-height: 1.5;
  word-break: break-word;
}

.synthetic-output {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.synthetic-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.synthetic-download {
  width: fit-content;
  text-decoration: underline;
  color: var(--accent);
  cursor: pointer;
}

.synthetic-download.disabled {
  pointer-events: none;
  opacity: 0.45;
  text-decoration: none;
}

.catalog-item {
  width: 100%;
  text-align: left;
  box-shadow: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(18, 38, 63, 0.08);
}

.catalog-item.selected {
  outline: 2px solid rgba(14, 107, 168, 0.22);
  background: rgba(14, 107, 168, 0.08);
}

.checkbox-row {
  justify-content: flex-start;
  margin-top: 8px;
}

.checkbox-row input {
  width: auto;
}

.checkbox-row span {
  flex: 1;
  font-weight: 500;
}

.range-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.upload-box {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 132px;
  margin-top: 10px;
  border: 2px dashed rgba(14, 107, 168, 0.22);
  border-radius: 22px;
  background: rgba(14, 107, 168, 0.06);
  color: var(--accent-strong);
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}

.upload-box small {
  color: var(--muted);
  font-weight: 600;
}

.upload-box input {
  display: none;
}

.pill {
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  background: rgba(14, 107, 168, 0.1);
  color: var(--accent);
}

.doc-list-head {
  margin-top: 18px;
  font-size: 0.92rem;
}

.doc-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  max-height: 240px;
  overflow: auto;
}

.doc-item {
  padding: 14px 16px;
  border-radius: 16px;
}

.doc-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.doc-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.5;
}

.doc-delete-btn {
  flex-shrink: 0;
}

#settingsState {
  min-width: 180px;
  text-align: right;
}

.insight-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.insight-panel {
  min-height: 100%;
}

.scorecard-list,
.roadmap-list,
.call-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.scorecard-item,
.roadmap-item,
.call-item {
  padding: 14px 16px;
  border-radius: 18px;
}

.scorecard-item strong,
.roadmap-item strong,
.call-item strong {
  display: block;
  margin-bottom: 6px;
}

.scorecard-item span {
  display: block;
  color: var(--muted);
  line-height: 1.55;
}

.call-item {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(18, 38, 63, 0.08);
}

.call-item p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.call-item > span {
  display: block;
  color: var(--muted);
  line-height: 1.5;
}

.call-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.call-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.call-audio-controls,
.call-file-output {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.call-file-output {
  margin-top: 10px;
}

.call-progress {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(18, 38, 63, 0.04);
  border: 1px solid rgba(18, 38, 63, 0.08);
}

.call-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.call-progress-head strong,
.call-progress-head span {
  margin: 0;
  font-size: 0.88rem;
}

.call-progress-track {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(18, 38, 63, 0.08);
}

.call-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0e6ba8 0%, #177d57 100%);
}

.call-progress-track.active span {
  animation: progressSweep 1.4s ease-in-out infinite;
}

.call-progress-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pipeline-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(18, 38, 63, 0.06);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.pipeline-step.done {
  background: rgba(23, 125, 87, 0.12);
  color: #155e44;
}

.pipeline-step.active {
  background: rgba(14, 107, 168, 0.12);
  color: #0e6ba8;
  animation: pipelinePulse 1.2s ease-in-out infinite;
}

.pipeline-step.failed {
  background: rgba(185, 28, 28, 0.12);
  color: #991b1b;
}

.hidden-audio {
  display: none;
}

.hidden {
  display: none !important;
}

@keyframes sectionFade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.call-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(14, 107, 168, 0.08);
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 700;
}

.transcript-preview {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(14, 107, 168, 0.05);
  border: 1px solid rgba(14, 107, 168, 0.08);
}

.transcript-preview strong {
  display: block;
  margin-bottom: 6px;
}

.transcript-preview p {
  margin: 0;
}

.analysis-preview {
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(23, 125, 87, 0.05);
  border: 1px solid rgba(23, 125, 87, 0.1);
}

.analysis-overall-score {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(23, 125, 87, 0.08);
}

.analysis-overall-score span {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.analysis-overall-score strong {
  margin: 0;
  font-size: 1.25rem;
}

.compact-overall-score {
  margin-top: 10px;
  margin-bottom: 10px;
}

.compact-overall-score strong {
  font-size: 1.05rem;
}

@keyframes pipelinePulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(14, 107, 168, 0.18);
    opacity: 0.82;
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 0 0 6px rgba(14, 107, 168, 0.06);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(14, 107, 168, 0);
    opacity: 0.82;
  }
}

@keyframes progressSweep {
  0% {
    filter: brightness(0.94);
    transform: translateX(0);
  }
  50% {
    filter: brightness(1.08);
    transform: translateX(1.5%);
  }
  100% {
    filter: brightness(0.94);
    transform: translateX(0);
  }
}

.expectation-preview {
  background: rgba(217, 142, 4, 0.06);
  border-color: rgba(217, 142, 4, 0.16);
}

.comparison-preview {
  background: rgba(14, 107, 168, 0.05);
  border-color: rgba(14, 107, 168, 0.14);
}

.salesperson-card p {
  margin: 10px 0 0;
}

.compact-score-grid {
  margin-top: 10px;
}

.analysis-preview > strong,
.analysis-columns strong,
.analysis-preview div > strong {
  display: block;
  margin-bottom: 6px;
}

.analysis-preview p,
.analysis-preview ul {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.analysis-preview ul {
  padding-left: 18px;
}

.analysis-score-grid,
.analysis-columns {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.analysis-score-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analysis-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chat-panel {
  padding-top: 18px;
}

.live-status {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  margin-top: 18px;
  border-radius: 16px;
  border: 1px solid rgba(18, 38, 63, 0.08);
  background: rgba(255, 255, 255, 0.84);
}

.live-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(95, 111, 133, 0.7);
  box-shadow: 0 0 0 0 rgba(95, 111, 133, 0.28);
}

.live-status-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.live-status strong {
  font-size: 0.96rem;
}

.live-status-listening .live-status-dot {
  background: var(--accent);
  animation: pulseDot 1.2s ease-in-out infinite;
}

.live-status-speaking .live-status-dot {
  background: var(--success);
  animation: pulseDot 1s ease-in-out infinite;
}

.live-status-idle .live-status-dot {
  background: rgba(95, 111, 133, 0.7);
}

.chat-messages {
  display: grid;
  gap: 14px;
  max-height: 500px;
  overflow: auto;
  padding-right: 6px;
  margin-top: 18px;
}

.message {
  padding: 14px 16px;
  border-radius: 22px;
}

.message.user {
  background: rgba(14, 107, 168, 0.08);
}

.message.assistant {
  background: rgba(23, 125, 87, 0.08);
}

.message-role {
  margin-bottom: 6px;
}

.message-body {
  white-space: pre-wrap;
  line-height: 1.65;
}

.message-sources {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-top: 18px;
}

.chat-session-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.help-modal.hidden {
  display: none;
}

.help-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.help-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 27, 41, 0.42);
  backdrop-filter: blur(6px);
}

.help-dialog {
  position: relative;
  width: min(860px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  margin: 14px auto;
  padding: 22px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(252, 253, 255, 0.97);
  box-shadow: var(--shadow);
}

.config-dialog {
  width: min(940px, calc(100vw - 28px));
}

.help-content {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.help-block {
  padding: 16px 18px;
  border: 1px solid rgba(18, 38, 63, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.help-block strong {
  display: block;
  margin-bottom: 6px;
}

.help-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

@keyframes blink {
  0%, 46%, 52%, 100% {
    transform: scaleY(1);
  }
  48%, 50% {
    transform: scaleY(0.12);
  }
}

@keyframes talk {
  from {
    height: 10px;
    width: 28px;
  }
  to {
    height: 18px;
    width: 24px;
  }
}

@keyframes floaty {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulseDot {
  0% {
    box-shadow: 0 0 0 0 rgba(14, 107, 168, 0.24);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(14, 107, 168, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(14, 107, 168, 0);
  }
}

@media (max-width: 1080px) {
  .hero-panel,
  .workspace-grid,
  .insight-grid,
  .kpi-strip,
  .composer,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .app-nav,
  .panel-head,
  .doc-list-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-panel.compact .hero-points {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .page-shell {
    width: min(100vw - 18px, 1280px);
    margin: 10px auto 24px;
  }

  .hero-copy h1 {
    font-size: clamp(2.2rem, 12vw, 3.4rem);
  }

  .avatar-stage {
    min-height: auto;
  }

  .avatar {
    width: 240px;
    height: 290px;
  }
}
