@import url("https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&display=swap");

:root {
  --red: #c8102e;
  --red-dark: #9b0d23;
  --red-soft: #fff1f3;
  --navy: #1b2a4a;
  --navy-soft: #eef3ff;
  --cream: #fdf8f3;
  --warm: #f7efe6;
  --white: #ffffff;
  --text: #1b2436;
  --muted: #667085;
  --line: #e7ebf1;
  --line-strong: #d8dde6;
  --success: #1f7a5a;
  --danger: #c24559;
  --shadow-sm: 0 10px 28px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 24px 60px rgba(16, 24, 40, 0.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --container: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Be Vietnam Pro", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(200, 16, 46, 0.06), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

code {
  font-family: "SFMono-Regular", Consolas, monospace;
}

.site-shell {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.hero,
.experience,
.success-card {
  position: relative;
  border: 1px solid rgba(231, 235, 241, 0.92);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-md);
}

.hero h2,
.section-heading h2,
.panel-header h3,
.subsection-heading h4,
.book-card-header h4,
.success-card h1,
.success-next h2,
.test-result-card h2 {
  margin: 0;
  color: var(--navy);
  font-weight: 800;
  line-height: 1.18;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 28px;
  margin-bottom: 22px;
  padding: 36px;
  background:
    linear-gradient(160deg, #fdf8f3 0%, #fff6f7 42%, #f4f7ff 100%);
  overflow: hidden;
}

.hero::after,
.experience::after,
.success-card::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(27, 42, 74, 0.07), transparent 70%);
  pointer-events: none;
}

.hero-copy,
.hero-panel,
.form-card,
.stepper-card {
  position: relative;
  z-index: 1;
}

.hero-copy {
  display: grid;
  align-content: start;
}

.hero-logo-wrap {
  display: flex;
  align-items: center;
  min-height: 96px;
  margin-bottom: 8px;
}

.hero-logo {
  width: min(100%, 470px);
  height: auto;
  object-fit: contain;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(200, 16, 46, 0.14);
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 700;
}

.hero h2 {
  margin-top: 12px;
  font-size: clamp(1.95rem, 3.8vw, 2.9rem);
  max-width: 11.5ch;
}

.hero-lead,
.section-heading p,
.panel-header p,
.subsection-heading p,
.field-help,
.upload-copy span,
.success-lead,
.autosave-status,
.info-card p,
.books-toolbar p,
.test-mode-banner p,
.draft-banner p,
.test-result-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
}

.hero-lead {
  max-width: 56ch;
  margin-top: 14px;
  font-size: 1rem;
}

.hero-actions,
.success-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(27, 42, 74, 0.08);
}

.hero-stat {
  display: grid;
  gap: 4px;
  min-width: 120px;
}

.hero-stat strong {
  color: var(--navy);
  font-size: 1rem;
  font-weight: 800;
}

.hero-stat span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.hero-visual {
  display: grid;
  gap: 14px;
  align-content: center;
}

.hero-visual-card {
  padding: 18px;
  border: 1px solid rgba(27, 42, 74, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}

.hero-visual-card span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-visual-card strong {
  color: var(--navy);
  line-height: 1.55;
}

.hero-visual-card-primary {
  background: linear-gradient(145deg, var(--navy), #2f4676);
  border-color: transparent;
}

.hero-visual-card-primary span {
  color: rgba(255, 255, 255, 0.72);
}

.hero-visual-card-primary strong {
  color: #fff;
}

.experience {
  padding: 30px;
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

.section-heading h2,
.panel-header h3,
.success-card h1 {
  font-size: clamp(1.55rem, 2.8vw, 2.3rem);
}

.test-mode-banner,
.draft-banner,
.test-result-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 241, 243, 0.9), rgba(244, 247, 255, 0.92));
}

.draft-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.form-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
}

.stepper-card,
.form-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--white);
}

.stepper-card {
  position: sticky;
  top: 16px;
  align-self: start;
  padding: 20px;
}

.progress-overview {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfcfe, #ffffff);
}

.progress-copy {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.progress-copy strong {
  color: var(--navy);
  font-size: 0.97rem;
}

.progress-copy span {
  color: var(--muted);
  font-size: 0.9rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f6;
}

.progress-bar span {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--navy));
  transition: width 0.24s ease;
}

.stepper {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stepper-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid transparent;
  color: var(--muted);
}

.stepper-item strong {
  display: block;
  margin: 0;
  color: var(--navy);
  font-size: 0.95rem;
}

.step-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.step-copy span {
  display: block;
  font-size: 0.88rem;
  line-height: 1.55;
}

.stepper-item.is-active,
.stepper-item.is-complete {
  background: #fafbfe;
}

.stepper-item.is-active {
  border-color: rgba(200, 16, 46, 0.08);
}

.step-number {
  display: grid;
  place-items: center;
  align-self: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #eef2f8;
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 800;
  flex-shrink: 0;
  line-height: 1;
}

.stepper-item.is-active .step-number,
.stepper-item.is-complete .step-number {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
}

.info-card {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: var(--cream);
}

.info-card strong {
  color: var(--navy);
  font-size: 0.96rem;
}

.autosave-status {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

.form-card {
  overflow: hidden;
}

.form-step {
  display: none;
  padding: 28px;
}

.form-step.is-active {
  display: block;
  animation: fade-in 0.24s ease;
}

.panel-header,
.subsection-heading,
.books-toolbar,
.book-card-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.panel-header {
  align-items: end;
  margin-bottom: 22px;
}

.panel-header p,
.subsection-heading p {
  max-width: 38ch;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-full {
  grid-column: 1 / -1;
}

.field label,
.toggle-card strong,
.consent-item {
  font-weight: 700;
}

.field label span,
.consent-item span span {
  color: var(--red);
}

.field input,
.field select,
.field textarea,
.upload-field {
  width: 100%;
  outline: none;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  padding: 13px 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #98a2b3;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.upload-field:focus-within {
  border-color: rgba(27, 42, 74, 0.28);
  box-shadow: 0 0 0 4px rgba(27, 42, 74, 0.06);
}

.field select:disabled {
  opacity: 1;
  color: var(--navy);
  background: #f6f8fb;
  cursor: not-allowed;
}

.field-help {
  font-size: 0.88rem;
}

.delivery-note {
  padding: 14px 16px;
  border: 1px solid rgba(27, 42, 74, 0.08);
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfcfe, #ffffff);
  color: var(--muted);
  line-height: 1.6;
}

.field-error {
  min-height: 1.2em;
  margin: 0;
  color: var(--danger);
  font-size: 0.88rem;
  line-height: 1.45;
}

.field input.is-invalid,
.field select.is-invalid,
.field textarea.is-invalid,
.upload-field.is-invalid {
  border-color: rgba(194, 69, 89, 0.56);
  box-shadow: 0 0 0 4px rgba(194, 69, 89, 0.08);
}

.upload-field {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(180deg, #fff, #fcfdff);
}

.upload-field input[type="file"] {
  max-width: 220px;
  padding: 0;
  border: none;
}

.upload-copy {
  display: grid;
  gap: 4px;
}

.upload-copy strong {
  color: var(--navy);
  font-size: 0.92rem;
}

.books-toolbar {
  align-items: center;
  margin-bottom: 18px;
}

.books-toolbar strong {
  color: var(--navy);
  font-size: 0.98rem;
}

.books-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.books-count,
.success-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
}

.books-count {
  color: var(--navy);
  background: var(--navy-soft);
}

.books-list {
  display: grid;
  gap: 14px;
}

.book-card,
.subsection-card,
.preview-block {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #fcfdff);
}

.book-card {
  box-shadow: var(--shadow-sm);
}

.book-card-header {
  align-items: center;
  margin-bottom: 16px;
}

.book-card-header h4 {
  font-size: 1.12rem;
}

.category-picker,
.category-tags-panel {
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #fcfdff);
}

.category-picker {
  padding: 12px;
}

.category-picker.is-invalid,
.category-tags-panel.is-invalid {
  border-color: rgba(194, 69, 89, 0.56);
  box-shadow: 0 0 0 4px rgba(194, 69, 89, 0.08);
}

.category-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.category-option {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 128px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.category-option:hover {
  transform: translateY(-1px);
  border-color: rgba(27, 42, 74, 0.14);
  box-shadow: var(--shadow-sm);
}

.category-option.is-active {
  border-color: rgba(200, 16, 46, 0.22);
  background: linear-gradient(180deg, rgba(255, 241, 243, 0.85), #fff);
  box-shadow: 0 12px 28px rgba(200, 16, 46, 0.08);
}

.category-option-kicker {
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.category-option strong {
  color: var(--navy);
  font-size: 0.97rem;
}

.category-option small {
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.55;
}

.category-tags-panel {
  padding: 14px;
}

.category-helper {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-tag {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-size: 0.87rem;
  font-weight: 600;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.category-tag:hover {
  transform: translateY(-1px);
}

.category-tag.is-active {
  border-color: rgba(200, 16, 46, 0.22);
  background: var(--red-soft);
  color: var(--red-dark);
}

.image-preview {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.image-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f3f6fb;
  color: var(--navy);
  font-size: 0.88rem;
}

.image-chip img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.subsection-card + .subsection-card {
  margin-top: 18px;
}

.subsection-heading {
  align-items: end;
  margin-bottom: 16px;
}

.toggle-grid,
.consent-list,
.preview-summary {
  display: grid;
  gap: 12px;
}

.toggle-card,
.consent-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.toggle-card input,
.consent-item input {
  margin-top: 4px;
  accent-color: var(--red);
}

.toggle-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.toggle-card.is-disabled {
  opacity: 0.5;
}

.connection-panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.connection-panel .field-grid {
  margin-top: 14px;
}

.preview-block h4 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 0.98rem;
}

.preview-list {
  display: grid;
  gap: 10px;
}

.preview-row {
  display: grid;
  grid-template-columns: minmax(130px, 160px) 1fr;
  gap: 12px;
  align-items: start;
}

.preview-row span:first-child {
  color: var(--muted);
}

.preview-row strong {
  color: var(--text);
  line-height: 1.55;
}

.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 28px 28px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(250, 251, 252, 0.35), #fff 88%);
}

.footer-right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, opacity 0.16s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.button-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 10px 24px rgba(200, 16, 46, 0.18);
}

.button-primary:hover {
  background: var(--red-dark);
}

.button-secondary {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--navy);
}

.button-text {
  min-height: auto;
  padding-inline: 6px;
  border: none;
  background: transparent;
  color: var(--navy);
}

.button-danger {
  color: var(--danger);
}

.submit-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.button.is-loading .submit-spinner {
  display: inline-block;
}

.button.is-loading .submit-label {
  opacity: 0.8;
}

.success-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.success-shell {
  width: min(100%, 620px);
}

.success-card {
  padding: 34px;
}

.success-card-minimal {
  text-align: center;
}

.success-card-minimal .success-lead {
  max-width: 34ch;
  margin: 0 auto;
}

.success-card-minimal .success-actions {
  justify-content: center;
}

.success-code-card {
  display: grid;
  gap: 10px;
  margin: 24px 0 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #fbfcff);
}

.success-code-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.success-code-card strong {
  color: var(--navy);
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  line-height: 1.4;
  word-break: break-word;
}

.conditional-field.is-hidden,
.is-hidden {
  display: none !important;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1024px) {
  .hero,
  .form-layout {
    grid-template-columns: 1fr;
  }

  .stepper-card {
    position: static;
  }
}

@media (max-width: 768px) {
  .site-shell {
    width: min(calc(100% - 20px), var(--container));
    padding-top: 14px;
  }

  .panel-header,
  .subsection-heading,
  .books-toolbar,
  .draft-banner,
  .test-mode-banner,
  .test-result-card,
  .form-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero,
  .experience,
  .success-card {
    border-radius: 24px;
  }

  .hero,
  .experience,
  .success-card {
    padding: 22px;
  }

  .hero-logo-wrap {
    min-height: 72px;
    margin-bottom: 4px;
  }

  .hero-logo {
    width: min(100%, 360px);
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .form-step {
    padding: 22px;
  }

  .form-footer {
    padding: 18px 22px 22px;
  }

  .button:not(.button-text),
  .footer-right,
  .draft-actions,
  .books-toolbar-actions {
    width: 100%;
  }

  .upload-field {
    flex-direction: column;
    align-items: flex-start;
  }

  .upload-field input[type="file"] {
    max-width: none;
  }

  .preview-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .category-options {
    grid-template-columns: 1fr;
  }

  .flow-arrow {
    width: 100%;
    text-align: center;
  }
}
