@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=DM+Sans:wght@400;500;700&display=swap");

:root {
  --bg: #d9dfde;
  --card: rgba(245, 245, 243, 0.95);
  --card-strong: #f1f1ef;
  --line: #cfd6d4;
  --ink: #141516;
  --muted: #4f5455;
  --accent: #11b685;
  --assistant: #dcefe9;
  --shadow: 0 14px 34px rgba(14, 24, 22, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  background:
    linear-gradient(110deg, #cae4df 0%, #e4e4e4 44%, #d9d9d9 100%),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.3) 0,
      rgba(255, 255, 255, 0.3) 1px,
      transparent 1px,
      transparent 36px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.28) 0,
      rgba(255, 255, 255, 0.28) 1px,
      transparent 1px,
      transparent 36px
    );
}

.workspace-page {
  padding: 18px 0 28px;
}

.site-wrap {
  width: min(1400px, 95vw);
  margin: 0 auto;
}

.unified-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.unified-grid > * {
  min-width: 0;
}

.conversation-stack,
.support-stack {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.support-stack {
  position: sticky;
  top: 10px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(2px);
  min-width: 0;
}

.chat-card,
.export-card,
.hero-visual-card,
.progress-card,
.checklist-card {
  padding: 16px;
}

.eyebrow {
  margin: 0 0 6px;
  font-family: "Plus Jakarta Sans", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.72rem;
  color: #3f4648;
}

.workspace-title {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.4rem, 2.3vw, 2.05rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.chat-card {
  display: grid;
  grid-template-rows: auto auto auto minmax(270px, 1fr) auto auto;
  min-height: min(760px, calc(100vh - 56px));
}

.gate-hint {
  margin: 10px 0 0;
  padding: 11px 12px;
  border-radius: var(--radius-md);
  border: 1px solid #c8d1cf;
  background: #ecf5f2;
  color: #2f4340;
  font-size: 0.9rem;
  line-height: 1.4;
}

.messages {
  margin-top: 12px;
  min-height: 250px;
  max-height: 52vh;
  overflow: auto;
  padding-right: 2px;
}

.message {
  max-width: min(72ch, 88%);
  border-radius: 14px;
  padding: 11px 13px;
  margin-bottom: 10px;
  line-height: 1.45;
  font-size: 0.98rem;
}

.message p {
  margin: 0;
  white-space: pre-wrap;
}

.message-assistant {
  background: var(--assistant);
  border: 1px solid #b9ddd3;
}

.message-user {
  margin-left: auto;
  background: #0d1012;
  color: #fff;
  border: 1px solid #0d1012;
}

.composer {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}

.chat-input,
.export-output {
  width: 100%;
  border: 1px solid #c4cdcb;
  border-radius: 12px;
  padding: 11px 13px;
  background: #fbfbfa;
  color: #1a1d1e;
  font: inherit;
}

.chat-input:focus,
.export-output:focus {
  outline: 3px solid rgba(17, 182, 133, 0.22);
  border-color: var(--accent);
}

.composer-help {
  margin: 9px 0 0;
  color: #555c5d;
  font-size: 0.86rem;
}

.export-card {
  display: grid;
  gap: 10px;
}

.export-head {
  display: grid;
  gap: 8px;
}

.export-head .workspace-title {
  font-size: 1.7rem;
}

.export-head .gate-hint {
  margin: 0;
}

.export-output {
  min-height: 260px;
  height: 33vh;
  max-height: 420px;
  resize: vertical;
}

.export-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-visual-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  background: linear-gradient(140deg, #f8f3ea 0%, #f0e8da 100%);
}

.scribble {
  position: absolute;
  width: 76%;
  top: 10%;
  right: 4%;
  height: auto;
  transform-origin: 50% 50%;
  animation: scribbleDrift 7s ease-in-out infinite;
}

.scribble path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-interviewer {
  position: absolute;
  width: 170px;
  bottom: -2px;
  left: 8%;
  animation: avatarFloat 4s ease-in-out infinite;
}

.avatar-eq {
  position: absolute;
  right: 18px;
  bottom: 15px;
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
  height: 20px;
}

.avatar-eq span {
  width: 4px;
  height: 6px;
  border-radius: 999px;
  background: #10ab7d;
  opacity: 0.45;
  animation: eqJump 0.85s ease-in-out infinite;
  animation-play-state: paused;
}

.avatar-eq span:nth-child(2) {
  animation-delay: 0.15s;
}

.avatar-eq span:nth-child(3) {
  animation-delay: 0.3s;
}

.avatar-eq span:nth-child(4) {
  animation-delay: 0.44s;
}

.voice-status {
  position: absolute;
  left: 14px;
  bottom: 12px;
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #d1ccbf;
  background: rgba(255, 255, 255, 0.9);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.77rem;
}

.progress-card,
.checklist-card {
  background: var(--card-strong);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
}

.progress-track {
  height: 11px;
  border-radius: 999px;
  background: #d6d8d8;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #11b685, #0f946c);
  transition: width 280ms ease;
}


.checklist-card .workspace-title {
  font-size: 1.7rem;
  margin-bottom: 10px;
}

.field-checklist {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  max-height: min(56vh, 620px);
  overflow: auto;
  padding-right: 4px;
}

.section-shell {
  list-style: none;
}

.section-block {
  border: 1px solid #d1d5d5;
  border-radius: var(--radius-md);
  background: #f8f8f7;
}

.section-block summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  cursor: pointer;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
}

.section-block summary::-webkit-details-marker {
  display: none;
}

.section-name {
  font-size: 0.9rem;
}

.section-stats {
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #c9cdcd;
  background: #fff;
}

.section-fields {
  list-style: none;
  margin: 0;
  padding: 0 8px 8px;
  display: grid;
  gap: 7px;
}

.check-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 9px;
  align-items: start;
  padding: 8px;
  border: 1px solid #d3d7d7;
  border-radius: 10px;
  background: #fcfcfb;
}

.check-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #bcc3c3;
  display: grid;
  place-items: center;
  font-size: 0.74rem;
  color: #fff;
  margin-top: 2px;
}

.check-item.is-done .check-dot {
  border-color: #0fa476;
  background: #0fa476;
}

.check-label {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.86rem;
  line-height: 1.35;
}

.check-value {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: #3d4345;
  line-height: 1.35;
}

.btn,
.button {
  border-radius: 999px;
  padding: 9px 16px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease;
}

.btn:hover,
.button:hover {
  transform: translateY(-1px);
  filter: brightness(0.98);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.btn-dark,
.button-dark {
  background: #0f1214;
  color: #fff;
}

.btn-soft,
.button-light {
  background: #f2f4f4;
  color: #171a1b;
  border-color: #c4cbca;
}

.hidden {
  display: none;
}

body.is-listening #avatarFrame {
  box-shadow:
    0 0 0 2px rgba(17, 182, 133, 0.22),
    0 16px 34px rgba(17, 182, 133, 0.18);
  animation: listeningPulse 1.25s ease-in-out infinite;
}

body.is-listening .avatar-eq span {
  animation-play-state: running;
  opacity: 1;
}

body.is-listening .voice-status {
  border-color: #0ea375;
  color: #0b664b;
}

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

@keyframes scribbleDrift {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(1.2deg) scale(1.01);
  }
}

@keyframes eqJump {
  0%,
  100% {
    height: 5px;
  }
  50% {
    height: 17px;
  }
}

@keyframes listeningPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 2px rgba(17, 182, 133, 0.2),
      0 16px 34px rgba(17, 182, 133, 0.14);
  }
  50% {
    box-shadow:
      0 0 0 4px rgba(17, 182, 133, 0.25),
      0 18px 40px rgba(17, 182, 133, 0.22);
  }
}

@media (max-width: 1220px) {
  .unified-grid {
    grid-template-columns: 1fr;
  }

  .support-stack {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .hero-visual-card,
  .checklist-card {
    grid-column: span 2;
  }

  .field-checklist {
    max-height: 420px;
  }

  .chat-card {
    min-height: 560px;
  }
}

@media (max-width: 760px) {
  .workspace-page {
    padding: 12px 0 20px;
  }

  .site-wrap {
    width: 94vw;
  }

  .support-stack {
    grid-template-columns: 1fr;
  }

  .hero-visual-card,
  .checklist-card {
    grid-column: auto;
  }

  .chat-card,
  .export-card,
  .hero-visual-card,
  .progress-card,
  .checklist-card {
    padding: 14px;
    border-radius: 18px;
  }

  .workspace-title {
    font-size: 1.55rem;
  }

  .chat-card {
    grid-template-rows: auto auto auto minmax(220px, 1fr) auto auto;
    min-height: auto;
  }

  .messages {
    max-height: 42vh;
  }

  .composer {
    flex-wrap: wrap;
  }

  .chat-input {
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  .export-output {
    min-height: 220px;
    height: 34vh;
  }
}
