/* Quiet Purpose tool — uses base.css tokens (--clr-primary, --clr-secondary, --clr-bg, --clr-heading, --clr-card, --radius, --shadow) */

.purpose-tool {
  max-width: 640px;
  margin: 0 auto;
}

/* Flatline progress */
.flatline-wrap {
  width: 100%;
  height: 56px;
  margin-bottom: 32px;
}
.flatline-svg { width: 100%; height: 100%; display: block; }
.fl-path {
  fill: none;
  stroke: var(--clr-primary);
  stroke-width: 1.5;
  opacity: 0.3;
}
.fl-dot {
  fill: var(--clr-bg);
  stroke: var(--clr-primary);
  stroke-width: 1.5;
  transition: fill 0.4s ease, r 0.3s ease;
}
.fl-dot.filled { fill: var(--clr-primary); }
.fl-dot.current { fill: var(--clr-secondary); stroke: var(--clr-secondary); }

/* Question card */
.purpose-card {
  background: var(--clr-card);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: var(--radius);
  padding: var(--pad);
  box-shadow: var(--shadow);
}
.q-count {
  font-size: 12px;
  color: var(--clr-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.q-text {
  font-size: 22px;
  line-height: 1.45;
  color: var(--clr-heading);
  font-weight: 700;
  margin: 0 0 24px;
}
.purpose-card textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  border: 1px solid rgba(21,105,113,0.25);
  border-radius: 10px;
  background: var(--clr-bg);
  padding: 14px 16px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--clr-text);
  outline: none;
  transition: border-color 0.2s ease;
}
.purpose-card textarea:focus { border-color: var(--clr-secondary); }

.purpose-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.purpose-hint {
  font-size: 12.5px;
  color: var(--clr-muted);
  margin-right: auto;
}
.purpose-btn {
  background: var(--clr-primary);
  color: #fff;
  border: none;
  padding: 11px 24px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}
.purpose-btn:hover:not(:disabled) { background: var(--clr-secondary); }
.purpose-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Loading */
.purpose-loading { text-align: center; padding: 20px 0 8px; }
.purpose-loading-line {
  width: 80px; height: 1.5px;
  background: var(--clr-primary);
  margin: 0 auto 18px;
  position: relative;
  overflow: hidden;
}
.purpose-loading-line::after {
  content: '';
  position: absolute;
  top: -3px; left: -20px;
  width: 16px; height: 8px;
  background: var(--clr-secondary);
  border-radius: 50%;
  filter: blur(4px);
  animation: purposeTravel 1.4s ease-in-out infinite;
}
@keyframes purposeTravel {
  0% { left: -20px; }
  50% { left: 70px; }
  100% { left: -20px; }
}
.purpose-loading-text { font-size: 14px; color: var(--clr-muted); }

/* Result */
.result-eyebrow {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-secondary);
  font-weight: 700;
  margin-bottom: 16px;
}
.result-text {
  font-size: 20px;
  line-height: 1.6;
  color: var(--clr-heading);
  white-space: pre-wrap;
  font-weight: 500;
}
.result-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(21,105,113,0.14);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.result-note {
  font-size: 12.5px;
  color: var(--clr-muted);
  line-height: 1.5;
  max-width: 320px;
}
.purpose-error {
  color: #a3453b;
  font-size: 13.5px;
  margin-top: 14px;
}

@media (max-width: 600px) {
  .purpose-actions { justify-content: center; }
  .purpose-hint { margin-right: 0; width: 100%; text-align: center; }
  .result-footer { flex-direction: column; align-items: flex-start; }
}
