.intake-shell {
  min-height: 100vh;
}

.app-header {
  display: flex;
  height: 60px;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid var(--soft-border);
  background: rgb(255 255 255 / 88%);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--accent-ink);
  background: var(--accent);
  font-size: 13px;
}

.intake-stage {
  display: flex;
  min-height: calc(100vh - 60px);
  align-items: center;
  justify-content: center;
  padding: 64px 24px 72px;
}

.brief-form {
  width: min(100%, 620px);
  padding: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgb(255 255 255 / 88%);
  box-shadow: 0 26px 80px rgb(32 33 35 / 10%);
}

.preparation-view {
  width: min(100%, 620px);
  padding: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgb(255 255 255 / 88%);
  box-shadow: 0 26px 80px rgb(32 33 35 / 10%);
  animation: enter 220ms ease both;
}

.preparation-kicker {
  display: block;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.preparation-view h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.preparation-view > p {
  min-height: 24px;
  margin: 0 0 34px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.preparation-progress {
  height: 10px;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--panel-2);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 4%);
}

.preparation-progress span {
  display: block;
  width: 4%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #4fc3f7);
  transition: width 600ms ease;
}

.preparation-progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.preparation-progress-meta span:first-child {
  color: var(--accent);
  font-weight: 600;
}

.form-header {
  margin-bottom: 40px;
}

.step-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}

.step-meta span:first-child {
  color: var(--text);
  font-weight: 600;
}

.step-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.step-progress span {
  display: block;
  height: 4px;
  border-radius: var(--radius-sm);
  background: var(--soft-border);
  transition: background 180ms ease;
}

.step-progress[data-step="1"] span:nth-child(1),
.step-progress[data-step="2"] span:nth-child(-n + 2),
.step-progress[data-step="3"] span {
  background: var(--accent);
}

.form-step {
  min-height: 400px;
  animation: enter 160ms ease both;
}

.step-heading {
  margin-bottom: 32px;
}

.step-heading h1 {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.step-heading p {
  max-width: 570px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.field-label {
  display: flex;
  justify-content: space-between;
  margin: 0 0 9px;
  font-size: 14px;
  font-weight: 550;
}

.field-label:not(:first-of-type) {
  margin-top: 28px;
}

.field-label span,
.field-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.field-hint {
  display: block;
  margin-top: 7px;
}

input[type="text"],
textarea {
  display: block;
  width: 100%;
  padding: 13px 14px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel-2);
  font-size: 15px;
  line-height: 1.5;
}

input[type="text"]:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgb(77 215 164 / 18%);
}

textarea {
  min-height: 280px;
  resize: vertical;
}

.upload-box {
  display: flex;
  min-height: 82px;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px dashed rgb(255 255 255 / 22%);
  border-radius: var(--radius-md);
  background: var(--panel-2);
  cursor: pointer;
}

.upload-box:hover,
.upload-box:focus-within {
  border-color: var(--accent);
  background: #f4faf7;
}

.upload-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-icon {
  display: grid;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--accent);
  background: var(--panel);
  font-size: 21px;
}

.upload-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.upload-copy strong {
  font-size: 14px;
  font-weight: 550;
}

.upload-copy small,
.upload-box em {
  color: var(--muted);
  font-size: 12px;
}

.upload-box em {
  max-width: 210px;
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 24px;
  border-top: 1px solid var(--soft-border);
}

.action-spacer {
  flex: 1;
}

.next-button,
.back-button,
.start-button {
  min-width: 96px;
  min-height: var(--control-height);
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
}

.next-button,
.start-button {
  color: var(--accent-ink);
  background: var(--accent);
}

.next-button:hover,
.start-button:hover {
  background: var(--accent-hover);
}

.next-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.back-button {
  color: var(--text);
  border-color: var(--border);
  background: var(--panel-2);
}

.back-button:hover {
  background: #f4faf7;
}

.start-button {
  min-width: 132px;
}

.start-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.error {
  margin: -20px 0 24px;
  padding: 11px 13px;
  color: var(--danger);
  border: 1px solid #fecdca;
  border-radius: var(--radius-md);
  background: #fef3f2;
  font-size: 13px;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

@media (max-width: 600px) {
  .app-header {
    height: 56px;
    padding: 0 18px;
  }

  .intake-stage {
    min-height: calc(100vh - 56px);
    align-items: flex-start;
    padding: 34px 18px;
  }

  .brief-form,
  .preparation-view {
    padding: 26px 20px;
    border-radius: var(--radius-lg);
  }

  .form-header {
    margin-bottom: 34px;
  }

  .form-step {
    min-height: 430px;
  }

  .step-heading h1 {
    font-size: 25px;
  }

  .step-meta span:last-child {
    display: none;
  }

  .upload-box {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .upload-box em {
    width: 100%;
    max-width: none;
    padding-left: 54px;
  }

  .form-actions {
    position: sticky;
    bottom: 0;
    padding: 16px 0;
    background: var(--surface);
  }
}
