/* =====================================================================
   VEX · Página pública
   Secciones a todo el ancho con fondos alternos; el contenido vive en un
   contenedor fluido (.wrap) y se reparte en rejillas. Los párrafos conservan
   un ancho de lectura (~65 caracteres). El único gesto de marca es el cubo.
   ===================================================================== */
.landing {
  --gutter: clamp(16px, 4.5vw, 64px);   /* 16–24 px en móvil, 40–64 px en escritorio */
  --wrap-max: 1680px;
  --measure: 56ch;                     /* ≈ 65–72 caracteres reales de Saira por línea */
  --band-y: clamp(2.75rem, 5vw, 4.5rem);
  --nav-h: 64px;                        /* lo actualiza landing.js con la altura real */
}
.landing main { display: block; outline: none; }
html { scroll-padding-top: calc(var(--nav-h, 64px) + 12px); }

.wrap { width: 100%; max-width: var(--wrap-max); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Cabecera ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--canvas); /* opaca: el contenido no se transparenta al pasar por debajo */
  border-bottom: 1px solid transparent; transition: border-color 0.3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__bar { display: flex; align-items: center; gap: 1rem 1.5rem; min-height: 64px; padding-block: 0.5rem; }
.nav__links { display: flex; align-items: center; gap: 0.15rem; margin-right: auto; }
.nav__links a { padding: 0.55rem 0.8rem; border-radius: 10px; text-decoration: none; font-size: 0.95rem; font-weight: 500; color: var(--muted); white-space: nowrap; transition: color 0.2s, background 0.2s; }
.nav__links a:hover, .nav__links a[aria-current="true"] { color: var(--text); background: var(--surface-2); }
.nav__menu-register { display: none; }
.nav__cta { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.nav__menu { display: none; }

/* Apariencia: un botón discreto junto a los accesos de cuenta; el panel se abre bajo él */
@media (max-width: 560px) {
  /* En móvil el panel ocupa el ancho disponible bajo la cabecera, sin empujar ni tapar los accesos */
  .nav__theme .accent { position: static; }
  .appearance__pop { position: absolute; top: calc(100% + 6px); left: var(--gutter); right: var(--gutter); width: auto; }
  .nav__bar { position: relative; }
}

/* Menú móvil: panel superpuesto bajo la barra (no empuja el contenido, así el salto a una sección
   no se desplaza cuando el menú se cierra) */
@media (max-width: 860px) {
  .nav__menu { display: grid; }
  .nav__links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0.1rem; margin: 0;
    padding: 0.5rem var(--gutter) 1rem; background: var(--canvas);
    border-block: 1px solid var(--line); box-shadow: 0 18px 30px -20px rgba(0, 0, 0, 0.35);
  }
  .nav.is-open .nav__links { display: flex; }
  .nav__links a { padding: 0.8rem 0.6rem; font-size: 1rem; }
}
/* En celular: marca, Entrar y menú siempre visibles; "Crear cuenta" pasa al menú */
@media (max-width: 560px) {
  .nav__register { display: none !important; }
  .nav__menu-register:not([hidden]) { display: inline-flex; margin-top: 0.5rem; }
}

/* ---------- Bandas (secciones a todo el ancho) ---------- */
.band { padding-block: var(--band-y); }
.band--alt { background: var(--surface); border-block: 1px solid var(--line); }
:root[data-theme="dark"] .band--alt { background: color-mix(in srgb, var(--surface) 70%, var(--canvas)); }
.band__head { margin-bottom: clamp(1.25rem, 2.5vw, 2rem); }
.band__head h2 { font-size: clamp(1.75rem, 2.6vw, 2.4rem); }
.band__lead { margin-top: 0.6rem; max-width: var(--measure); color: var(--muted); font-size: 1.05rem; line-height: 1.6; }

/* ---------- 1. Presentación ---------- */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero__title { font-size: clamp(2.2rem, 4.4vw, 4rem); max-width: 20ch; }
.hero__title em { display: block; }
.hero__lead { margin-top: 1.1rem; max-width: var(--measure); font-size: clamp(1.05rem, 1.2vw, 1.2rem); line-height: 1.6; color: var(--muted); }
.hero__cta { display: flex; align-items: center; gap: 0.75rem 1.5rem; flex-wrap: wrap; margin-top: 1.75rem; }
.hero__more { font-size: 1rem; }

.promise { position: relative; justify-self: end; width: 100%; max-width: 34rem; padding: clamp(1.4rem, 2.5vw, 2rem); border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.promise__cube { position: absolute; top: 1.25rem; right: 1.25rem; width: 40px; height: 40px; cursor: pointer; }
.promise h2 { font-size: 1.15rem; padding-right: 3rem; }
.promise__list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.75rem; }
.promise__list li { position: relative; padding-left: 1.6rem; color: var(--muted); line-height: 1.5; }
.promise__list li::before { content: ''; position: absolute; left: 0; top: 0.45em; width: 14px; height: 8px; border: solid var(--accent); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.promise__list strong { color: var(--text); font-weight: 600; }
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .promise { justify-self: stretch; max-width: none; }
}

/* ---------- 2. Servicios: tres categorías destacadas ----------
   Tres columnas en tableta y escritorio y una en celular. Filas de igual altura; los nombres se
   muestran completos y parten con guion si hace falta. */
.catalog { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: 1fr; gap: 0.6rem; }
@media (min-width: 640px) { .catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Informativas, sin acción: sin cursor de mano ni efecto al pasar el ratón */
.cat-item { display: grid; align-content: center; gap: 0.2rem; min-height: 64px; padding: 0.75rem 1rem; border-radius: 12px; background: var(--canvas); border: 1px solid var(--line); }
.cat-item h3 { font-size: 0.98rem; line-height: 1.3; hyphens: auto; overflow-wrap: break-word; }
.cat-item p { color: var(--muted); font-size: 0.84rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.catalog__skeleton { grid-column: 1 / -1; display: grid; grid-template-columns: inherit; gap: inherit; }
.catalog__skeleton span { height: 64px; border-radius: 12px; background: var(--surface-2); }
.catalog__msg { grid-column: 1 / -1; display: grid; justify-items: start; gap: 0.75rem; padding: 1.1rem 1.2rem; border-radius: 12px; background: var(--canvas); border: 1px solid var(--line); color: var(--muted); }
.cat-more { display: flex; justify-content: center; margin-top: 1.25rem; }
.cat-more[hidden] { display: none; }
/* Resto del catálogo con candado: lleva a iniciar sesión */
.cat-lock { gap: 0.55rem; white-space: normal; text-align: center; }
.cat-lock .i { flex: none; width: 17px; height: 17px; }
.demo-note, .todo-note { max-width: var(--measure); margin-bottom: 1rem; padding: 0.75rem 1rem; border-radius: 12px; font-size: 0.92rem; background: color-mix(in srgb, var(--warn) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); color: var(--text); }

/* ---------- 3. Cómo funciona ---------- */
.flow { list-style: none; counter-reset: paso; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 3rem); }
.flow li { counter-increment: paso; display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; align-content: start; }
.flow li::before { content: counter(paso); grid-row: span 2; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.flow h3 { font-size: 1.15rem; align-self: center; }
.flow p { color: var(--muted); line-height: 1.6; max-width: 46ch; }
@media (max-width: 760px) { .flow { grid-template-columns: 1fr; } }

/* ---------- 4. Créditos, cancelaciones y respaldo ---------- */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 0.85rem; }
.fact { display: grid; gap: 0.6rem; align-content: start; padding: 1.3rem 1.4rem; border-radius: 14px; background: var(--canvas); border: 1px solid var(--line); }
.fact h3 { font-size: 1.1rem; }
.fact p { color: var(--muted); line-height: 1.6; }
.fact strong { color: var(--text); font-weight: 600; }
.fact a { color: var(--text); text-underline-offset: 3px; }
.fact__value { color: var(--text) !important; font-weight: 600; }
.fact__contact { list-style: none; margin: 0.2rem 0 0; padding: 0; display: grid; gap: 0.3rem; color: var(--muted); }
.fact__contact a { color: var(--text); font-weight: 500; }
@media (min-width: 1200px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- 5. Preguntas frecuentes ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 1rem clamp(2rem, 5vw, 5rem); align-items: start; }
.faq-grid .todo-note { grid-column: 1 / -1; margin: 0.5rem 0 0; }
.faq { max-width: 80ch; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 0.25rem; cursor: pointer; font-weight: 600; list-style: none; border-radius: 8px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: none; width: 9px; height: 9px; margin-right: 4px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform 0.25s var(--ease); }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { padding: 0 0.25rem 1.1rem; color: var(--muted); line-height: 1.6; max-width: var(--measure); }
@media (max-width: 900px) { .faq-grid { grid-template-columns: 1fr; } .faq-grid .band__head { margin-bottom: 0; } }

/* ---------- Pie ----------
   Fondo a todo el ancho y un único contenedor interior (.wrap.footer__inner), el mismo de las secciones:
   la rejilla, la línea divisoria y el copyright comparten exactamente los mismos bordes laterales.
   Escritorio: marca · Información · Proveedores en 2fr 1fr 1fr con 48–64 px entre columnas.
   Tableta y móvil: marca arriba y los dos grupos de enlaces debajo, en dos columnas. */
.footer { background: var(--surface); border-top: 1px solid var(--line); color: var(--muted); font-size: 0.93rem; }
.footer__grid {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(48px, 4.5vw, 64px); row-gap: 2rem; align-items: start;
  padding-block: 2.75rem 2.5rem;                 /* ≈ 44 px arriba, 40 px antes de la línea */
}
/* Todas las columnas empiezan en la misma línea superior: el logo y los títulos quedan alineados */
.footer__col { display: grid; align-content: start; gap: 0.85rem; min-width: 0; }
.footer__brand .brand { align-self: start; justify-self: start; }
.footer__col h2 { font-size: 0.95rem; font-weight: 650; line-height: 1.5; color: var(--text); }
.footer__about { max-width: 400px; line-height: 1.6; }
.footer__operator { font-size: 0.88rem; }
/* Enlaces y botones con el mismo tamaño, peso, interlineado y separación */
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; justify-items: start; }
.footer .link { font: 500 0.93rem/1.5 var(--f-body); color: var(--muted); text-align: left; }
.footer .link:hover { color: var(--text); }
.footer__bottom { padding-block: 1.25rem; border-top: 1px solid var(--line); font-size: 0.85rem; line-height: 1.5; }

@media (max-width: 1023px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; padding-top: 2.5rem; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 599px) {
  /* Dos columnas iguales; un nombre largo puede pasar a dos líneas, siempre completo */
  .footer__grid { column-gap: 24px; row-gap: 1.75rem; padding-block: 2.25rem 2rem; }
  /* Áreas de pulsación cómodas (≥44 px) sin separar el subrayado del texto */
  .footer__col ul { gap: 0; }
  .footer__col li { display: flex; align-items: center; min-height: 44px; }
  .footer__col h2 { margin-bottom: -0.35rem; }
}
@media (max-width: 340px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- Propón tu servicio ----------
   Escritorio: explicación (≈40 %) y formulario (≈60 %). Móvil: una columna, explicación arriba.
   Campos con etiqueta fija encima (.ff), con los mismos radios, bordes y foco que el resto del sistema. */
.propose { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 2rem clamp(2.5rem, 5vw, 5rem); align-items: start; }
.propose__intro { margin-bottom: 0; } /* mismo título que las demás secciones (.band__head h2) */
.propose__intro .band__lead { margin-top: 0.75rem; }
.propose__note { display: flex; align-items: flex-start; gap: 0.55rem; margin-top: 1.25rem; max-width: var(--measure); color: var(--text); font-weight: 500; line-height: 1.5; }
.propose__note .i { width: 18px; height: 18px; margin-top: 0.15em; color: var(--accent); flex: none; }
.propose__card { padding: clamp(1.25rem, 2.5vw, 1.75rem); border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.propose__form, .propose__done { display: grid; gap: 1.1rem; }
.propose__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; align-items: start; }

.ff { display: grid; gap: 0.4rem; align-content: start; min-width: 0; }
.ff > label, .ff__label { font-weight: 600; font-size: 0.92rem; color: var(--text); }
.ff input:not([type="file"]), .ff textarea {
  width: 100%; min-height: 46px; padding: 0.65rem 0.9rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--canvas); color: var(--text);
  font: 500 0.97rem/1.5 var(--f-body); outline: none; resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ff textarea { min-height: 128px; }
.ff input:focus, .ff textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.ff.is-invalid input, .ff.is-invalid textarea, .ff .drop.is-invalid { border-color: var(--bad-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 14%, transparent); }
.ff__hint { color: var(--muted); font-size: 0.84rem; line-height: 1.45; }
.ff .field-error { margin-top: 0; }

/* Archivo: zona de arrastre del sistema; el nombre elegido y "Quitar archivo" van debajo */
.propose .drop { padding: 1.1rem 1rem; background: var(--canvas); }
.propose .drop:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.propose .drop__file { display: none !important; }
.file-picked { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; padding: 0.6rem 0.85rem; border-radius: 12px; background: var(--canvas); color: var(--text); font-size: 0.9rem; }
.file-picked[hidden] { display: none; }
.file-picked .i { width: 18px; height: 18px; color: var(--muted); }
.file-picked__name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.file-picked__remove { font-size: 0.9rem; text-decoration: underline; text-underline-offset: 3px; }

.propose__alert { padding: 0.75rem 1rem; border-radius: 12px; font-size: 0.92rem; line-height: 1.5; color: var(--text); background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent); }
.propose__foot { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 1.25rem; flex-wrap: wrap; padding-top: 0.25rem; }
.propose__legal { color: var(--muted); font-size: 0.86rem; line-height: 1.5; max-width: 38ch; }
.propose__done { justify-items: start; outline: none; padding-block: 0.5rem; }
.propose__done h3 { font-size: 1.2rem; }
.propose__check { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.propose__check .i { width: 22px; height: 22px; }

@media (max-width: 900px) { .propose { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .propose__row { grid-template-columns: 1fr; }
  .propose__foot .btn { width: 100%; }
}

/* =====================================================================
   Modal de acceso
   Escritorio: panel de marca (≈ 38 %) y formulario (≈ 62 %), la misma proporción en entrar y registro.
   Sin alto fijo: el modal crece con su contenido y se desplaza en vertical si no cabe.
   Celular: hoja inferior con una cabecera breve (logo y nombre) y el formulario.
   ===================================================================== */
.auth { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 16px; }
.auth__backdrop { position: absolute; inset: 0; background: var(--scrim); animation: fadeIn 0.3s var(--ease); }
.auth__panel {
  position: relative; width: min(880px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain;
  display: grid; grid-template-columns: minmax(0, 0.62fr) minmax(0, 1fr);
  border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); outline: none;
  animation: authIn 0.3s var(--ease) both;
}
@keyframes authIn { from { opacity: 0; transform: translateY(12px); } }
.auth.is-closing .auth__backdrop { animation: fadeOut 0.25s forwards; }
.auth.is-closing .auth__panel { animation: modalOut 0.25s var(--ease) forwards; }
/* Cerrar: discreto, en la esquina del formulario y fuera del flujo del contenido */
.auth__close { position: absolute; top: 12px; right: 12px; z-index: 3; width: 36px; height: 36px; border-color: transparent; background: transparent; color: var(--muted); }
.auth__close:hover { background: var(--surface-2); color: var(--text); border-color: transparent; box-shadow: none; transform: none; }
.auth__close .i { width: 17px; height: 17px; }

/* ---------- Panel de marca ----------
   Fondo oscuro con el logo real grande, recortado y difuminado (decorativo); encima, el logo nítido,
   la bienvenida del formulario visible y la firma. Una capa degradada asegura el contraste del texto. */
.auth__side {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; gap: 0;
  padding: 1.5rem 1.5rem 1.35rem; margin: 6px; border-radius: 13px;
  background: var(--hero); color: var(--hero-text);
}
.auth__bg {
  position: absolute; z-index: -2; right: -38%; bottom: -14%; width: 120%; height: auto; max-width: none;
  opacity: 0.11; filter: blur(3px); pointer-events: none; user-select: none;
}
.auth__side::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--hero) 72%, transparent) 0%, color-mix(in srgb, var(--hero) 20%, transparent) 55%, color-mix(in srgb, var(--hero) 78%, transparent) 100%);
}
.auth__mark { display: flex; align-items: center; gap: 0.55rem; font: 700 1.05rem/1 var(--f-head); letter-spacing: 0.04em; }
.auth__cube { width: 30px; height: 30px; --logo: #fff; }
.auth__welcome { display: grid; gap: 0.6rem; max-width: 26ch; margin-top: clamp(2rem, 9vh, 4.5rem); }
.auth__welcome [data-for] { display: none; }
.auth__quote { font: 600 1.4rem/1.25 var(--f-head); letter-spacing: -0.01em; text-wrap: balance; }
.auth__sub { font-size: 0.92rem; line-height: 1.55; color: color-mix(in srgb, var(--hero-text) 76%, transparent); }
.auth__side[data-mode="login"] [data-for="login"], .auth__side[data-mode="register"] [data-for="register"],
.auth__side[data-mode="forgot"] [data-for="forgot"], .auth__side[data-mode="reset"] [data-for="reset"],
.auth__side[data-mode="sent"] [data-for="sent"], .auth__side[data-mode="mfa"] [data-for="login"] { display: block; }
.auth__foot { margin-top: auto; padding-top: 2rem; color: color-mix(in srgb, var(--hero-text) 62%, transparent); font-size: 0.8rem; }

/* ---------- Formulario ---------- */
.auth__main { display: flex; flex-direction: column; min-width: 0; padding: 1.75rem clamp(1.25rem, 3.5vw, 2.25rem) 1.75rem; }
.auth__brand { display: none; }

/* Mismo ritmo en entrar, registro, recuperación y nueva contraseña */
.auth__pane { display: grid; gap: 0.95rem; align-content: start; }
.auth__head { display: grid; gap: 0.3rem; padding-right: 2.5rem; margin-bottom: 0.15rem; } /* deja libre la esquina del botón cerrar */
.auth__head h2 { font-size: 1.45rem; }
.auth__head .muted { line-height: 1.5; }
/* "¿No tienes cuenta? Crear cuenta": línea secundaria con un enlace discreto que cambia de formulario */
.auth__switch { margin: 0; font-size: 0.92rem; color: var(--muted); }
.auth__switch-link { padding: 0.15rem 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--text) 35%, transparent); }
.auth__switch-link:hover { text-decoration-color: currentColor; }
.auth__two { display: grid; grid-template-columns: 1fr 1fr; gap: 0.95rem; align-items: start; }
.auth__back { justify-self: start; font-size: 0.9rem; }

/* Campos: mismo alto, borde, radio y foco fino en todos los formularios del modal */
.auth .ff { gap: 0.35rem; }
.auth .ff > label { font-size: 0.9rem; }
.auth .ff input:not([type="file"]) { min-height: 46px; padding-block: 0.6rem; border-radius: 12px; }
.auth .ff input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent); }
:root[data-accent="mono"] .auth .ff input:focus { border-color: var(--text); box-shadow: 0 0 0 2px color-mix(in srgb, var(--text) 14%, transparent); }
.auth .ff.is-invalid input { border-color: var(--bad-text); box-shadow: 0 0 0 2px color-mix(in srgb, var(--bad) 16%, transparent); }
/* Mostrar contraseña: botón cuadrado de 36 px centrado en el campo, a la derecha */
.ff__control { position: relative; }
.ff__control input { padding-right: 3rem !important; }
.ff__control .eye { top: 50%; right: 5px; width: 36px; height: 36px; border-radius: 9px; transform: translateY(-50%); }
/* "¿Olvidaste tu contraseña?": justo bajo el campo, a la derecha, como acción secundaria */
.auth__row { display: flex; justify-content: flex-end; margin-top: -0.55rem; }
.auth__forgot { padding-block: 0.3rem; font-size: 0.86rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--muted) 45%, transparent); }
.auth__forgot:hover { color: var(--text); }

/* Tipo de cuenta (registro): dos opciones neutras; la elegida se marca con borde y fondo, sin color de acento */
.segmented { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label { position: relative; z-index: 1; display: grid; gap: 0.1rem; padding: 0.55rem 0.8rem; border-radius: 10px; border: 1px solid transparent; cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.segmented label strong { font-weight: 600; font-size: 0.9rem; }
.segmented label small { font-size: 0.78rem; color: var(--muted); }
.segmented input:checked + label { background: var(--surface); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
:root[data-theme="dark"] .segmented input:checked + label { background: var(--surface-3); }
.segmented input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.segmented__ink { display: none; }

.prov-note { display: none; padding: 0.6rem 0.8rem; border-radius: 10px; font-size: 0.86rem; background: color-mix(in srgb, var(--warn) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 22%, var(--line)); color: var(--text); }
#registerForm:has(#r-prov:checked) .prov-note { display: block; }
.auth .check { font-size: 0.86rem; line-height: 1.5; }
.auth .check a { color: var(--text); text-underline-offset: 3px; }

/* Botón principal: único, a todo el ancho, con el color del sistema y sin resplandor */
.auth .btn--primary { min-height: 46px; margin-top: 0.15rem; background-image: none; box-shadow: none !important; transform: none !important; }
.auth .btn--primary:hover:not([disabled]) { filter: brightness(1.08); }
.auth .btn--primary[aria-busy="true"] { opacity: 0.8; cursor: progress; }

/* Mensaje general persistente */
.auth__alert { padding: 0.65rem 0.85rem; border-radius: 10px; font-size: 0.88rem; line-height: 1.5; color: var(--text); background: color-mix(in srgb, var(--bad) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--bad) 35%, var(--line)); }
.auth__alert[hidden] { display: none; }

.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 0.1rem; }
.meter span { height: 4px; border-radius: 3px; background: var(--surface-3); transition: background 0.3s; }
.meter em { grid-column: 1 / -1; font-style: normal; font-size: 0.82rem; color: var(--muted); }
.meter[data-score="1"] span:nth-child(-n+1) { background: var(--bad); }
.meter[data-score="2"] span:nth-child(-n+2) { background: var(--warn); }
.meter[data-score="3"] span:nth-child(-n+3) { background: var(--info); }
.meter[data-score="4"] span:nth-child(-n+4) { background: var(--ok); }
.meter[data-score="1"] em::after { content: ' · Débil'; }
.meter[data-score="2"] em::after { content: ' · Regular'; }
.meter[data-score="3"] em::after { content: ' · Buena'; }
.meter[data-score="4"] em::after { content: ' · Excelente'; }

.auth__sent { justify-items: center; text-align: center; padding-top: 1.5rem; }
.sent-check { width: 64px; height: 64px; }
.sent-check circle { fill: var(--accent); }
.sent-check path { fill: none; stroke: var(--on-accent); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }

/* Verificación de Cloudflare: el hueco (65 px, alto del widget) se reserva antes de que cargue.
   El widget conserva su tamaño, sus avisos y sus estados; solo se alinea con los campos. */
.captcha { position: relative; display: grid; gap: 0.45rem; justify-items: start; }
/* "Cargando…" va dentro del hueco del widget, así no cambia la altura del formulario al desaparecer */
.captcha__msg[data-kind="loading"] { position: absolute; inset: 0 0 auto; height: 73px; justify-content: center; align-items: center; pointer-events: none; }
.captcha[hidden] { display: none; }
.captcha__widget { width: 100%; min-height: 73px; border-radius: 10px; background: var(--surface-2); } /* 65 px del widget + franja de aviso de la clave de prueba */
.captcha__widget:has(iframe) { background: none; }
.captcha__msg { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; font-size: 0.86rem; line-height: 1.45; color: var(--muted); }
.captcha__msg[hidden] { display: none; }
.captcha__msg[data-kind="error"], .captcha__msg[data-kind="missing"] { color: var(--bad-text); font-weight: 500; }
.captcha__retry { font-size: 0.86rem; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.auth__lock { color: var(--text); font-weight: 500; padding: 0.6rem 0.8rem; border-radius: 10px; background: color-mix(in srgb, var(--warn) 10%, var(--surface)); }

/* Celular: hoja inferior a todo el ancho, sin panel de marca; cabecera breve con logo y nombre */
@media (max-width: 760px) {
  .auth { padding: 0; align-items: end; }
  .auth__panel { grid-template-columns: 1fr; width: 100%; border-radius: 18px 18px 0 0; max-height: 94dvh; }
  .auth__side { display: none; }
  .auth__main { padding: 1rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom)); }
  .auth__brand { display: flex; align-items: center; gap: 0.5rem; min-height: 36px; margin-bottom: 0.9rem; padding-right: 2.75rem; font: 700 1.05rem/1 var(--f-head); letter-spacing: 0.04em; }
  .auth__brand-mark { width: 24px; height: 24px; }
  .auth__close { top: 10px; right: 10px; }
  .auth__head { padding-right: 0; }
  .auth__two { grid-template-columns: 1fr; }
}

:root[data-motion="reduced"] :is(.auth__panel, .auth__backdrop) { animation-name: fadeIn !important; }
