/*
 * Dedicated /analyze page: centered card for YouTube URL or audio file upload.
 * Reuses tokens.css, components.css, and start.js.
 */

.analyze-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 20px 96px;
  min-height: calc(100vh - 68px - 80px);
}

.analyze-card {
  width: 100%;
  max-width: 640px;
  text-align: center;
}

.analyze-head {
  margin-bottom: 24px;
}

.analyze-head .eyebrow {
  margin-bottom: 8px;
}

.analyze-head h1 {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.15;
  letter-spacing: -.03em;
  font-weight: 700;
  color: var(--ink);
}

.analyze-lede {
  margin: 10px auto 0;
  max-width: 480px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-secondary);
}

/* ---------- track input card ---------- */

.analyze-card .start {
  margin-top: 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--stroke-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  text-align: left;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.analyze-card .start.is-dragover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .2), var(--shadow-md);
  background: var(--surface-hover);
}

.start__field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 14px;
  background: var(--surface-2);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.start__field:focus-within {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .14);
}

.start__icon {
  width: 18px;
  height: 18px;
  color: var(--ink-tertiary);
}

.start__input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
}

.start__input::placeholder {
  color: var(--ink-tertiary);
}

.start__input:focus {
  outline: none;
}

.start__submit {
  flex-shrink: 0;
}

.start__hint {
  margin: 8px 2px 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-tertiary);
}

.start__hint[data-state="ok"] {
  color: var(--positive-strong);
}

.start__hint[data-state="warn"] {
  color: var(--warning);
}

.start__or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 2px;
  color: var(--ink-tertiary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.start__or::before,
.start__or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--stroke);
}

.start__file {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
}

.start__formats {
  margin: 0;
  font-size: 12px;
  color: var(--ink-tertiary);
}

.start__status {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.start__status-label {
  margin: 0;
  font-size: 12px;
  color: var(--ink-secondary);
}

.start__error {
  margin-top: 10px;
}

.start > .auth-link {
  margin-top: 8px;
}

.start__trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 10px;
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--stroke);
  font-size: 12.5px;
  color: var(--ink-secondary);
  text-align: center;
  line-height: 1.4;
}

.start__trust span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.start__trust .icon {
  width: 14px;
  height: 14px;
  color: var(--positive);
  flex-shrink: 0;
}

.start__trust span[aria-hidden] {
  color: var(--ink-tertiary);
}

/* ---------- mobile adjustments ---------- */

@media (max-width: 640px) {
  .analyze-page {
    padding: 36px 16px 64px;
  }

  .analyze-card .start {
    padding: 14px;
    border-radius: var(--radius-md);
  }

  .start__field {
    flex-wrap: wrap;
    padding: 8px;
  }

  .start__input {
    flex-basis: 100%;
    height: 36px;
  }

  .start__submit {
    width: 100%;
  }

  .start__file {
    align-items: stretch;
    flex-direction: column;
  }

  .start__file .btn {
    width: 100%;
  }
}
