:root {
  --sand: #f6f1e9;
  --ink: #121416;
  --muted: #5a5f66;
  --stone: #d2c6b8;
  --accent: #c86f3a;
  --accent-dark: #9b532a;
  --mint: #b9d7d2;
  --panel: #ffffff;
  --shadow: 0 24px 50px rgba(18, 20, 22, 0.12);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #f7d8b8 0%, rgba(247, 216, 184, 0) 45%),
    radial-gradient(circle at 85% 10%, #c8e2df 0%, rgba(200, 226, 223, 0) 55%),
    var(--sand);
  min-height: 100vh;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  background: #ffffff;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 8px 16px rgba(18, 20, 22, 0.12);
  transform: translateY(-200%);
  transition: transform 0.2s ease;
  z-index: 10;
}

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

.page {
  padding: 32px 5vw 60px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 10px 20px rgba(200, 111, 58, 0.25);
}

.brand-title {
  font-family: "Fraunces", serif;
  font-size: 26px;
  letter-spacing: 0.4px;
}

.brand-sub {
  color: var(--muted);
  font-size: 14px;
}

.meta-links {
  display: flex;
  gap: 16px;
  font-size: 14px;
}

.meta-links a {
  color: var(--muted);
  text-decoration: none;
}

.layout {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 2fr);
  gap: 32px;
}

.panel {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.panel--intro::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -80px;
  top: 200px;
  border-radius: 50%;
  background: rgba(200, 111, 58, 0.1);
}

.panel--intro h1 {
  font-family: "Fraunces", serif;
  font-size: 32px;
  margin-bottom: 12px;
}

.panel--intro p {
  color: var(--muted);
  line-height: 1.6;
}

.progress-rail {
  margin: 24px 0 16px;
}

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

.progress-fill {
  height: 100%;
  width: 33%;
  background: linear-gradient(90deg, var(--accent), #f0b27e);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.progress-label {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

.intro-points {
  padding-left: 18px;
  color: var(--muted);
  margin-bottom: 24px;
}

.support-card {
  background: #f8f2ea;
  border-radius: 16px;
  padding: 18px;
}

.support-card h2 {
  font-size: 18px;
  margin-bottom: 8px;
}

.support-button {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-size: 14px;
}

.panel--form {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
}

.step {
  animation: fadeInUp 0.4s ease;
}

.step-header h2 {
  font-family: "Fraunces", serif;
  margin-bottom: 6px;
}

.step-header p {
  color: var(--muted);
  margin-top: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #f0e6dc;
  color: #8a6a52;
  min-height: 28px;
}

.badge-inline {
  align-self: flex-start;
  margin-top: 4px;
}

.hidden {
  display: none !important;
}

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

label {
  font-size: 14px;
  font-weight: 600;
}

input,
select {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #d6c9bc;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}

input:focus,
select:focus {
  outline: 2px solid rgba(200, 111, 58, 0.35);
  border-color: var(--accent);
}

input:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(200, 111, 58, 0.5);
  outline-offset: 2px;
}

fieldset {
  border: none;
  padding: 0;
  margin: 0;
  min-width: 0;
}

legend {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.field-help {
  font-size: 12px;
  color: var(--muted);
}

.field-help.strength-weak {
  color: #b7372f;
}

.field-help.strength-medium {
  color: #8a6a52;
}

.field-help.strength-strong {
  color: #2f7d4a;
}

.field-error {
  font-size: 12px;
  color: #b7372f;
  min-height: 16px;
}

.radio-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.radio-group label {
  font-weight: 500;
  display: flex;
  gap: 8px;
  align-items: center;
}

.step-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

button {
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

button.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 20px rgba(200, 111, 58, 0.25);
}

button.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid #d6c9bc;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.legal-hint {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.legal-hint a {
  color: var(--accent-dark);
  text-decoration: none;
}

.status-card {
  text-align: center;
  padding: 40px 20px;
}

.status-actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  box-shadow: 0 12px 20px rgba(200, 111, 58, 0.25);
}

.pulse {
  width: 64px;
  height: 64px;
  margin: 20px auto 0;
  border-radius: 50%;
  background: rgba(200, 111, 58, 0.2);
  animation: pulse 1.6s infinite;
}

.checkmark {
  width: 64px;
  height: 64px;
  margin: 20px auto 0;
  border-radius: 50%;
  background: rgba(47, 125, 74, 0.12);
  display: grid;
  place-items: center;
}

.checkmark-mark {
  width: 30px;
  height: 16px;
  border-left: 4px solid #2f7d4a;
  border-bottom: 4px solid #2f7d4a;
  transform: rotate(-45deg);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.6;
  }
  70% {
    transform: scale(1.05);
    opacity: 0.3;
  }
  100% {
    transform: scale(0.9);
    opacity: 0.6;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pulse,
  .step {
    animation: none;
  }
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

@media (max-width: 600px) {
  .page {
    padding: 24px 4vw 40px;
  }
  .panel {
    padding: 20px;
  }
  .step-actions {
    flex-direction: column;
  }
}
