:root {
  color-scheme: light;
  --ink: #143044;
  --deep: #0e2433;
  --pine: #0c6b58;
  --pine-dark: #095646;
  --foam: #e7f0ec;
  --line: #d7e4de;
  --muted: #3e5a62;
  --wa: #128c7e;
  --amber: #8a5a12;
  --amber-bg: #fff6e8;
  --card: #ffffff;
  --shadow: 0 16px 40px rgba(16, 36, 51, 0.08);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Lexend, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(900px 280px at 100% -10%, rgba(18, 140, 126, 0.16), transparent 60%),
    var(--foam);
  padding-bottom: 2rem;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  background: white;
  color: var(--ink);
  padding: 0.6rem 1rem;
  border-radius: 0.8rem;
}

.skip:focus { top: 1rem; }

button, input, textarea, select { font: inherit; color: inherit; }

button { cursor: pointer; }

a { color: var(--pine-dark); }

.shell {
  width: min(46rem, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  background:
    radial-gradient(900px 180px at 100% -20%, rgba(47, 181, 140, 0.45), transparent 55%),
    radial-gradient(700px 200px at -10% 130%, rgba(70, 140, 196, 0.38), transparent 50%),
    var(--deep);
  color: white;
  padding: 1.15rem 0 1.35rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.logo {
  width: 3rem;
  height: 3rem;
  flex: none;
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
}

.brand p {
  margin: 0.15rem 0 0;
  color: #d5ebe4;
  font-size: 0.98rem;
}

.main { padding-top: 1.25rem; }

.ask-card {
  margin-top: 0.35rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1.7rem;
  padding: 1.2rem 1.15rem 1.15rem;
  box-shadow: var(--shadow);
}

.ask-label {
  display: block;
  font-size: clamp(1.35rem, 4.4vw, 1.95rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.question {
  display: block;
  width: 100%;
  min-height: 8.25rem;
  margin-top: 0.9rem;
  padding: 0.95rem 1rem;
  resize: vertical;
  border: 2px solid #c5d6ce;
  border-radius: 1.15rem;
  background: #fbfefd;
  font-size: 1.125rem;
  line-height: 1.45;
}

.question:focus {
  border-color: var(--pine);
  outline: none;
  box-shadow: 0 0 0 4px rgba(12, 107, 88, 0.15);
}

.btn-primary,
.btn-wa,
.btn-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.5rem;
  margin-top: 0.85rem;
  border-radius: 1rem;
  border: 0;
  font-size: 1.125rem;
  font-weight: 650;
  text-decoration: none;
  text-align: center;
}

.btn-primary { background: var(--pine); color: white; }
.btn-primary:disabled { opacity: 0.72; cursor: wait; }
.btn-wa { background: var(--wa); color: white; gap: 0.55rem; }
.btn-ghost {
  background: white;
  color: var(--ink);
  border: 2px solid var(--line);
}

.section-title {
  margin: 1.45rem 0 0.7rem;
  font-size: 1.12rem;
  font-weight: 650;
}

.suggestions {
  display: grid;
  gap: 0.75rem;
}

.suggestion {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  min-height: 4.4rem;
  padding: 0.75rem 0.9rem;
  text-align: left;
  background: white;
  border: 1.5px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: 0 8px 22px rgba(16, 36, 51, 0.04);
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.3;
}

.suggestion-icon {
  width: 3rem;
  height: 3rem;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 0.95rem;
  background: #e7f3ee;
  color: var(--pine-dark);
}

.hint {
  margin: 1rem 0 0;
  color: var(--muted);
}

#respuesta { margin-top: 1.2rem; scroll-margin-top: 0.75rem; }

.answer-card,
.step,
.share-note,
.closing,
.notice {
  background: white;
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  box-shadow: 0 10px 28px rgba(16, 36, 51, 0.05);
}

.answer-card { padding: 1.15rem 1.1rem 1.2rem; }

.kicker {
  margin: 0;
  color: var(--pine-dark);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.answer-title {
  margin: 0.3rem 0 0;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.summary, .fine-print, .help, .legal { color: var(--muted); }

.summary { margin: 0.55rem 0 0; font-size: 1.08rem; }

.progress-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: baseline;
  margin-top: 1rem;
}

.progress-row p { margin: 0; font-weight: 650; }

.text-btn {
  border: 0;
  background: transparent;
  color: var(--pine-dark);
  font-weight: 650;
  padding: 0.2rem;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.bar {
  height: 0.7rem;
  margin-top: 0.45rem;
  background: #c5ddd3;
  border-radius: 999px;
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #12866a, #1aa37a);
  border-radius: inherit;
}

.steps {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.step { padding: 1rem 1rem 0.9rem; }

.step.is-done {
  background: #f3faf6;
  border-color: #b7e0cf;
}

.step-kicker {
  margin: 0;
  color: var(--pine-dark);
  font-size: 0.92rem;
  font-weight: 700;
}

.step h3 {
  margin: 0.2rem 0 0;
  font-size: 1.22rem;
  line-height: 1.3;
}

.step .detail {
  margin: 0.4rem 0 0;
  font-size: 1.06rem;
}

.badge-caption {
  margin: 0.85rem 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.25rem 0.75rem 0.25rem 0.28rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-weight: 650;
  font-size: 0.98rem;
  line-height: 1.2;
}

.chip-icon {
  width: 2rem;
  height: 2rem;
  padding: 0.28rem;
  border-radius: 0.7rem;
  background: white;
}

.chip-gear { background: #eef2f4; border-color: #d5dee4; color: #243848; }
.chip-smart { background: #fff6df; border-color: #f0ddaa; color: #8a5a12; }
.chip-privacy { background: #f3eefe; border-color: #ddd4f5; color: #5b4b8a; }
.chip-bell { background: #e7f1fb; border-color: #c9dff3; color: #1d5f99; }
.chip-siren { background: #fdeceb; border-color: #f6d0cc; color: #9f2d24; }
.chip-share, .chip-toggle { background: #e7f6f1; border-color: #c6e6da; color: #0c6b58; }
.chip-sensitivity { background: #eef6e8; border-color: #d0e4c4; color: #3d6b2f; }
.chip-home, .chip-phone, .chip-me { background: #eef2f4; border-color: #d5dee4; color: #243848; }
.chip-camera { background: #e7f1fb; border-color: #c9dff3; color: #1d5f99; }
.chip-clock { background: #fff6df; border-color: #f0ddaa; color: #8a5a12; }

.check {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.9rem;
  min-height: 3.15rem;
  padding: 0.4rem 0.75rem;
  border-radius: 0.95rem;
  border: 2px solid #c5d6ce;
  background: #f7fbf9;
  font-weight: 700;
}

.check input {
  width: 1.4rem;
  height: 1.4rem;
  accent-color: var(--pine);
}

.step.is-done .check {
  border-color: var(--pine);
  background: #e5f6ee;
  color: var(--pine-dark);
}

.notice {
  margin: 0 0 0.8rem;
  padding: 0.85rem 1rem;
  background: var(--amber-bg);
  border-color: #f0ddaa;
  color: #5c4316;
  box-shadow: none;
}

.share-note, .closing { margin-top: 0.85rem; padding: 1rem 1rem 1.05rem; }

.share-note { background: var(--amber-bg); border-color: #f0ddaa; }

.share-note h3, .closing h3 {
  margin: 0;
  font-size: 1.08rem;
}

.share-note p, .closing > p { margin: 0.4rem 0 0; }

.fine-print { margin: 0.85rem 0 0; font-size: 0.95rem; }

.actions {
  display: grid;
  gap: 0.15rem;
  margin-top: 0.35rem;
}

.banner {
  margin-top: 0.9rem;
  padding: 0.8rem 0.9rem;
  border-radius: 1rem;
  background: #fff6e8;
  color: #5c4316;
  border: 1px solid #f0ddaa;
}

.banner strong { display: block; }

.site-footer {
  width: min(46rem, calc(100% - 2rem));
  margin: 1.6rem auto 0;
  padding-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer p { margin: 0.25rem 0; }

.site-footer a { font-weight: 700; }

.page-wa { margin-top: 1rem; }

.toast {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 40;
  width: min(36rem, calc(100% - 2rem));
  margin-inline: auto;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  background: var(--deep);
  color: white;
  box-shadow: var(--shadow);
}

dialog.config {
  flex-direction: column;
  width: min(36rem, calc(100% - 1.25rem));
  max-height: min(92vh, 50rem);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(14, 36, 51, 0.28);
}

dialog.config[open] {
  display: flex;
}

dialog.config::backdrop { background: rgba(14, 36, 51, 0.62); }

.config-body {
  overflow: auto;
  padding: 1.15rem 1.15rem 0.4rem;
}

.config-body h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.field { display: block; margin-top: 0.95rem; }

.field span, .check-field span { display: block; font-weight: 700; margin-bottom: 0.35rem; }

.field input, .field select {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.65rem 0.85rem;
  border: 2px solid #c5d6ce;
  border-radius: 0.9rem;
  background: white;
  font-size: 1rem;
}

.field input::placeholder,
.question::placeholder {
  color: #7d928c;
}

.help { margin: 0.4rem 0 0; font-size: 0.95rem; }

.check-field {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-top: 1rem;
  padding: 0.8rem;
  border: 2px solid var(--line);
  border-radius: 1rem;
  background: #f7fbf9;
}

.check-field input { width: 1.35rem; height: 1.35rem; margin-top: 0.2rem; accent-color: var(--pine); }

.check-field span { margin: 0; }

.dialog-actions {
  display: grid;
  gap: 0.15rem;
  flex: none;
  margin-top: 0;
  padding: 0.85rem 1.15rem 1.15rem;
  background: white;
  border-top: 1px solid var(--line);
}

.icon { width: 1.6rem; height: 1.6rem; display: block; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.loading-bars { display: grid; gap: 0.65rem; margin-top: 1rem; }

.loading-bar {
  height: 4.1rem;
  border-radius: 1rem;
  background: linear-gradient(90deg, #e7f0ec, #f7fbf9, #e7f0ec);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--pine);
  outline-offset: 3px;
}

@media (hover: hover) {
  .btn-primary:hover { background: var(--pine-dark); }
  .btn-wa:hover { background: #0e756a; }
  .suggestion:hover { border-color: #8fbfb0; }
}

@media (min-width: 768px) {
  .suggestions { grid-template-columns: 1fr 1fr; }
  .ask-card { padding: 1.5rem; }
  .config-body { padding: 1.35rem 1.35rem 0.4rem; }
  .actions { grid-template-columns: 1fr 1fr; }
  .dialog-actions { grid-template-columns: 1.35fr 1.45fr 0.8fr; }
  .actions .btn-wa,
  .actions .btn-ghost { margin-top: 0.85rem; }
  .dialog-actions .btn-primary,
  .dialog-actions .btn-ghost {
    min-height: 3rem;
    margin-top: 0;
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .loading-bar { animation: none; }
  .btn-primary:active { transform: none; }
}
