:root {
  --bg-1: #0b0f17;
  --bg-2: #0d121f;
  --bg-3: #090d14;

  --surface-1: #101725;
  --surface-2: #0f1624;
  --line-soft: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.12);

  --text: rgba(255, 255, 255, 0.92);
  --text-dim: rgba(229, 231, 235, 0.78);
  --text-muted: rgba(156, 163, 175, 0.9);

  --primary: #3b82f6;
  --primary-2: #2e63d8;
  --accent: #ff6a3d;
  --accent-2: #ff845f;

  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --glow: 0 0 24px rgba(59, 130, 246, 0.22);

  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 12px;

  --focus: 0 0 0 4px rgba(59, 130, 246, 0.25);
}

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

html {
  scroll-behavior: smooth;
  /* Fuerza controles nativos (select, opciones) en tema oscuro — evita texto blanco sobre lista blanca */
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: radial-gradient(1000px 520px at 50% -10%, rgba(59, 130, 246, 0.12), transparent 60%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  padding: 10px 12px;
  background: var(--surface-1);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  z-index: 999;
}
.skip-link:focus {
  left: 12px;
  outline: none;
  box-shadow: var(--focus);
}

.container {
  width: min(700px, calc(100% - 32px));
  margin: 0 auto;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.page-header {
  padding: 42px 0 18px;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}

.lang-switch {
  display: grid;
  gap: 6px;
  justify-items: end;
  align-content: start;
}

.lang-switch select {
  width: auto;
  min-width: 180px;
}

#languageLabel {
  text-align: right;
}

#logo-container {
  width: auto;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#logo-container img {
  display: block;
  max-height: 32px;
  width: auto;
}

.hero {
  margin-top: 18px;
}

.title {
  margin: 0;
  font-size: clamp(28px, 4.2vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.subtitle {
  margin: 12px 0 0;
  font-size: 16px;
  color: var(--text-dim);
}

.note {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.main {
  padding: 14px 0 60px;
}

.card {
  background: linear-gradient(145deg, var(--surface-1) 0%, var(--surface-2) 100%);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-head {
  padding: 18px 18px 0;
}

.card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

.card-body {
  padding: 18px;
}

.progress {
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 14px;
}

.progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.progress-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(59, 130, 246, 0.22);
  background: rgba(59, 130, 246, 0.1);
}

.progress-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 12px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  box-shadow: var(--glow);
  transition: width 260ms ease;
}

.progress-hint {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.form-section {
  display: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 240ms ease, transform 240ms ease;
}
.form-section.is-active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.section-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 16px;
}

.section-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.section-desc {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.col-span-2 {
  grid-column: 1 / -1;
}

@media (min-width: 720px) {
  .field-grid {
    grid-template-columns: 1fr 1fr;
  }
}

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

.label {
  font-weight: 600;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
}

.mini-label {
  font-weight: 500;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
}

.req {
  color: rgba(255, 255, 255, 0.7);
  margin-left: 4px;
}

input,
select,
textarea {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.92);
  padding: 12px 12px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

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

input::placeholder,
textarea::placeholder {
  color: rgba(229, 231, 235, 0.5);
  font-weight: 300;
}

select {
  color-scheme: dark;
  appearance: none;
  background-color: rgba(255, 255, 255, 0.06);
  background-image: linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.55) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.55) 50%, transparent 50%),
    linear-gradient(to right, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08));
  background-position: calc(100% - 18px) 18px, calc(100% - 12px) 18px, calc(100% - 40px) 0.6em;
  background-size: 6px 6px, 6px 6px, 1px 1.8em;
  background-repeat: no-repeat;
  padding-right: 44px;
}

/* Listas desplegables: sin esto, en Chrome/Safari/VPS el popup puede ser claro y el texto queda ilegible */
select option,
select optgroup {
  background-color: #101725;
  color: rgba(255, 255, 255, 0.95);
}

select option:disabled {
  color: rgba(156, 163, 175, 0.95);
  background-color: #0d121f;
}

select option:checked {
  background-color: rgba(59, 130, 246, 0.35);
  color: #fff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: var(--focus);
  background: rgba(255, 255, 255, 0.04);
}

.help {
  margin: 0;
  font-size: 12px;
  color: rgba(156, 163, 175, 0.9);
}

.error {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 140, 140, 0.95);
  min-height: 16px;
}

.fieldset {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px;
  background: rgba(0, 0, 0, 0.08);
}

.mini-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 720px) {
  .mini-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.radio-stack,
.check-grid {
  display: grid;
  gap: 10px;
}

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

@media (min-width: 720px) {
  .check-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color 160ms ease, transform 140ms ease, background 160ms ease;
  user-select: none;
}

.choice:hover {
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.06);
}

.choice:active {
  transform: translateY(1px);
}

.choice input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
}

.inline-followup {
  padding: 10px 10px 0;
  margin-top: -2px;
}

.nav {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.08);
  transition: transform 140ms ease, background 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
}

.btn:focus {
  outline: none;
  box-shadow: var(--focus);
}

.btn:active {
  transform: translateY(1px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.10);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn-secondary {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}
.btn-secondary:hover {
  background: rgba(59, 130, 246, 0.2);
  box-shadow: var(--glow);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border-color: rgba(255, 106, 61, 0.4);
  color: rgba(0, 0, 0, 0.88);
}
.btn-accent:hover {
  filter: saturate(1.05);
  box-shadow: 0 12px 40px rgba(255, 106, 61, 0.22);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.fineprint {
  margin: 12px 0 0;
  font-size: 12px;
  color: rgba(156, 163, 175, 0.9);
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: rgba(0, 0, 0, 0.65);
  display: none;
  animation: spin 0.9s linear infinite;
}

.is-loading .spinner {
  display: inline-block;
}
.is-loading .btn-label {
  opacity: 0.95;
}

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

.form-toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 28px));
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(16, 23, 37, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.form-toast.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(-2px);
}

.confirmation {
  padding: 8px 2px 2px;
}

.confirm-title {
  margin: 6px 0 0;
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: 26px;
}

.confirm-text {
  margin: 10px 0 0;
  color: var(--text-dim);
  white-space: pre-line;
}

.confirm-sign {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
}

.confirm-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-start;
}

.hidden {
  display: none !important;
}

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