:root {
  --bg-main: #061220;
  --bg-panel: rgba(8, 22, 37, 0.82);
  --bg-panel-2: rgba(8, 26, 44, 0.75);
  --line: rgba(118, 184, 243, 0.28);
  --text-main: #ecf7ff;
  --text-soft: #b5cad9;
  --brand-a: #1d8fff;
  --brand-b: #56d9f5;
  --accent: #ffc46b;
  --warn: #ff8a8a;
  --ok: #6de3b8;
  --radius-lg: 20px;
  --radius-md: 12px;
  --shadow: 0 18px 38px rgba(1, 10, 19, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text-main);
  background: radial-gradient(circle at 20% 0%, #11426b 0%, #071625 45%, #06111e 100%);
  overflow-x: hidden;
}

.bg-shape {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.35;
  animation: drift 14s ease-in-out infinite alternate;
}

.shape-a {
  width: 460px;
  height: 460px;
  top: -130px;
  left: -80px;
  background: linear-gradient(120deg, #1d8fff, #56d9f5);
}

.shape-b {
  width: 380px;
  height: 380px;
  right: -90px;
  bottom: -80px;
  background: linear-gradient(120deg, #0c84c4, #23a5ff);
  animation-duration: 18s;
}

.shell {
  width: min(1180px, calc(100% - 2.4rem));
  margin: 2rem auto 3rem;
  display: grid;
  gap: 1.2rem;
}

.hero {
  background: linear-gradient(140deg, rgba(4, 16, 28, 0.86), rgba(5, 28, 47, 0.74));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow);
  animation: rise 0.8s ease-out;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  background: rgba(29, 143, 255, 0.2);
  border: 1px solid rgba(86, 217, 245, 0.42);
  color: #bde8ff;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0.8rem 0 0.6rem;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: clamp(1.5rem, 2.8vw, 2.3rem);
  line-height: 1.18;
}

.hero p {
  margin: 0;
  max-width: 72ch;
  color: var(--text-soft);
  line-height: 1.6;
}

.layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.2rem;
}

.panel {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--bg-panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.panel-flow {
  padding: 1.2rem;
  animation: rise 0.9s ease-out;
}

.panel-side {
  padding: 1.2rem;
  background: var(--bg-panel-2);
  animation: rise 1s ease-out;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.eyebrow {
  margin: 0;
  color: #8ec6ec;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#questionTitle {
  margin: 0.42rem 0 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
}

.required-badge {
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(255, 196, 107, 0.2);
  border: 1px solid rgba(255, 196, 107, 0.38);
  color: #ffe0aa;
  white-space: nowrap;
}

.question-prompt {
  margin: 0.95rem 0 0.45rem;
  color: #d7ebf8;
}

.question-hint {
  margin: 0 0 0.95rem;
  color: #8fb7d1;
  font-size: 0.95rem;
}

.progress-track {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: rgba(150, 210, 255, 0.14);
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brand-a), var(--brand-b));
  transition: width 0.35s ease;
}

.input-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.45rem;
}

textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid rgba(126, 180, 225, 0.45);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  background: rgba(2, 14, 25, 0.72);
  color: var(--text-main);
  font: inherit;
  min-height: 140px;
}

textarea:focus {
  outline: none;
  border-color: rgba(86, 217, 245, 0.9);
  box-shadow: 0 0 0 3px rgba(86, 217, 245, 0.2);
}

.validation-message {
  min-height: 1.25rem;
  margin: 0.6rem 0;
  color: var(--warn);
  font-size: 0.92rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.btn {
  border: 0;
  border-radius: 11px;
  padding: 0.7rem 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: "Sora", "Segoe UI", sans-serif;
  transition: transform 0.2s ease, filter 0.2s ease;
}

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

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  color: #00172b;
  background: linear-gradient(120deg, #6cc7ff, #8de4ff);
}

.btn-ghost {
  color: #d9effd;
  background: rgba(97, 157, 196, 0.2);
  border: 1px solid rgba(112, 182, 229, 0.42);
}

.btn-accent {
  display: none;
  color: #1d1100;
  background: linear-gradient(120deg, #ffd28a, #ffb75f);
}

.panel-side h3 {
  margin: 0 0 0.7rem;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 1.05rem;
}

.answers-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.answer-item {
  border: 1px solid rgba(112, 182, 229, 0.3);
  background: rgba(10, 30, 49, 0.46);
  border-radius: 10px;
  padding: 0.6rem 0.65rem;
}

.answer-item strong {
  display: block;
  color: #cfe9fb;
  margin-bottom: 0.24rem;
}

.answer-item p {
  margin: 0;
  color: #9fc6df;
  font-size: 0.9rem;
}

.result-head {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.source-badge {
  font-size: 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(109, 227, 184, 0.38);
  background: rgba(109, 227, 184, 0.16);
  color: #b4f4db;
  padding: 0.24rem 0.55rem;
}

.result-box {
  margin-top: 0.55rem;
  border: 1px solid rgba(112, 182, 229, 0.34);
  background: rgba(5, 19, 31, 0.82);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  min-height: 220px;
}

.placeholder {
  margin: 0;
  color: #97b8cc;
}

.result-section {
  margin-bottom: 0.8rem;
}

.result-section h4 {
  margin: 0 0 0.3rem;
  color: #8ad7ff;
}

.result-section p {
  margin: 0;
  color: #d7edf9;
  line-height: 1.45;
}

.result-section ul {
  margin: 0;
  padding-left: 1rem;
  color: #d7edf9;
  line-height: 1.5;
}

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

@keyframes drift {
  from {
    transform: translateY(0) scale(1);
  }
  to {
    transform: translateY(14px) scale(1.05);
  }
}

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

  .panel-side {
    order: 2;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(1180px, calc(100% - 1rem));
    margin-top: 1rem;
  }

  .hero,
  .panel-flow,
  .panel-side {
    padding: 0.95rem;
  }

  .actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
