:root {
  color-scheme: light;
  --ink: #11110f;
  --ink-soft: #393833;
  --muted: #6f6d65;
  --line: #dedbd2;
  --line-strong: #bbb6aa;
  --paper: #ffffff;
  --canvas: #f5f2eb;
  --canvas-deep: #ebe5d8;
  --gold: #a67c38;
  --gold-dark: #795722;
  --gold-soft: #f2e8d4;
  --success: #176b47;
  --danger: #a43a2b;
  --shadow: 0 24px 70px rgba(30, 27, 20, 0.1);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 85% 10%, rgba(166, 124, 56, 0.1), transparent 28rem),
    linear-gradient(180deg, #fbfaf7 0%, var(--canvas) 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
}

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

button,
select,
input[type="radio"],
input[type="checkbox"] {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(166, 124, 56, 0.42);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  transform: translateY(-150%);
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(17, 17, 15, 0.08);
  background: rgba(251, 250, 247, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 2rem));
  min-height: 78px;
  margin: 0 auto;
}

.brand-button {
  padding: 0;
  border: 0;
  background: transparent;
}

.logo-frame {
  position: relative;
  display: block;
  width: 226px;
  height: 62px;
  overflow: hidden;
  border-radius: 4px;
  background: white;
}

.logo-frame img {
  position: absolute;
  inset: -30% -6%;
  width: 112%;
  height: 160%;
  object-fit: cover;
}

.header-actions,
.resume-actions,
.form-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.draft-state {
  color: var(--muted);
  font-size: 0.875rem;
}

.text-button,
.save-button {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
}

main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.welcome-shell {
  padding: clamp(3rem, 7vw, 6.5rem) 0 4.5rem;
}

.welcome-copy {
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--gold-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.03;
}

h1 {
  max-width: 760px;
  margin-bottom: 1.15rem;
  font-size: clamp(2.75rem, 7vw, 5.6rem);
}

h2 {
  margin-bottom: 0.8rem;
  font-size: clamp(2rem, 4vw, 3.25rem);
}

.lead {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.choice-fieldset {
  padding: 0;
  border: 0;
}

.role-fieldset {
  margin: clamp(2.5rem, 6vw, 5rem) 0 0;
}

.choice-fieldset > legend {
  width: 100%;
  margin-bottom: 1.1rem;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.role-card,
.mode-card {
  position: relative;
  display: flex;
  min-height: 190px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 1.35rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.role-card::after {
  position: absolute;
  top: -42px;
  right: -35px;
  width: 110px;
  height: 110px;
  border: 1px solid rgba(166, 124, 56, 0.24);
  border-radius: 50%;
  content: "";
}

.role-card:hover,
.role-card.selected,
.mode-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  background: var(--paper);
  box-shadow: 0 18px 45px rgba(42, 36, 25, 0.1);
}

.role-card.selected {
  box-shadow: inset 0 0 0 1px var(--gold), 0 18px 45px rgba(42, 36, 25, 0.1);
}

.role-number {
  position: absolute;
  top: 1.1rem;
  left: 1.25rem;
  color: var(--gold-dark);
  font-family: Georgia, serif;
  font-size: 1.5rem;
}

.role-card strong,
.mode-card strong {
  margin-bottom: 0.35rem;
  font-size: 1.08rem;
}

.role-card > span:last-child,
.mode-card > span:not(.mode-badge) {
  color: var(--muted);
  font-size: 0.94rem;
}

.mode-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  align-items: end;
  gap: 2rem;
  margin-top: 2.4rem;
  padding: clamp(1.35rem, 4vw, 2.3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
}

.mode-panel .eyebrow {
  color: #d9bc86;
}

.mode-panel h2 {
  margin-bottom: 0;
  font-size: clamp(1.9rem, 4vw, 3rem);
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.mode-card {
  min-height: 165px;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: white;
}

.mode-card:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.mode-card > span:not(.mode-badge),
.mode-card small {
  color: rgba(255, 255, 255, 0.66);
}

.mode-card small {
  margin-top: 0.85rem;
}

.privacy-note {
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.resume-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--gold-soft);
}

.resume-banner strong,
.resume-banner span {
  display: block;
}

.resume-banner span {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.wizard-shell {
  display: grid;
  grid-template-columns: 295px minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(2rem, 5vw, 4.5rem) 0 5rem;
}

.progress-panel {
  align-self: start;
  position: sticky;
  top: 112px;
}

.progress-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.progress-track {
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--canvas-deep);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
  transition: width 220ms ease;
}

.step-list {
  display: grid;
  gap: 0.8rem;
  margin: 1.7rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

.step-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 0.7rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
  counter-increment: steps;
}

.step-list li::before {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  content: counter(steps);
  font-size: 0.72rem;
  font-weight: 800;
}

.step-list li.active {
  color: var(--ink);
  font-weight: 800;
}

.step-list li.active::before,
.step-list li.complete::before {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.progress-help {
  margin-top: 2.2rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.62);
}

.progress-help strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.progress-help p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.form-panel {
  min-width: 0;
  padding: clamp(1.5rem, 4vw, 3.25rem);
  border: 1px solid rgba(17, 17, 15, 0.09);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.step-heading {
  max-width: 700px;
  margin-bottom: 2.25rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--line);
}

.step-heading h2 {
  margin-bottom: 0.75rem;
}

.step-heading > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.field-stack {
  display: grid;
  gap: 1.65rem;
}

.field-group {
  min-width: 0;
}

.field-group > label,
.field-group > .field-label,
.compound-legend {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--ink);
  font-weight: 750;
}

.required-mark {
  margin-left: 0.15rem;
  color: var(--gold-dark);
}

.field-hint {
  display: block;
  margin: -0.22rem 0 0.65rem;
  color: var(--muted);
  font-size: 0.87rem;
}

.field-control,
.compound-grid input,
.compound-grid select {
  width: 100%;
  min-height: 52px;
  padding: 0.78rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--ink);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

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

.field-control:hover,
.compound-grid input:hover,
.compound-grid select:hover {
  border-color: #8f8a7f;
}

.field-control:focus,
.compound-grid input:focus,
.compound-grid select:focus {
  border-color: var(--gold);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(166, 124, 56, 0.12);
}

.currency-wrap {
  position: relative;
}

.currency-symbol {
  position: absolute;
  top: 50%;
  left: 0.95rem;
  transform: translateY(-50%);
  color: var(--ink-soft);
  font-weight: 800;
}

.currency-wrap .field-control {
  padding-left: 2.2rem;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.option-card {
  position: relative;
}

.option-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-card span {
  display: flex;
  min-height: 52px;
  align-items: center;
  padding: 0.78rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fcfbf8;
  color: var(--ink-soft);
  font-size: 0.94rem;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.option-card input:checked + span {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--gold);
}

.option-card input:focus-visible + span {
  outline: 3px solid rgba(166, 124, 56, 0.42);
  outline-offset: 2px;
}

.compound-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.compound-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.compound-grid.three-columns {
  grid-template-columns: 0.75fr 1fr 1fr;
}

.compound-grid label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.field-error {
  display: block;
  margin-top: 0.45rem;
  color: var(--danger);
  font-size: 0.84rem;
  font-weight: 700;
}

.invalid .field-control,
.invalid .compound-grid input,
.invalid .compound-grid select,
.invalid .option-card span {
  border-color: var(--danger);
}

.form-alert {
  margin-top: 1.5rem;
  padding: 0.85rem 1rem;
  border-left: 4px solid var(--danger);
  border-radius: 0 10px 10px 0;
  background: #fff1ee;
  color: #7e2e22;
  font-size: 0.92rem;
  font-weight: 700;
}

.form-actions {
  justify-content: flex-end;
  margin-top: 2.25rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.primary-button,
.secondary-button,
.whatsapp-button {
  min-height: 48px;
  padding: 0.72rem 1.1rem;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.primary-button {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: white;
}

.primary-button:hover,
.whatsapp-button:hover {
  transform: translateY(-2px);
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: white;
  color: var(--ink);
}

.secondary-button:hover {
  border-color: var(--ink);
}

.compact {
  min-height: 40px;
  padding: 0.5rem 0.85rem;
  font-size: 0.88rem;
}

.review-shell {
  padding: clamp(2.5rem, 6vw, 5.5rem) 0 5rem;
}

.review-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.review-heading h1 {
  margin-bottom: 0.7rem;
  font-size: clamp(2.6rem, 6vw, 4.7rem);
}

.review-heading p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.reference-chip {
  flex: 0 0 auto;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem;
}

.review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 1.25rem;
  align-items: start;
}

.review-sections {
  display: grid;
  gap: 1rem;
}

.review-section {
  padding: clamp(1.2rem, 3vw, 1.8rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.86);
}

.review-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.review-section h2 {
  margin: 0;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 850;
  letter-spacing: 0;
}

.edit-section {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gold-dark);
  font-size: 0.87rem;
  font-weight: 800;
}

.answer-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.4rem;
  margin: 0;
}

.answer-list div {
  min-width: 0;
}

.answer-list dt {
  margin-bottom: 0.2rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.answer-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  white-space: pre-wrap;
}

.submit-card {
  position: sticky;
  top: 108px;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
}

.submit-kicker {
  display: block;
  margin-bottom: 0.35rem;
  color: #d9bc86;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.submit-card > strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.2;
}

.submit-card > a {
  display: inline-block;
  margin-top: 0.55rem;
  color: #ead3a8;
  font-weight: 800;
  text-decoration: none;
}

.submit-card > p {
  margin: 1rem 0 1.25rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.9rem;
}

.whatsapp-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1px solid #25d366;
  background: #25d366;
  color: #092b16;
}

.full-width {
  width: 100%;
  margin-top: 0.75rem;
  border-color: rgba(255, 255, 255, 0.25);
  background: transparent;
  color: white;
}

.full-width:hover {
  border-color: white;
}

.submit-card .submission-note {
  margin: 0.9rem 0 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.78rem;
  text-align: center;
}

.toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 50;
  max-width: min(360px, calc(100% - 2.5rem));
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  font-weight: 700;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.site-footer p {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 800;
}

@media (max-width: 960px) {
  .role-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mode-panel,
  .wizard-shell,
  .review-layout {
    grid-template-columns: 1fr;
  }

  .progress-panel,
  .submit-card {
    position: static;
  }

  .progress-help,
  .step-list {
    display: none;
  }

  .progress-panel {
    padding: 0 0.5rem;
  }

  .wizard-shell {
    gap: 1rem;
  }

  .submit-card {
    order: -1;
  }
}

@media (max-width: 640px) {
  .header-inner,
  main,
  .site-footer {
    width: min(100% - 1.1rem, 1180px);
  }

  .header-inner {
    min-height: 68px;
  }

  .logo-frame {
    width: 170px;
    height: 52px;
  }

  .draft-state {
    display: none;
  }

  .welcome-shell {
    padding-top: 2.6rem;
  }

  h1 {
    font-size: clamp(2.6rem, 14vw, 4rem);
  }

  .role-grid,
  .mode-grid,
  .option-grid,
  .answer-list,
  .compound-grid,
  .compound-grid.three-columns {
    grid-template-columns: 1fr;
  }

  .role-card {
    min-height: 150px;
  }

  .mode-panel {
    gap: 1.25rem;
    border-radius: 22px;
  }

  .mode-card {
    min-height: 145px;
  }

  .resume-banner,
  .review-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .resume-actions {
    width: 100%;
  }

  .resume-actions button {
    flex: 1;
  }

  .form-panel {
    padding: 1.2rem;
    border-radius: 20px;
  }

  .form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .form-actions .save-button {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 44px;
  }

  .form-actions button:not(.save-button) {
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
