/* Interview stages and waiting screens use design/PALETTE.md colour roles. */
.interview-progress { margin: 0 0 28px; padding: 18px 30px; border: 1px solid #dce3eb; border-radius: 14px; background: var(--card-background); box-shadow: 0 4px 18px #111f3808; }
.interview-progress-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 10px; }
.interview-progress-context { min-width: 0; }
.coach-page .interview-progress-role { margin: 0 0 4px; color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.5; letter-spacing: .07em; text-transform: uppercase; overflow-wrap: anywhere; }
.interview-progress-count { color: var(--ink); font-weight: 650; font-size: 14px; }
.interview-progress-status { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; padding: 5px 10px; border-radius: 999px; background: var(--step-background); color: var(--navy); font-size: 12px; font-weight: 600; line-height: 1.4; }
.interview-progress-status::before { content: ""; width: 5px; height: 5px; flex: none; border-radius: 50%; background: var(--blue); }
.interview-progress-track { height: 6px; background: var(--step-background); border-radius: 999px; overflow: hidden; }
.interview-progress-fill { height: 100%; background: var(--blue); border-radius: 999px; transition: width .25s ease; }
.interview-flow { max-width: 820px; margin: auto; padding: 44px 24px 64px; }
.coach-page .interview-flow-role { color: var(--muted); font-size: 14px; margin-bottom: 24px; overflow-wrap: anywhere; }
.interview-wait-symbol { width: 68px; height: 68px; display: grid; place-items: center; background: var(--step-background); color: var(--navy); border-radius: 18px; font-size: 30px; }
.interview-wait-status { color: var(--muted); font-size: 13px; line-height: 1.5; }
.interview-spinner { width: 18px; height: 18px; flex: none; border: 2px solid #d9e0eb; border-top-color: var(--blue); border-radius: 50%; animation: interview-spin .8s linear infinite; }
.has-error .interview-spinner { display: none; }
.interview-wait-note { max-width: 480px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.interview-wait-recovery { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; }
.interview-wait-recovery .coach-secondary { padding: 10px 12px; text-decoration: none; }
.interview-submit-status { color: var(--muted); font-size: 14px; line-height: 1.5; }
@keyframes interview-spin { to { transform: rotate(360deg); } }
@media (max-width: 580px) {
  .interview-flow { padding: 28px 16px 48px; }
  .interview-progress { padding: 16px 20px; }
  .interview-progress-top { align-items: center; }
  .interview-progress-status { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .interview-spinner { animation: none; } .interview-progress-fill { transition: none; } }

.coach-wait-page .coach-primary { width: auto; min-height: 48px; padding: 12px 18px; border: 1px solid var(--navy); border-radius: 8px; background: var(--navy); color: var(--background); font: inherit; font-size: 15px; font-weight: 600; line-height: 1.5; }
.coach-wait-page .coach-primary:hover { background: var(--navy-light); }
.coach-wait-page .coach-primary:disabled { opacity: .5; cursor: default; }
.coach-wait-page .coach-secondary { background: var(--card-background); color: var(--navy); border: 1px solid #d5dce5; border-radius: 8px; font-size: 14px; line-height: 1.5; }
.coach-wait-page :is(button, a):focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.analysis-flow {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  padding: clamp(28px, 6vw, 72px) 18px 48px;
}
.analysis-panel {
  max-width: 660px;
  margin-inline: auto;
  padding: 30px clamp(18px, 4vw, 36px);
  border: 1px solid #dce3eb;
  border-radius: 18px;
  background: var(--card-background);
  box-shadow: 0 12px 36px #111f380a;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}
.coach-page .analysis-panel h1 { color: var(--ink); font-size: clamp(24px, 4vw, 32px); font-weight: 600; letter-spacing: -.04em; line-height: 1.2; }
.interview-wait-copy { max-width: 400px; color: var(--muted); font-size: 14px; line-height: 1.55; }

.analysis-art { width: 60px; height: 60px; border-radius: 14px; display: flex; align-items: flex-end; justify-content: center; gap: 5px; padding: 16px; background: var(--navy); }
.analysis-art span { width: 6px; height: 12px; border-radius: 2px 2px 0 0; background: var(--background); }
.analysis-art span:nth-child(2) { height: 20px; }
.analysis-art span:nth-child(3) { height: 28px; }
.coach-page .analysis-eyebrow { margin-top: 4px; color: var(--blue); font-size: 11px; font-weight: 600; letter-spacing: 1.7px; line-height: 1.5; text-transform: uppercase; }
.analysis-panel .interview-spinner { border-top-color: var(--navy); }

.analysis-stages { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; margin: 4px 0 0; padding: 0; }
.analysis-stage { display: flex; align-items: center; gap: 6px; padding: 6px 8px; color: var(--muted); font-size: 12px; }
.analysis-stage.is-current { border-radius: 8px; background: var(--step-background); color: var(--navy); font-weight: 600; }
.analysis-stage-dot { display: grid; place-items: center; width: 16px; height: 16px; border: 2px solid #cbd1da; border-radius: 50%; font-size: 11px; flex: none; }
.analysis-stage.is-complete .analysis-stage-dot { border-color: transparent; background: #eaf4ee; color: #216447; }
.analysis-stage.is-current .analysis-stage-dot { border-color: #cbd5e3; border-top-color: var(--navy); animation: interview-spin .8s linear infinite; }
.analysis-panel:has(.has-error) .analysis-stage.is-current .analysis-stage-dot { animation: none; }
.analysis-progress { width: min(100%, 380px); display: grid; gap: 9px; justify-items: center; }
.analysis-progress progress { appearance: none; width: 100%; height: 5px; border: 0; border-radius: 99px; background: var(--step-background); }
.analysis-progress progress::-webkit-progress-bar { background: var(--step-background); border-radius: 99px; }
.analysis-progress progress::-webkit-progress-value { background: var(--navy); border-radius: 99px; }
.analysis-progress progress::-moz-progress-bar { background: var(--navy); border-radius: 99px; }
@media (max-width: 560px) {
  .analysis-stages { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .analysis-stage.is-current .analysis-stage-dot { animation: none; }
}

.preparation-modal { width: min(700px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 18px; background: var(--card-background); color: var(--ink); overscroll-behavior: contain; }
.preparation-modal::backdrop { background: #111f388c; backdrop-filter: blur(3px); }
.preparation-modal .analysis-flow { padding: 0; }
.preparation-modal .analysis-panel { max-width: none; width: 100%; margin: 0; }
.preparation-modal .analysis-panel h1 { margin: 0; }
body:has(.preparation-modal[open]) { overflow: hidden; }
