:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #667085;
  --soft: #f4f6f8;
  --paper: #ffffff;
  --line: #d7dde5;
  --line-strong: #b9c2ce;
  --accent: #116a5c;
  --accent-strong: #0a4f44;
  --accent-soft: #e4f4ef;
  --blue: #244b7a;
  --blue-soft: #e8eef7;
  --amber: #946200;
  --amber-soft: #fff4d8;
  --warn: #b42318;
  --warn-soft: #fee4e2;
  --shadow: 0 18px 44px rgba(23, 32, 51, 0.08);
}


* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #eef2f6 0%, #f8fafc 42%, #ffffff 100%);
}

a {
  color: var(--accent);
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 20px;
}

.hero h1 {
  max-width: 840px;
  margin: 0;
  font-size: 2rem;
  line-height: 1.14;
  font-weight: 760;
  letter-spacing: 0;
}

.hero p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.card {
  margin-bottom: 18px;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.meta,
.summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.pill,
.summary-item {
  min-width: 0;
  padding: 12px 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.meta strong,
.pill strong,
.summary-item strong {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  padding: 11px 16px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: white;
  font: inherit;
  font-weight: 720;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
button:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.button.secondary,
button.secondary {
  background: white;
  color: var(--ink);
  border-color: var(--line-strong);
}

.button.secondary:hover,
button.secondary:hover {
  background: var(--soft);
  border-color: var(--muted);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button-row,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

.error,
.success {
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.error {
  background: var(--warn-soft);
  border: 1px solid #fda29b;
  color: var(--warn);
}

.success {
  background: var(--accent-soft);
  border: 1px solid #9fd7c8;
  color: var(--accent-strong);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

textarea,
input[type="text"],
input[type="number"],
input[type="date"],
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 12px 13px;
  background: white;
  color: var(--ink);
  font: inherit;
  line-height: 1.45;
}

textarea:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus {
  outline: 3px solid rgba(17, 106, 92, 0.18);
  border-color: var(--accent);
}

textarea {
  min-height: 220px;
  resize: vertical;
}

.progress {
  height: 12px;
  overflow: hidden;
  background: #dde5ee;
  border-radius: 999px;
}

.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--blue) 100%);
}

.progress-caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.muted {
  color: var(--muted);
}

.list-clean {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

code {
  overflow-wrap: anywhere;
  background: #eef3f8;
  padding: 2px 6px;
  border-radius: 6px;
}

.interview-hero {
  align-items: flex-start;
  padding: 18px 0 4px;
}

.interview-hero h1 {
  font-size: 2.15rem;
}

.interview-card {
  padding: 0;
  overflow: hidden;
}

.interview-card__body {
  padding: 24px;
}

.interview-card__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid var(--line);
}

.start-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 22px;
  align-items: start;
}

.start-note {
  padding: 16px;
  background: var(--blue-soft);
  border: 1px solid #c9d8ec;
  border-radius: 8px;
  color: var(--blue);
  line-height: 1.5;
}

.question-header {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.question-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.question-title {
  margin: 0;
  max-width: 900px;
  font-size: 1.55rem;
  line-height: 1.3;
  font-weight: 760;
}

.required-badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid #f3d48b;
  font-size: 0.82rem;
  font-weight: 720;
}

.status-badge--success {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: #9fd7c8;
}

.answer-form {
  display: grid;
  gap: 14px;
}

.voice-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.voice-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.voice-status,
.voice-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.45;
}

.voice-status.active {
  color: var(--accent-strong);
  font-weight: 720;
}

.choice-list {
  display: grid;
  gap: 10px;
}

.choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.choice input {
  margin-top: 3px;
}

.completion-panel {
  display: grid;
  gap: 16px;
}

.completion-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 24px, 1120px);
    padding-top: 18px;
  }

  .hero,
  .interview-hero,
  .start-panel {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero h1,
  .interview-hero h1 {
    font-size: 1.55rem;
  }

  .card,
  .interview-card__body,
  .interview-card__footer {
    padding: 16px;
  }

  .question-title {
    font-size: 1.25rem;
  }

  .button-row,
  .form-actions,
  .interview-card__footer {
    align-items: stretch;
  }

  .button-row > *,
  .form-actions > *,
  .button-row form,
  .form-actions form,
  button {
    width: 100%;
  }
}

.mq-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 20px;
  align-items: end;
  margin: 18px 0 18px;
}

.mq-hero h1 {
  max-width: 840px;
  margin: 0;
  font-size: 2.05rem;
  line-height: 1.14;
  font-weight: 760;
  letter-spacing: 0;
}

.mq-hero p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.mq-eyebrow,
.mq-label {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mq-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mq-meta-grid > div {
  min-width: 0;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.mq-meta-grid strong {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mq-progress-caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.mq-progress {
  height: 10px;
  overflow: hidden;
  margin-bottom: 18px;
  background: #dde5ee;
  border-radius: 999px;
}

.mq-progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--blue) 100%);
}

.mq-card {
  margin-bottom: 18px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #d7dde5;
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(23, 32, 51, 0.07);
}

.mq-card-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 24px 28px 0;
}

.mq-block-title {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.mq-progress-label {
  flex: 0 0 auto;
  padding-top: 2px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.mq-card-content {
  padding: 18px 28px 28px;
}

.mq-question-title {
  max-width: 900px;
  margin: 0;
  font-size: 1.62rem;
  line-height: 1.28;
  font-weight: 760;
  letter-spacing: 0;
}

.mq-description {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.mq-recorder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  margin-top: 24px;
  padding: 24px;
  background: rgba(248, 250, 252, 0.72);
  border: 1px solid #d7dde5;
  border-radius: 16px;
}

.mq-recorder-state {
  display: grid;
  justify-items: center;
  gap: 16px;
  width: min(100%, 620px);
  text-align: center;
}

.mq-recorder-status {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 720;
}

.mq-recorder-status strong {
  font-variant-numeric: tabular-nums;
}

.mq-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
}

.mq-status-dot--danger {
  background: #d92d20;
  box-shadow: 0 0 0 6px rgba(217, 45, 32, 0.1);
}

.mq-status-dot--success {
  background: var(--accent);
}

.mq-status-dot--error {
  background: var(--warn);
}

.mq-duration-limit {
  color: var(--muted);
  font-weight: 600;
}

.mq-mic-button {
  width: 92px;
  height: 92px;
  min-height: 92px;
  padding: 0;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 12px 28px rgba(17, 106, 92, 0.18);
}

.mq-mic-button svg {
  width: 34px;
  height: 34px;
}

.mq-helper,
.mq-footer-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.mq-state-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 760;
}

.mq-waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 60px;
}

.mq-waveform span {
  display: block;
  width: 5px;
  height: 18px;
  border-radius: 999px;
  background: #d92d20;
  animation: mq-wave 980ms ease-in-out infinite;
}

.mq-waveform span:nth-child(3n) {
  height: 34px;
}

.mq-waveform span:nth-child(4n) {
  height: 46px;
}

.mq-playback {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 440px);
  padding: 12px 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mq-playback svg {
  flex: 0 0 auto;
  color: var(--accent-strong);
}

.mq-playback audio {
  width: 100%;
  min-width: 0;
}

.mq-spinner {
  width: 34px;
  height: 34px;
  color: var(--accent);
  animation: mq-spin 900ms linear infinite;
}

.mq-success-icon,
.mq-error-icon {
  width: 38px;
  height: 38px;
}

.mq-success-icon {
  color: var(--accent);
}

.mq-error-icon {
  color: var(--warn);
}

.mq-error-message {
  max-width: 620px;
  margin: 0;
  color: var(--warn);
  line-height: 1.45;
}

.mq-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 28px;
  background: #f8fafc;
  border-top: 1px solid var(--line);
}

.mq-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.mq-button {
  gap: 8px;
  min-height: 44px;
  border-radius: 8px;
}

.mq-button svg {
  width: 18px;
  height: 18px;
}

.mq-button--danger {
  color: white;
  background: #b42318;
  border-color: #b42318;
}

.mq-button--danger:hover {
  background: #912018;
  border-color: #912018;
}

.mq-button--ghost {
  color: var(--ink);
  background: transparent;
  border-color: transparent;
}

.mq-button--ghost:hover {
  background: #eef3f8;
  border-color: #eef3f8;
}

.mq-text-fallback {
  display: grid;
  gap: 8px;
  width: min(100%, 620px);
  text-align: left;
}

.mq-text-fallback span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 720;
}

.mq-text-fallback textarea {
  min-height: 150px;
}

.mq-structured-input {
  width: 100%;
  margin: 0 0 16px;
}

input.mq-structured-input,
select.mq-structured-input {
  width: 100%;
}

.mq-choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.mq-choice input {
  margin-top: 3px;
}

@keyframes mq-wave {
  0%,
  100% {
    transform: scaleY(0.42);
    opacity: 0.58;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

@keyframes mq-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes mq-text-fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  .mq-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .mq-hero h1 {
    font-size: 1.45rem;
  }

  .mq-meta-grid {
    grid-template-columns: 1fr;
  }

  .mq-card-header,
  .mq-card-footer {
    padding-right: 16px;
    padding-left: 16px;
  }

  .mq-card-header,
  .mq-card-footer,
  .mq-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .mq-card-content {
    padding: 16px;
  }

  .mq-question-title {
    font-size: 1.28rem;
  }

  .mq-recorder {
    padding: 18px 14px;
  }

  .mq-button,
  .mq-actions button {
    width: 100%;
  }
}

/* Reference-inspired interview screen */
body {
  background:
    radial-gradient(circle at 50% 4%, rgba(99, 87, 231, 0.08), transparent 34%),
    linear-gradient(180deg, #f6f8fc 0%, #eef3f9 100%);
}

.shell {
  width: min(1180px, calc(100% - 64px));
  padding: 18px 0 32px;
}

.mq-screen {
  min-height: calc(100vh - 66px);
  display: grid;
  align-items: start;
}

.mq-screen form {
  min-width: 0;
}

.mq-card {
  margin: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.91)),
    radial-gradient(circle at 48% 54%, rgba(101, 82, 230, 0.05), transparent 46%);
  border: 1px solid #dbe2ee;
  border-radius: 22px;
  box-shadow: 0 18px 48px rgba(31, 41, 55, 0.10);
}

.mq-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 34px 0;
}

.mq-label {
  margin: 0;
  color: #6557e7;
  font-size: 0.9rem;
  font-weight: 820;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mq-card-progress {
  display: grid;
  grid-template-columns: max-content 214px max-content;
  gap: 20px;
  align-items: center;
  color: #111827;
  font-size: 1rem;
  font-weight: 540;
  white-space: nowrap;
}

.mq-card-progress-track {
  height: 6px;
  overflow: hidden;
  background: #e4e7f1;
  border-radius: 999px;
}

.mq-card-progress-track > span {
  display: block;
  height: 100%;
  min-width: 12px;
  background: linear-gradient(90deg, #5f4be2 0%, #7b61f0 100%);
  border-radius: inherit;
}

.mq-card-progress strong {
  font-size: 1rem;
  font-weight: 620;
}

.mq-card-content {
  padding: 24px 34px 20px;
}

.mq-question-title {
  max-width: 1020px;
  margin: 0;
  color: #111827;
  font-size: 1.48rem;
  line-height: 1.45;
  font-weight: 820;
  letter-spacing: 0;
}

.mq-description {
  max-width: 890px;
  margin: 22px 0 0;
  color: #66748e;
  font-size: 1.12rem;
  line-height: 1.55;
  font-weight: 450;
}

.mq-recorder {
  display: block;
  min-height: 176px;
  margin-top: 24px;
  padding: 16px 38px;
  background:
    radial-gradient(circle at 50% 50%, rgba(101, 82, 230, 0.075), transparent 42%),
    rgba(255, 255, 255, 0.58);
  border: 1px solid #dcdcf7;
  border-radius: 18px;
}

.mq-recorder-layout {
  min-height: 144px;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 178px minmax(190px, 1fr);
  gap: 20px;
  align-items: center;
}

.mq-recorder-side {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.mq-recorder-status {
  justify-content: flex-start;
  gap: 10px;
  color: #111827;
  font-size: 1rem;
  font-weight: 760;
}

.mq-status-dot {
  width: 11px;
  height: 11px;
  background: #31bc68;
}

.mq-status-dot--danger {
  background: #e5483d;
  box-shadow: 0 0 0 7px rgba(229, 72, 61, 0.12);
}

.mq-duration-limit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #66748e;
  font-size: 0.92rem;
  font-weight: 500;
}

.mq-duration-limit svg {
  width: 20px;
  height: 20px;
  color: #71819b;
}

.mq-mic-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 178px;
  height: 178px;
  justify-self: center;
  grid-column: 2;
}

.mq-mic-button {
  position: relative;
  z-index: 1;
  width: 132px;
  height: 132px;
  min-height: 132px;
  padding: 0;
  color: #ffffff;
  background: linear-gradient(145deg, #725af0 0%, #5f4be2 100%);
  border: 0;
  border-radius: 999px;
  box-shadow:
    0 18px 34px rgba(95, 75, 226, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.mq-mic-button:hover {
  background: linear-gradient(145deg, #8069f4 0%, #5b45dd 100%);
  border: 0;
}

.mq-mic-button svg {
  width: 54px;
  height: 54px;
  stroke-width: 2.1;
}

.mq-recorder-tip {
  display: grid;
  gap: 12px;
  justify-self: end;
  max-width: 300px;
  color: #5f6f88;
  font-size: 1.02rem;
  line-height: 1.5;
}

.mq-recorder-tip p {
  margin: 0;
}

.mq-tip-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #6557e7;
}

.mq-tip-title svg {
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 0 8px rgba(101, 82, 230, 0.32));
}

.mq-tip-title strong {
  font-size: 1.08rem;
  font-weight: 780;
}

.mq-recorder-state--active {
  min-height: 204px;
  justify-content: center;
}

.mq-waveform span {
  background: #6557e7;
}

.mq-playback {
  width: min(100%, 520px);
  border-color: #dcdcf7;
}

.mq-button {
  border-radius: 10px;
}

.mq-button--primary {
  background: #6557e7;
  border-color: #6557e7;
}

.mq-button--primary:hover {
  background: #5747cf;
  border-color: #5747cf;
}

.mq-mic-button.mq-button,
.mq-mic-button.mq-button--primary,
.mq-mic-button.mq-button--primary:hover,
.mq-mic-button.mq-button--primary:focus,
.mq-mic-button.mq-button--primary:active {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 104px;
  height: 104px;
  min-width: 104px;
  min-height: 104px;
  max-width: 104px;
  max-height: 104px;
  padding: 0;
  color: #6557e7;
  background:
    radial-gradient(circle at 50% 48%, rgba(101, 82, 230, 0.08), transparent 62%),
    rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(101, 82, 230, 0.26);
  border-radius: 999px;
  box-shadow:
    0 12px 28px rgba(95, 75, 226, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.mq-mic-button.mq-button svg {
  width: 42px;
  height: 42px;
  stroke-width: 2.1;
}

.mq-mic-button--recording.mq-button,
.mq-mic-button--recording.mq-button--primary,
.mq-mic-button--recording.mq-button--primary:hover,
.mq-mic-button--recording.mq-button--primary:focus,
.mq-mic-button--recording.mq-button--primary:active {
  color: #ffffff;
  background: linear-gradient(145deg, #725af0 0%, #5f4be2 100%);
  border-color: transparent;
  box-shadow:
    0 18px 34px rgba(95, 75, 226, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.mq-mic-ring > .mq-recording-wave {
  position: absolute;
  inset: 38px;
  border: 1px solid rgba(101, 82, 230, 0.42);
  border-radius: 999px;
  opacity: var(--wave-opacity, 0);
  transform: scale(var(--wave-scale, 1));
  transition: opacity 90ms linear, transform 90ms linear;
  will-change: opacity, transform;
}

.mq-mic-ring > .mq-recording-wave:nth-of-type(2) {
  inset: 24px;
}

.mq-mic-ring > .mq-recording-wave:nth-of-type(3) {
  inset: 10px;
}

.mq-text-transition {
  display: grid;
  gap: 12px;
  animation: mq-text-fade 180ms ease both;
}

.mq-recording-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.mq-recording-strip--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mq-recording-strip audio {
  width: 100%;
  min-width: 0;
}

.mq-recording-delete {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  color: #6b7280;
  background: transparent;
  border: 0;
  border-radius: 999px;
}

.mq-recording-delete:hover {
  color: #b42318;
  background: #fee4e2;
  border: 0;
}

.mq-recording-delete svg {
  width: 20px;
  height: 20px;
}

.mq-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 34px;
  padding: 18px 0 22px;
  background: transparent;
  border-top: 1px solid #e1e6ee;
}

.mq-footer-note {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: #66748e;
  font-size: 0.98rem;
  line-height: 1.4;
}

.mq-footer-note svg {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  color: #71819b;
}

.mq-actions:empty {
  display: none;
}

@media (max-width: 900px) {
  .shell {
    width: min(100% - 28px, 1180px);
    padding-top: 14px;
  }

  .mq-card-header {
    display: grid;
    grid-template-columns: 1fr;
    padding: 28px 22px 0;
  }

  .mq-card-progress {
    grid-template-columns: max-content minmax(80px, 1fr) max-content;
    gap: 12px;
  }

  .mq-card-content {
    padding: 24px 22px 28px;
  }

  .mq-question-title {
    font-size: 1.32rem;
    line-height: 1.45;
  }

  .mq-description {
    font-size: 1rem;
  }

  .mq-recorder {
    padding: 20px;
  }

  .mq-recorder-layout {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 18px;
  }

  .mq-recorder-side,
  .mq-recorder-tip {
    justify-self: center;
    justify-items: center;
    text-align: center;
  }

  .mq-mic-ring {
    width: 196px;
    height: 196px;
  }

  .mq-mic-button {
    width: 118px;
    height: 118px;
    min-height: 118px;
  }

  .mq-mic-button.mq-button,
  .mq-mic-button.mq-button--primary,
  .mq-mic-button.mq-button--primary:hover,
  .mq-mic-button.mq-button--primary:focus,
  .mq-mic-button.mq-button--primary:active {
    width: 118px;
    height: 118px;
    min-width: 118px;
    min-height: 118px;
    max-width: 118px;
    max-height: 118px;
  }

  .mq-card-footer {
    display: grid;
    grid-template-columns: 1fr;
    margin: 0 22px;
  }

  .mq-actions {
    justify-content: stretch;
  }

  .mq-recording-delete {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
  }
}

/* MainQuestionCard v2 */
body {
  background:
    radial-gradient(circle at 50% 0%, rgba(92, 77, 230, 0.06), transparent 34%),
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.shell {
  width: min(1180px, calc(100% - 56px));
  padding: 14px 0;
}

.mq-screen {
  min-height: calc(100vh - 28px);
  display: grid;
}

.mq-screen form {
  min-width: 0;
}

.mq-card {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 28px);
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.mq-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 22px;
  min-height: 82px;
  padding: 8px 0 18px;
  border-bottom: 0;
}

.mq-topbar-main {
  display: flex;
  align-items: center;
  gap: 26px;
  min-width: 0;
}

.mq-topbar-icon,
.mq-question-number {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #5b4ff0;
  background: #f1f0ff;
  border-radius: 13px;
}

.mq-topbar-icon {
  width: 46px;
  height: 46px;
}

.mq-topbar-icon svg {
  width: 22px;
  height: 22px;
}

.mq-topbar-copy {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.mq-topbar-copy p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #74829a;
  font-size: 0.95rem;
  font-weight: 760;
}

.mq-topbar-copy strong {
  color: #111827;
}

.mq-progress-segments {
  display: grid;
  grid-template-columns: repeat(var(--progress-count, 12), minmax(24px, 84px));
  grid-auto-flow: column;
  gap: 4px;
  max-width: 720px;
}

.mq-progress-segments span {
  height: 4px;
  background: #dfe4ef;
  border-radius: 999px;
}

.mq-progress-segments .mq-progress-segment--active {
  background: linear-gradient(90deg, #6354f1, #4f46e5);
  box-shadow: 0 0 0 1px rgba(99, 84, 241, 0.08);
}

.mq-card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 22px;
  min-height: 0;
  padding: 0;
}

.mq-conversation {
  display: grid;
  gap: 22px;
}

.mq-message {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.mq-message-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #554cff;
  background: #f1f0ff;
  border: 1px solid #e4e0ff;
  border-radius: 999px;
}

.mq-message-avatar svg {
  width: 20px;
  height: 20px;
}

.mq-message-avatar--user {
  color: #ffffff;
  background: #4f46e5;
  border-color: #4f46e5;
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.18);
}

.mq-message-card {
  min-width: 0;
}

.mq-message-heading {
  margin-bottom: 10px;
}

.mq-message-heading p,
.mq-answer-title {
  margin: 0;
  color: #70809a;
  font-size: 0.86rem;
  font-weight: 820;
}

.mq-question-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px 24px;
  padding: 26px 26px 26px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #dbe3f0;
  border-radius: 16px;
}

.mq-answer-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #e1e7f0;
  border-radius: 16px;
  box-shadow: 0 16px 42px rgba(39, 52, 74, 0.045);
}

.mq-answer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.mq-answer-header > div:first-child {
  min-width: 0;
}

.mq-answer-header span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.45;
}

.mq-question-number {
  width: 42px;
  height: 42px;
  align-self: start;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 860;
}

.mq-question-copy {
  grid-column: 1 / -1;
  min-width: 0;
}

.mq-label {
  margin: 3px 0 9px;
  color: #70809a;
  font-size: 0.98rem;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: none;
}

.mq-question-title {
  max-width: 940px;
  margin: 0;
  color: #090d1a;
  font-size: 1.42rem;
  line-height: 1.48;
  font-weight: 860;
  letter-spacing: 0;
}

.mq-hint {
  grid-column: 1 / -1;
  padding-top: 22px;
  border-top: 1px solid #dfe5ef;
}

.mq-hint-title {
  margin: 0 0 14px;
  color: #1f2937;
  font-size: 0.82rem;
  font-weight: 820;
}

.mq-hint-text {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #52627c;
  font-size: 0.98rem;
  line-height: 1.45;
}

.mq-hint-text svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: #554cff;
}

.mq-recorder-status {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  gap: 9px;
  margin-top: 3px;
  color: #71809a;
  font-size: 0.82rem;
  font-weight: 760;
}

.mq-recorder-status strong {
  color: #27344a;
  font-variant-numeric: tabular-nums;
}

.mq-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #31c77a;
}

.mq-status-dot--recording {
  background: #ef4444;
  box-shadow: 0 0 0 7px rgba(239, 68, 68, 0.11);
}

.mq-status-dot--success {
  background: #31c77a;
}

.mq-status-dot--error {
  background: #e5484d;
}

.mq-recorder {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(280px, 380px) minmax(180px, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 70px;
  margin: 0;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #e4e9f2;
  border-radius: 17px;
  box-shadow: 0 16px 42px rgba(39, 52, 74, 0.055);
}

.mq-recorder-limit,
.mq-text-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #71809a;
  font-size: 0.84rem;
  font-weight: 820;
}

.mq-recorder-limit svg,
.mq-text-button svg {
  width: 18px;
  height: 18px;
}

.mq-recorder-center {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 62px 1fr;
  align-items: center;
  justify-items: center;
  gap: 24px;
  min-height: 78px;
}

.mq-waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  height: 24px;
  overflow: hidden;
}

.mq-waveform span {
  display: block;
  width: 3px;
  height: 4px;
  border-radius: 999px;
  background: #d9e2f0;
  animation: none;
}

.mq-waveform span:nth-child(3n) {
  height: 8px;
}

.mq-waveform span:nth-child(4n) {
  height: 12px;
}

.mq-waveform--active span {
  background: #7065f2;
  animation: mq-wave 900ms ease-in-out infinite;
}

.mq-mic-button {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  min-width: 62px;
  min-height: 62px;
  padding: 0;
  color: #ffffff;
  background: linear-gradient(145deg, #6f63f2 0%, #4f46e5 100%);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 15px 30px rgba(79, 70, 229, 0.32);
  transform: translateY(-3px);
}

.mq-mic-button:hover {
  background: linear-gradient(145deg, #7b70f5 0%, #5145df 100%);
  border: 0;
}

.mq-mic-button:disabled,
.mq-text-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.mq-mic-button svg {
  width: 29px;
  height: 29px;
  stroke-width: 2.2;
}

.mq-mic-button--recording {
  background: linear-gradient(145deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 15px 30px rgba(220, 38, 38, 0.28);
}

.mq-text-button {
  justify-self: end;
  min-height: 35px;
  padding: 0 13px;
  background: #ffffff;
  border: 1px solid #e1e7f0;
  border-radius: 9px;
}

.mq-text-button:hover {
  color: #4f46e5;
  background: #f8f7ff;
  border-color: #cfd5ff;
}

.mq-text-button:focus-visible,
.mq-secondary-action:focus-visible,
.mq-primary-action:focus-visible,
.mq-icon-action:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.18);
  outline-offset: 2px;
}

.mq-text-button[aria-expanded="true"],
.mq-secondary-action[aria-expanded="true"] {
  color: #4f46e5;
  background: #f5f3ff;
  border-color: #ddd6fe;
}

.mq-recording-strip,
.mq-state-panel,
.mq-answer-panel {
  margin-top: 0;
}

.mq-recording-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e4e9f2;
  border-radius: 14px;
  animation: mq-panel-enter 220ms ease both;
}

.mq-recording-strip audio {
  width: 100%;
  min-width: 0;
}

.mq-recording-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mq-icon-action,
.mq-primary-action,
.mq-secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  font-weight: 780;
}

.mq-icon-action {
  width: 40px;
  padding: 0;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.mq-icon-action:hover {
  color: #b42318;
  background: #fff1f0;
  border-color: #ffd5d2;
}

.mq-primary-action {
  color: #ffffff;
  background: #4f46e5;
  border: 1px solid #4f46e5;
}

.mq-primary-action:hover {
  color: #ffffff;
  background: #4338ca;
  border-color: #4338ca;
}

.mq-secondary-action {
  color: #4f46e5;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
}

.mq-secondary-action:hover {
  color: #4338ca;
  background: #ede9fe;
  border-color: #c4b5fd;
}

.mq-secondary-action:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.mq-icon-action svg,
.mq-primary-action svg,
.mq-secondary-action svg {
  width: 18px;
  height: 18px;
}

.mq-state-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  color: #52627c;
  background: #ffffff;
  border: 1px solid #e4e9f2;
  border-radius: 14px;
  animation: mq-panel-enter 220ms ease both;
}

.mq-state-panel > svg {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: #4f46e5;
}

.mq-state-panel p,
.mq-state-panel span {
  margin: 0;
}

.mq-state-panel p {
  color: #111827;
  font-weight: 820;
}

.mq-state-panel span {
  display: block;
  margin-top: 3px;
}

.mq-state-panel--error > svg {
  color: #e5484d;
}

.mq-spinner {
  animation: mq-spin 900ms linear infinite;
}

.mq-answer-panel {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    grid-template-rows 240ms ease,
    opacity 180ms ease,
    transform 240ms ease,
    visibility 240ms ease;
}

.mq-answer-panel--open {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mq-answer-panel-inner {
  min-height: 0;
  overflow: hidden;
  padding: 0 16px;
  background: #ffffff;
  border: 1px solid transparent;
  border-radius: 14px;
  transition:
    padding 240ms ease,
    border-color 240ms ease,
    box-shadow 240ms ease;
}

.mq-answer-panel--open .mq-answer-panel-inner {
  padding: 16px;
  border-color: #e4e9f2;
  box-shadow: 0 14px 32px rgba(39, 52, 74, 0.045);
}

.mq-answer-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.mq-answer-panel-heading h3,
.mq-answer-panel-heading p {
  margin: 0;
}

.mq-answer-panel-heading h3 {
  color: #111827;
  font-size: 0.98rem;
  font-weight: 840;
}

.mq-answer-panel-heading p {
  margin-top: 4px;
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.45;
}

.mq-answer-textarea {
  width: 100%;
  min-height: 130px;
  resize: vertical;
}

.mq-card-footer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: auto 0 0;
  padding: 0;
  color: #71809a;
  background: transparent;
  border: 0;
  font-size: 0.82rem;
  font-weight: 650;
}

.mq-card-footer svg {
  width: 17px;
  height: 17px;
}

@media (max-width: 900px) {
  .shell {
    width: min(100% - 24px, 1180px);
  }

  .mq-card {
    min-height: auto;
  }

  .mq-topbar,
  .mq-topbar-main,
  .mq-recorder,
  .mq-recording-strip {
    grid-template-columns: 1fr;
  }

  .mq-topbar,
  .mq-topbar-main {
    align-items: flex-start;
  }

  .mq-topbar {
    display: grid;
    padding: 22px;
  }

  .mq-progress-segments {
    grid-template-columns: repeat(6, minmax(28px, 1fr));
    max-width: none;
  }

  .mq-card-body {
    gap: 24px;
    padding: 0;
  }

  .mq-conversation {
    gap: 18px;
  }

  .mq-message {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
  }

  .mq-message-avatar {
    width: 34px;
    height: 34px;
  }

  .mq-message-avatar svg {
    width: 17px;
    height: 17px;
  }

  .mq-answer-card {
    padding: 16px;
  }

  .mq-answer-header {
    display: grid;
    gap: 10px;
  }

  .mq-question-panel {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .mq-question-title {
    font-size: 1.18rem;
  }

  .mq-recorder {
    gap: 10px;
    padding: 16px;
  }

  .mq-recorder-limit,
  .mq-text-button {
    justify-self: center;
  }

  .mq-recorder-center {
    grid-template-columns: 1fr 62px 1fr;
    width: 100%;
  }

  .mq-recording-actions {
    justify-content: stretch;
  }

  .mq-primary-action {
    flex: 1 1 auto;
  }
}

@keyframes mq-panel-enter {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Alternating interview cards */
body {
  background: #f6f7fb;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  padding: 12px 0 28px;
}

.mq-card {
  min-height: auto;
}

.mq-topbar {
  min-height: 82px;
  padding: 8px 0 18px;
}

.mq-card-body {
  gap: 18px;
}

.mq-flow {
  display: grid;
  gap: 18px;
  align-items: start;
}

.mq-flow-pair {
  display: contents;
}

.mq-flow-card {
  min-width: 0;
  background: #ffffff;
  border: 1px solid #e3e8f1;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(28, 39, 64, 0.06);
  animation: mq-card-enter 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
  transform-origin: top center;
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms ease,
    opacity 220ms ease;
  will-change: transform, opacity;
}

.mq-flow-card--history {
  animation-duration: 460ms;
}

.mq-flow-card--clarification {
  animation-name: mq-clarification-enter;
  animation-duration: 820ms;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  scroll-margin-top: 72px;
}

.mq-flow-card--active-clarification {
  animation-delay: 0ms;
}

.mq-flow-card--question {
  padding: 28px 34px 30px;
}

.mq-question-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.mq-question-context {
  margin: 0 0 10px;
  color: #64748b;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.35;
}

.mq-question-card-top p,
.mq-question-card-top span,
.mq-readonly-answer-top p {
  margin: 0;
  font-weight: 740;
  letter-spacing: 0;
}

.mq-question-card-top p {
  color: #3f36e8;
  font-size: 0.95rem;
}

.mq-question-card-top span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #33415f;
  font-size: 0.92rem;
}

.mq-question-card-top svg {
  width: 18px;
  height: 18px;
  color: #53627d;
}

.mq-flow-card--question .mq-question-title {
  max-width: 980px;
  margin: 0;
  color: #090d18;
  font-size: clamp(1.12rem, 1.35vw, 1.36rem);
  line-height: 1.5;
  font-weight: 620;
  letter-spacing: 0;
}

.mq-question-hint {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 14px;
  margin-top: 22px;
  padding-top: 20px;
  color: #59657f;
  border-top: 1px solid #e2e7ef;
}

.mq-question-hint svg {
  width: 21px;
  height: 21px;
  color: #4f46e5;
}

.mq-question-hint p {
  margin: 0;
  white-space: pre-line;
  font-size: 0.96rem;
  line-height: 1.58;
}

.mq-question-hint-note {
  margin-top: 10px !important;
  color: #64748b;
}

.mq-flow-card--answer {
  padding: 24px 28px 24px;
}

.mq-flow-card--active {
  display: grid;
  gap: 14px;
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms ease,
    gap 220ms ease;
}

.mq-answer-card--recording {
  border-color: #c7c7ff;
  box-shadow:
    0 18px 42px rgba(28, 39, 64, 0.07),
    0 0 0 4px rgba(79, 70, 229, 0.06);
}

.mq-answer-card--busy {
  border-color: #cfd7e6;
  background: #fbfcff;
}

.mq-answer-card--error {
  border-color: #fecaca;
  box-shadow:
    0 18px 42px rgba(28, 39, 64, 0.06),
    0 0 0 4px rgba(239, 68, 68, 0.07);
}

.mq-answer-card--busy .mq-answer-textarea {
  background: #fbfcff;
}

.mq-flow-card--readonly {
  display: grid;
  gap: 8px;
}

.mq-readonly-answer-top p,
.mq-answer-title {
  color: #0f172a;
  font-size: 0.92rem;
}

.mq-readonly-answer-text {
  margin: 0;
  color: #334155;
  font-size: 0.96rem;
  line-height: 1.56;
  white-space: pre-line;
}

.mq-answer-text-block {
  display: grid;
  gap: 6px;
  transition: grid-template-rows 280ms ease, gap 220ms ease;
}

.mq-answer-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  transition: transform 220ms ease, opacity 220ms ease;
}

.mq-answer-card-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.mq-answer-card-actions .mq-secondary-action {
  min-height: 42px;
  border-radius: 8px;
  font-size: 0.92rem;
}

.mq-improve-button {
  min-width: 152px;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease,
    transform 180ms ease;
}

.mq-improve-button--ready {
  color: #4f46e5;
  background: #ffffff;
  border-color: #bfc2ff;
  box-shadow: none;
}

.mq-improve-button--ready:hover {
  color: #4338ca;
  background: #f8f7ff;
  border-color: #a9afff;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.08);
  transform: translateY(-1px);
}

.mq-improve-button--empty:disabled {
  color: #8a96aa;
  background: #f8fafc;
  border-color: #dbe3ee;
  box-shadow: none;
  opacity: 1;
}

.mq-improve-button--recording:disabled {
  color: #b91c1c;
  background: #fff5f5;
  border-color: #fecaca;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
  opacity: 1;
}

.mq-improve-button--loading:disabled {
  opacity: 1;
}

.mq-answer-card-head .mq-answer-title {
  color: #0f172a;
  font-size: 0.98rem;
  line-height: 1.35;
  font-weight: 740;
}

.mq-dictate-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  width: 146px;
  min-height: 42px;
  padding: 0 14px;
  overflow: hidden;
  color: #4f46e5;
  background: #ffffff;
  border: 1px solid #bfc2ff;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 740;
  white-space: nowrap;
  transition:
    width 260ms cubic-bezier(0.16, 1, 0.3, 1),
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.mq-dictate-button:hover:not(:disabled) {
  color: #4338ca;
  background: #f8f7ff;
  border-color: #a9afff;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.08);
  transform: translateY(-1px);
}

.mq-dictate-button--recording {
  width: 230px;
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff5f5;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
}

.mq-dictate-button--recording:hover:not(:disabled),
.mq-dictate-button--recording:focus-visible {
  color: #991b1b;
  background: #fff1f1;
  border-color: #fca5a5;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
  transform: translateY(-1px);
}

.mq-dictate-button svg {
  width: 18px;
  height: 18px;
}

.mq-dictate-wave {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  width: 38px;
  height: 24px;
  flex: 0 0 auto;
}

.mq-dictate-wave span {
  display: block;
  width: 3px;
  height: var(--wave-height, 5px);
  border-radius: 999px;
  background: currentColor;
  opacity: 0.82;
  transform-origin: center bottom;
  animation: mq-dictate-wave-pulse var(--wave-duration, 820ms) ease-in-out infinite;
  animation-delay: var(--wave-delay, 0ms);
  transition: height 90ms ease-out, opacity 120ms ease-out;
}

@keyframes mq-dictate-wave-pulse {
  0%,
  100% {
    height: max(5px, calc(var(--wave-height, 8px) * 0.55));
    opacity: 0.64;
  }
  45% {
    height: var(--wave-height, 16px);
    opacity: 1;
  }
}

.mq-answer-editor {
  display: grid;
  gap: 6px;
  transition: opacity 220ms ease, transform 220ms ease;
}

.mq-answer-textarea {
  width: 100%;
  min-height: 170px;
  padding: 14px;
  color: #111827;
  background: #ffffff;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  resize: vertical;
  font-size: 0.95rem;
  line-height: 1.55;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.mq-answer-textarea:focus {
  border-color: #b8bcff;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
}

.mq-answer-textarea::placeholder {
  color: #98a3b8;
}

.mq-answer-limit {
  justify-self: start;
  color: #52627c;
  font-size: 0.84rem;
  font-weight: 650;
  transition: color 180ms ease, opacity 180ms ease;
}

.mq-state-slot {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-6px);
  transition:
    grid-template-rows 420ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 260ms ease,
    transform 420ms cubic-bezier(0.16, 1, 0.3, 1),
    margin-top 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.mq-state-slot--open {
  grid-template-rows: 1fr;
  margin-top: 8px;
  opacity: 1;
  transform: translateY(0);
}

.mq-state-slot-inner {
  min-height: 0;
  overflow: hidden;
}

.mq-structured-input {
  width: 100%;
  margin: 0;
}

select.mq-structured-input,
input.mq-structured-input {
  min-height: 42px;
}

.mq-choice {
  border-radius: 8px;
}

.mq-answer-meta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: #66758f;
  font-size: 0.88rem;
}

.mq-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 0;
}

.mq-submit-row .mq-primary-action {
  min-height: 42px;
  min-width: 168px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 740;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease,
    opacity 180ms ease;
}

.mq-submit-row .mq-primary-action:hover:not(:disabled) {
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.16);
  transform: translateY(-1px);
}

.mq-submit-row .mq-primary-action:disabled {
  opacity: 0.68;
}

.mq-recorder-status {
  margin-top: 2px;
}

.mq-card-footer {
  justify-content: flex-start;
  margin: 0;
}

@media (max-width: 900px) {
  .shell {
    width: min(100% - 24px, 1180px);
    padding-bottom: 18px;
  }

  .mq-topbar {
    padding: 16px 0;
  }

  .mq-flow-card--question,
  .mq-flow-card--answer {
    padding: 20px;
  }

  .mq-question-card-top,
  .mq-answer-card-head {
    display: grid;
  }

  .mq-flow-card--question .mq-question-title {
    font-size: 1.14rem;
    line-height: 1.48;
  }

  .mq-question-hint {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 12px;
    margin-top: 20px;
  }

  .mq-answer-card-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .mq-answer-card-actions .mq-secondary-action,
  .mq-dictate-button,
  .mq-submit-row .mq-primary-action {
    width: 100%;
  }

  .mq-answer-textarea {
    min-height: 150px;
    padding: 14px;
  }

  .mq-submit-row {
    justify-content: stretch;
  }
}

@keyframes mq-card-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mq-clarification-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mq-flow-card,
  .mq-flow-card--clarification,
  .mq-flow-card--active,
  .mq-answer-card-head,
  .mq-answer-editor,
  .mq-answer-textarea,
  .mq-answer-limit,
  .mq-dictate-button,
  .mq-dictate-wave span,
  .mq-submit-row .mq-primary-action,
  .mq-state-panel {
    animation: none;
    transition: none;
  }
}

/* Interview card visual alignment */
.shell {
  width: min(1180px, calc(100% - 56px));
  padding-top: 24px;
  overflow: visible;
}

.mq-screen,
.mq-screen form,
.mq-card,
.mq-card-body,
.mq-flow {
  overflow: visible;
}

.mq-screen > form {
  transition:
    opacity 160ms ease,
    transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.mq-screen--leaving > form {
  opacity: 0;
  transform: translateY(8px);
}

.mq-screen--entering > form {
  opacity: 0;
  transform: translateY(8px);
}

.mq-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.mq-card-body {
  gap: 16px;
}

.mq-flow {
  gap: 16px;
}

.mq-page-progress {
  display: grid;
  grid-template-columns: repeat(var(--progress-count, 12), minmax(0, 1fr));
  gap: clamp(3px, 0.55vw, 8px);
  width: 100%;
  max-width: none;
  margin: 2px 0 18px;
  padding: 0 2px;
}

.mq-page-progress-segment {
  display: block;
  height: 5px;
  border-radius: 999px;
  background: #dfe5ef;
  box-shadow: inset 0 0 0 1px rgba(94, 108, 132, 0.04);
}

.mq-page-progress-segment--active {
  background: linear-gradient(90deg, #6354f1, #4f46e5);
  box-shadow: 0 1px 4px rgba(79, 70, 229, 0.16);
}

.mq-flow-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.94)),
    radial-gradient(circle at 54% 52%, rgba(79, 70, 229, 0.04), transparent 46%);
  border: 1px solid #e1e7f0;
  border-radius: 14px;
  box-shadow:
    0 1px 2px rgba(28, 39, 64, 0.04),
    0 10px 28px rgba(28, 39, 64, 0.07);
}

.mq-flow-card--question {
  padding: 24px 30px 24px;
}

.mq-flow-card--answer {
  padding: 22px 30px;
  min-height: 88px;
}

.mq-flow-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  line-height: 0;
  text-align: center;
}

.mq-question-card-top .mq-flow-icon,
.mq-answer-card-head .mq-flow-icon,
.mq-flow-card--readonly .mq-flow-icon {
  display: inline-grid;
  align-items: center;
  justify-items: center;
  justify-content: center;
  gap: 0;
}

.mq-flow-icon svg {
  display: block;
  width: 19px;
  height: 19px;
  stroke-width: 2.4;
}

.mq-flow-icon--question svg {
  transform: translateY(0.5px);
}

.mq-flow-icon--position,
.mq-flow-icon--question {
  color: #4f46e5;
  background: #f2f0ff;
}

.mq-flow-icon--answer {
  color: #16a765;
  background: #e7f8ee;
}

.mq-flow-icon--pending-answer {
  color: #d97706;
  background: #fff4e5;
}

.mq-flow-icon--pending-answer svg {
  stroke-width: 2.5;
}

.mq-question-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  margin-bottom: 18px;
}

.mq-question-heading,
.mq-answer-heading {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.mq-question-heading > div,
.mq-answer-heading > div {
  min-width: 0;
}

.mq-question-context-label {
  margin: 0 0 3px;
  color: #71809a;
  font-size: 0.84rem;
  line-height: 1.2;
  font-weight: 680;
}

.mq-question-context {
  margin: 0;
  color: #090d18;
  font-size: 1.02rem;
  line-height: 1.25;
  font-weight: 780;
  overflow-wrap: anywhere;
}

.mq-question-eyebrow {
  margin: 0;
  color: #3f36e8;
  font-size: 0.9rem;
  line-height: 1.3;
  font-weight: 780;
}

.mq-question-progress {
  justify-self: end;
  margin: 6px 0 0;
  padding: 7px 12px;
  color: #5f6f88;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid #e0e6ef;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.2;
  font-weight: 720;
  box-shadow: 0 4px 16px rgba(28, 39, 64, 0.035);
  white-space: nowrap;
}

.mq-question-progress::first-letter {
  color: inherit;
}

.mq-question-help {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
  color: #53627d;
  font-size: 0.95rem;
  font-weight: 760;
  white-space: nowrap;
}

.mq-question-help svg {
  width: 18px;
  height: 18px;
}

.mq-flow-card--question .mq-question-title {
  max-width: 1040px;
  color: #090d18;
  font-size: 1.34rem;
  line-height: 1.48;
  font-weight: 580;
}

.mq-question-hint {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  margin-top: 24px;
  padding: 22px 22px;
  color: #52627c;
  background:
    linear-gradient(180deg, rgba(248, 250, 255, 0.96), rgba(244, 247, 252, 0.92)),
    radial-gradient(circle at 5% 50%, rgba(79, 70, 229, 0.07), transparent 26%);
  border: 0;
  border-top: 1px solid #e1e7f0;
  border-radius: 0;
}

.mq-question-hint > svg {
  width: 44px;
  height: 44px;
  padding: 11px;
  color: #4f46e5;
  background: #f1efff;
  border-radius: 999px;
}

.mq-question-hint p {
  font-size: 0.96rem;
  line-height: 1.58;
}

.mq-question-hint-note {
  margin-top: 13px !important;
}

.mq-flow-card--readonly {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 24px;
  align-items: start;
  gap: 12px;
}

.mq-readonly-answer-content {
  min-width: 0;
}

.mq-readonly-answer-top p,
.mq-answer-card-head .mq-answer-title {
  color: #090d18;
  font-size: 0.9rem;
  line-height: 1.35;
  font-weight: 780;
}

.mq-readonly-answer-text {
  margin-top: 10px;
  color: #51617a;
  font-size: 0.94rem;
  line-height: 1.5;
}

.mq-card-menu-icon {
  justify-self: end;
  margin-top: 10px;
  width: 20px;
  height: 20px;
  color: #53627d;
  stroke-width: 2.6;
}

.mq-answer-card-head {
  align-items: center;
  min-height: 38px;
}

.mq-answer-textarea {
  min-height: 132px;
  color: #0f172a;
  caret-color: #0f172a;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M10 4h4M12 4v16M10 20h4' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") 12 12, text;
  background: #ffffff;
  border: 1px solid #cfd7e6 !important;
  border-radius: 10px;
  box-shadow: none !important;
  outline: none !important;
  background-clip: padding-box;
  appearance: none;
}

.mq-answer-textarea:focus,
.mq-answer-textarea:focus-visible {
  border-color: #6f63f2 !important;
  box-shadow: none !important;
  outline: none !important;
}

.mq-flow-card--active .mq-answer-limit {
  justify-self: start;
}

.mq-flow-card--active .mq-submit-row {
  margin-top: -4px;
}

@media (max-width: 900px) {
  .shell {
    width: min(100% - 24px, 1180px);
    padding-top: 16px;
  }

  .mq-flow-card--question,
  .mq-flow-card--answer {
    padding: 20px;
  }

  .mq-question-card-top {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 16px;
  }

  .mq-question-progress,
  .mq-question-help {
    justify-self: start;
    margin-top: 0;
  }

  .mq-flow-card--question .mq-question-title {
    font-size: 1.14rem;
  }

  .mq-question-hint {
    grid-template-columns: 38px minmax(0, 1fr);
    margin-top: 20px;
    padding: 18px;
  }

  .mq-question-hint > svg {
    width: 38px;
    height: 38px;
    padding: 9px;
  }

  .mq-flow-card--readonly {
    grid-template-columns: 38px minmax(0, 1fr) 20px;
    gap: 12px;
  }

  .mq-flow-card--active .mq-submit-row {
    display: grid;
    gap: 10px;
    margin-top: 0;
  }

  .mq-page-progress {
    gap: 4px;
    margin-bottom: 14px;
  }

  .mq-page-progress-segment {
    height: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mq-screen > form {
    transition: none;
  }
}

