:root {
  --purple: #4a2654;
  --orange: #f5623d;
  --dark-purple: #17052e;
  --green: #a1db00;
  --grey: #e7e6e6;
  --text: #1f1530;
  --muted: #5a5566;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--white);
  color: var(--text);
  font-family: "Red Hat Display", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  background: var(--dark-purple);
  height: 60px;
  display: flex;
  align-items: center;
  padding-left: 24px;
}

.site-logo {
  height: 36px;
  width: auto;
  display: block;
}

/* Main */
.main-content {
  flex: 1;
  padding: 40px 24px 64px;
}

/* Loading / buffering screen */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--dark-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.loading-screen img {
  height: 56px;
  width: auto;
}

/* Footer */
.site-footer {
  background: var(--dark-purple);
  color: var(--white);
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  letter-spacing: 0.5px;
}

/* Headings */
h1,
h2,
h3 {
  font-family: "Montserrat", sans-serif;
  color: var(--purple);
  margin: 0;
}

h1 {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 6px;
}

.intro {
  color: var(--muted);
  margin: 0 0 24px;
}

/* Progress */
.progress-wrap {
  margin: 8px 0 28px;
}
.progress-track {
  background: var(--grey);
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  background: var(--orange);
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Section card */
.card {
  background: var(--white);
  border: 1px solid var(--grey);
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(23, 5, 46, 0.05);
  padding: 32px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--orange);
  margin-bottom: 24px;
}

/* Fields */
.field {
  margin-bottom: 22px;
}
.field label,
.field-label {
  display: block;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  font-family: "Montserrat", sans-serif;
  font-size: 15px;
}

.field input[type="text"],
.field input[type="url"],
.field input[type="date"],
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--grey);
  border-radius: 6px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(74, 38, 84, 0.15);
}

.field.invalid input,
.field.invalid textarea,
.field.invalid select {
  border-color: var(--orange);
}

.error-msg {
  color: var(--orange);
  font-size: 14px;
  margin-top: 6px;
  font-weight: 600;
  display: none;
}
.field.invalid .error-msg {
  display: block;
}

.choice-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--grey);
  border-radius: 6px;
  padding: 10px 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.choice:hover {
  border-color: var(--purple);
}
.choice input {
  accent-color: var(--purple);
  width: 18px;
  height: 18px;
}

/* Buttons */
.actions {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 28px;
  flex-wrap: wrap;
}

.btn {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.btn-primary {
  background: var(--purple);
  color: var(--white);
}
.btn-primary:hover:not(:disabled) {
  background: var(--orange);
}

.btn-secondary {
  background: var(--white);
  color: var(--purple);
  border: 1px solid var(--purple);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--purple);
  color: var(--white);
}

.btn-submit {
  background: var(--orange);
  color: var(--white);
}
.btn-submit:hover:not(:disabled) {
  background: var(--purple);
}

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

.form-error {
  background: rgba(245, 98, 61, 0.08);
  border: 1px solid var(--orange);
  color: var(--orange);
  padding: 12px 14px;
  border-radius: 6px;
  margin-top: 16px;
  font-weight: 600;
  display: none;
}
.form-error.visible {
  display: block;
}

/* Submission details block (shown above the progress bar on step 1) */
.submission-details {
  background: var(--white);
  border: 1px solid var(--grey);
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(23, 5, 46, 0.05);
  padding: 24px 28px;
  margin-bottom: 28px;
}
.submission-details h2 {
  font-size: 18px;
  font-weight: 700;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--orange);
  margin-bottom: 18px;
}

/* Section subheading under the section title */
.section-subhead {
  color: var(--muted);
  margin: -14px 0 22px;
  font-size: 15px;
  line-height: 1.55;
}

/* Group intro (e.g. "Complete this value proposition framework.") */
.group-intro {
  font-weight: 600;
  color: var(--text);
  margin: 4px 0 14px;
  font-family: "Montserrat", sans-serif;
  font-size: 15px;
}

/* Slider */
.slider-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.slider-wrap input[type="range"] {
  flex: 1;
  accent-color: var(--purple);
  height: 4px;
}
.slider-value {
  min-width: 42px;
  text-align: center;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  color: var(--purple);
  background: var(--grey);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 14px;
}
.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

/* Read-only field */
.field input[readonly] {
  background: var(--grey);
  color: var(--muted);
  cursor: not-allowed;
}

/* Optional flag */
.optional-flag {
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
  margin-left: 6px;
}

/* "Other" sub-input */
.other-input-wrap {
  margin-top: 10px;
  margin-left: 28px;
}
.other-input-wrap input[type="text"] {
  width: 100%;
  border: 1px solid var(--grey);
  border-radius: 6px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 15px;
}

/* Max-selection warning */
.max-warning {
  color: var(--orange);
  font-size: 13px;
  margin-top: 6px;
  font-weight: 600;
  min-height: 18px;
}

.preview-banner {
  background: rgba(245, 98, 61, 0.08);
  border: 1px solid var(--orange);
  color: var(--purple);
  padding: 10px 14px;
  border-radius: 6px;
  margin: 0 0 18px;
  font-size: 14px;
}
.preview-banner code {
  background: var(--grey);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--dark-purple);
}

/* Status pages */
.status-card {
  background: var(--white);
  border: 1px solid var(--grey);
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(23, 5, 46, 0.05);
  padding: 48px 32px;
  text-align: center;
}
.status-card h1 {
  color: var(--purple);
  margin-bottom: 14px;
}
.status-card p {
  color: var(--text);
  font-size: 17px;
  margin: 0 0 18px;
}
.status-card .status-tagline {
  color: var(--orange);
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 14px;
}
.status-card .check-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green);
  color: var(--dark-purple);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 18px;
}

/* Mobile */
@media (max-width: 640px) {
  .card {
    padding: 22px;
  }
  h1 {
    font-size: 24px;
  }
  .section-title {
    font-size: 19px;
  }
  .actions {
    flex-direction: column-reverse;
  }
  .actions .btn {
    width: 100%;
  }
}

/* ----- File upload fields ----- */
.field input[type="file"].file-input {
  width: 100%;
  border: 1px dashed var(--grey);
  border-radius: 6px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input[type="file"].file-input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(74, 38, 84, 0.15);
}
.field .file-list {
  margin-top: 8px;
  font-size: 13px;
  color: var(--purple);
  font-weight: 600;
  word-break: break-word;
}

/* ----- Natural-language date field ----- */
.datetext-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.datetext-wrap input[type="text"] {
  width: 100%;
  border: 1px solid var(--grey);
  border-radius: 6px;
  padding: 12px 40px 12px 14px;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.datetext-wrap input[type="text"]:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(74, 38, 84, 0.15);
}
.date-spinner {
  position: absolute;
  right: 12px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--grey);
  border-top-color: var(--purple);
  border-radius: 50%;
  display: none;
}
.date-spinner.active {
  display: inline-block;
  animation: date-spin 0.7s linear infinite;
}
@keyframes date-spin {
  to {
    transform: rotate(360deg);
  }
}
.date-converted {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  min-height: 16px;
}
.date-converted.ok {
  color: var(--purple);
}
.date-converted.warn {
  color: var(--orange);
}

/* ----- File pills ----- */
.file-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(74, 38, 84, 0.08);
  border: 1px solid var(--purple);
  color: var(--purple);
  border-radius: 999px;
  padding: 4px 6px 4px 12px;
  margin: 4px 6px 0 0;
  font-size: 13px;
  font-weight: 600;
  max-width: 100%;
}
.file-pill-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}
.file-pill-x {
  border: none;
  background: transparent;
  color: var(--purple);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 999px;
}
.file-pill-x:hover {
  background: var(--purple);
  color: var(--white);
}

/* ----- Save & Complete Later ----- */
.actions-right {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-left: auto;
}
.btn-ghost {
  background: transparent;
  color: var(--purple);
  border: 1px dashed var(--purple);
}
.btn-ghost:hover:not(:disabled) {
  background: rgba(74, 38, 84, 0.08);
}
.save-status {
  display: none;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 6px;
  font-weight: 600;
}
.save-status.ok {
  display: block;
  background: rgba(46, 125, 50, 0.08);
  border: 1px solid #2e7d32;
  color: #2e7d32;
}
.save-status.warn {
  display: block;
  background: rgba(245, 98, 61, 0.08);
  border: 1px solid var(--orange);
  color: var(--orange);
}
@media (max-width: 560px) {
  .actions-right {
    width: 100%;
    flex-direction: column-reverse;
    margin-left: 0;
  }
}

/* ----- Landing page ----- */
.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 0 20px;
}
.landing-title {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  color: var(--purple);
  font-size: 34px;
  margin-bottom: 10px;
}
.landing-subtitle {
  font-size: 17px;
  color: var(--text);
  margin-bottom: 32px;
}
.landing-start {
  background: var(--orange);
  color: var(--white);
  font-size: 16px;
  padding: 16px 36px;
}
.landing-start:hover:not(:disabled) {
  background: var(--purple);
}
.landing-drafts {
  width: 100%;
  max-width: 560px;
  margin-top: 48px;
  text-align: left;
}
.landing-drafts h2 {
  font-family: "Montserrat", sans-serif;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--purple);
  margin-bottom: 14px;
}
.draft-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.draft-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  background: var(--white);
  border: 1px solid var(--grey);
  border-radius: 8px;
  padding: 14px 18px;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  text-align: left;
}
.draft-item:hover {
  border-color: var(--purple);
  box-shadow: 0 2px 8px rgba(74, 38, 84, 0.12);
}
.draft-name {
  font-weight: 700;
  color: var(--purple);
  word-break: break-word;
}
.draft-date {
  font-size: 13px;
  color: #777;
  white-space: nowrap;
}
.draft-empty {
  color: #888;
  font-size: 14px;
  padding: 10px 2px;
}
.draft-empty.warn {
  color: var(--orange);
}
