/*
 * buscador-centros-datos: page styles, brand-neutral.
 *
 * Only semantic variables (--c-*, --f-*, --w-*, --lh-*, --ls-*, --link-*,
 * --button-*, --deco-*, --radius*) are used here. Each brand defines them in
 * static/brands/<brand>/brand.css (served as static/brand/brand.css), mapped
 * from its kit tokens; contrast notes live there.
 */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-text);
  font-weight: 400;
  font-size: 1.125rem; /* 18px, the base of simbiotica.coop */
  line-height: 1.6;
  overflow-wrap: break-word;
}

h1,
h2 {
  font-family: var(--f-title);
  font-weight: var(--w-title);
  letter-spacing: var(--ls-title);
  line-height: var(--lh-title);
}

h3,
h4,
h5,
h6 {
  font-family: var(--f-text);
  font-weight: 700;
  line-height: var(--lh-subtitle);
}

strong,
b {
  font-weight: 700;
}

code,
pre,
kbd {
  font-family: var(--f-mono);
  font-size: 0.9em;
}

a {
  color: var(--c-link);
  text-decoration: underline 1px var(--c-link-underline);
  text-underline-offset: var(--link-offset);
}

a:hover {
  background: var(--c-link-hover-bg);
  color: var(--c-link-hover);
  text-decoration-color: var(--c-link-hover-underline);
  text-decoration-thickness: var(--link-hover-thickness);
}

a:active {
  background: none;
  color: var(--c-link-active);
}

[hidden] {
  display: none !important;
}

img {
  max-width: 100%;
  height: auto;
}

/* Focus: always visible, accent ring. */
:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
}

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

/* Brand mark before h2 (Simbiótica: "_Título"), hidden from screen readers. */
.guion::before {
  content: var(--deco-heading);
  content: var(--deco-heading) / "";
  color: var(--c-deco);
}

/* Layout ------------------------------------------------------------------ */

.cabecera,
.principal,
.pie__contenido {
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.principal {
  flex: 1 0 auto;
  padding-bottom: 3rem;
}

.principal--ancho {
  max-width: 80rem;
}

.cabecera {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.cabecera__contenido {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.cabecera__volver {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.cabecera__volver::before {
  content: var(--deco-back);
  content: var(--deco-back) / "";
  font-family: var(--f-mono);
  color: var(--c-deco);
  white-space: pre;
}

h1 {
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem);
  margin: 1rem 0 0.75rem;
}

h2 {
  font-size: 1.35rem;
  margin: 2.25rem 0 0.75rem;
}

h3 {
  font-size: 1.1rem;
  margin: 1.25rem 0 0.5rem;
}

.antetitulo {
  font-family: var(--f-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--c-meta);
  margin: 1rem 0 0;
}

/* "Beta" badge next to the site name (h1 of the search page, .antetitulo
   elsewhere). Accent text on the surface colour: Simbiótica aquamarine on deep
   blue (> 7.6), Aljibe turquoise-text on white (5.20). */
.beta {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.25em;
  padding: 0.05em 0.55em;
  border: 1px solid var(--c-accent-border);
  border-radius: var(--radius-pill);
  background: var(--c-surface);
  color: var(--c-accent-text);
  font-family: var(--f-mono);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.5;
  white-space: nowrap;
}

h1 .beta {
  vertical-align: 0.4em;
}

/* Links that open in a new tab (common.js newTab): an arrow after the text,
   hidden from screen readers (they read the hidden hint instead); inline-block
   so the underline does not run under it. */
.enlace-pestana::after {
  content: "\2197";
  content: "\2197" / "";
  display: inline-block;
  margin-left: 0.15em;
  font-size: 0.8em;
  line-height: 1;
}

.entradilla {
  font-size: 1.15rem;
  max-width: 42rem;
  margin: 0 0 1.5rem;
}

.texto-largo p,
.texto-largo li {
  max-width: 42rem;
}

.texto-largo li + li {
  margin-top: 0.35rem;
}

/* Language selector --------------------------------------------------------- */

.idiomas {
  display: inline-flex;
  gap: 0.25rem;
  margin-left: auto;
}

.idiomas__boton {
  min-height: 44px;
  min-width: 44px;
  padding: 0.25rem 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--c-text);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.idiomas__boton:hover {
  text-decoration: underline 1px;
  text-underline-offset: 2px;
}

.idiomas__boton[aria-pressed="true"] {
  border-color: var(--c-accent);
  color: var(--c-accent-text);
}

/* Buttons and form controls -------------------------------------------------- */

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5em 1.25em;
  border: 2px solid var(--c-button-border);
  border-radius: var(--radius);
  background: var(--c-button-bg);
  color: var(--c-button-text);
  font-family: var(--f-text);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: var(--button-spacing);
  text-transform: var(--button-case);
  cursor: pointer;
  text-decoration: none;
}

.boton:hover {
  border-color: var(--c-button-hover-border);
  text-decoration: underline 1px;
  text-underline-offset: 2px;
}

.boton:active {
  background: var(--c-button-active-bg);
}

.boton:disabled {
  cursor: progress;
  opacity: 0.7;
}

.boton--secundario,
.boton--secundario:active {
  background: transparent;
  color: var(--c-accent-text);
}

.boton--peligro,
.boton--peligro:hover,
.boton--peligro:active {
  background: transparent;
  border-color: var(--c-error);
  color: var(--c-error);
}

/* A button that reads as a link (footer). */
.enlace-boton {
  padding: 0;
  border: 0;
  background: none;
  color: var(--c-link);
  font: inherit;
  text-decoration: underline 1px var(--c-link-underline);
  text-underline-offset: var(--link-offset);
  cursor: pointer;
}

.enlace-boton:hover {
  text-decoration-thickness: var(--link-hover-thickness);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-input-bg);
  color: var(--c-text);
  font: inherit;
  font-size: 1.05rem;
  line-height: 1.5;
}

textarea {
  resize: vertical;
}

input:focus-visible,
textarea:focus-visible {
  border-color: var(--c-accent);
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--c-error);
}

input[type="checkbox"] {
  width: 1.4rem;
  height: 1.4rem;
  margin: 0.15rem 0 0;
  flex: 0 0 auto;
  accent-color: var(--c-accent);
}

input[type="checkbox"][aria-invalid="true"] {
  outline: 2px solid var(--c-error);
  outline-offset: 2px;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.nota {
  font-weight: 400;
  color: var(--c-muted);
  font-size: 0.95rem;
}

/* Password rules (cuenta): a checklist; each rule shows a mark and, for
   screen readers, its state in words, so the state is not only a colour. */
.reglas {
  margin: -0.5rem 0 1rem;
}

.reglas .nota {
  margin: 0 0 0.25rem;
}

.reglas__lista {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
}

.regla {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.regla__marca {
  flex: 0 0 1.1em;
  text-align: center;
  font-family: var(--f-mono);
}

.regla--cumplida .regla__marca {
  color: var(--c-accent-text);
}

.regla--pendiente {
  color: var(--c-muted);
}

.campo {
  margin-bottom: 1rem;
}

.campo--casilla {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.campo--casilla label {
  font-weight: 400;
  margin: 0;
}

/* Honeypot: out of sight and out of the tab order. */
.campo-trampa {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.nota-privacidad {
  font-size: 0.95rem;
  padding: 0.75rem;
  border-left: 3px solid var(--c-accent);
  background: var(--c-accent-tint);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.nota-privacidad__titulo {
  font-size: 1rem;
  margin: 0 0 0.4rem;
}

.nota-privacidad__lista {
  margin: 0 0 0.5rem;
  padding-left: 1.1rem;
}

.nota-privacidad__lista li + li {
  margin-top: 0.25rem;
}

.nota-privacidad p {
  margin: 0;
}

.error {
  color: var(--c-error);
  font-weight: 700;
  margin: 0.5rem 0;
}

.error:empty {
  display: none;
}

.exito {
  font-weight: 700;
  color: var(--c-accent-text);
}

/* Question box ------------------------------------------------------------ */

.pregunta__etiqueta {
  font-size: 1.05rem;
}

.pregunta__pie {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-top: 0.5rem;
}

.pregunta__ayuda {
  margin: 0;
  flex: 1 1 14rem;
  font-size: 0.95rem;
  color: var(--c-muted);
}

.pregunta__pie .boton {
  flex: 0 0 auto;
  min-width: 8rem;
}

/* Example questions ----------------------------------------------------------- */

.ejemplos__titulo {
  font-size: 1rem;
  margin: 1.5rem 0 0.5rem;
}

.ejemplos__lista {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ejemplos__boton {
  min-height: 44px;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--c-accent-border);
  border-radius: var(--radius);
  background: var(--c-accent-tint);
  color: var(--c-text);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.ejemplos__boton:hover {
  border-color: var(--c-accent);
  background: var(--c-accent-tint-strong);
}

/* Status, waiting, notices --------------------------------------------------- */

.estado {
  margin: 1.5rem 0 0;
  color: var(--c-meta);
  font-family: var(--f-mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.estado:empty {
  display: none;
}

.aviso {
  margin: 0.5rem 0 1rem;
  padding: 0.6rem 0.8rem;
  border-left: 3px solid var(--c-warn);
  background: var(--c-warn-tint);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
}

.espera {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--c-muted);
  margin: 0.5rem 0;
}

/* Waiting indicator: a sliding toggle (Simbiótica's symbol) in the accent colour. */
.espera__punto {
  position: relative;
  flex: 0 0 auto;
  width: 2.4rem;
  height: 1.2rem;
  border-radius: var(--radius-pill);
  background: var(--c-accent);
}

.espera__punto::after {
  content: "";
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: var(--c-on-accent);
  animation: deslizar 1.2s ease-in-out infinite alternate;
}

@keyframes deslizar {
  to {
    transform: translateX(1.2rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .espera__punto::after {
    animation: none;
  }
}

/* Brand animation (brand.json "loader": an SVG of the brand folder, moved by
   the brand's CSS), with no visible caption (its status text is .solo-lectores). */
.espera--marca {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.espera__figura {
  display: block;
  width: 15rem;
  max-width: 100%;
  height: auto;
}

/* Question asked ("Pregunta"), above the answer. */
.consulta {
  margin-top: 1.5rem;
}

.consulta__titulo {
  margin: 0 0 0.35rem;
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--c-meta);
}

.consulta__texto {
  margin: 0;
  padding-left: 0.9rem;
  border-left: 3px solid var(--c-accent-border);
  font-size: 1.15rem;
  white-space: pre-line;
}

/* Answer ------------------------------------------------------------------- */

.bloque {
  background: var(--c-surface);
  border-radius: var(--radius-large);
  padding: 0.25rem 1.25rem 1rem;
  margin-top: 1rem;
}

.bloque > h2:first-child {
  margin-top: 1rem;
}

.respuesta {
  border-left: 4px solid var(--c-accent);
}

.respuesta__texto p {
  margin: 0.5rem 0 0.75rem;
}

.respuesta__lista {
  margin: 0.5rem 0 0.75rem;
  padding-left: 1.25rem;
}

.cita {
  font-family: var(--f-mono);
  font-size: 0.85em;
  white-space: nowrap;
}

.respuesta__falta {
  padding: 0.6rem 0.8rem;
  border-left: 3px solid var(--c-warn);
  background: var(--c-warn-tint);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.respuesta__subtitulo {
  margin-top: 1.25rem;
}

.respuesta__aviso {
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--c-line);
  color: var(--c-muted);
  font-size: 0.95rem;
}

.respuesta__no-encontrado {
  font-weight: 700;
  font-size: 1.1rem;
}

.cercanos {
  margin-top: 1.25rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--c-line);
}

.enlaces {
  margin: 0.25rem 0 0;
  padding-left: 0;
  list-style: none;
}

ul.enlaces {
  padding-left: 1.25rem;
  list-style: disc;
}

.enlaces li {
  margin: 0.4rem 0;
}

.numero {
  font-family: var(--f-mono);
  font-size: 0.85em;
  color: var(--c-accent-text);
}

/* Results -------------------------------------------------------------------- */

.resultados__lista {
  list-style: none;
  margin: 0;
  padding: 0;
}

.resultado {
  padding: 0.75rem 0 1rem;
  border-top: 1px solid var(--c-line);
}

.resultado__titulo {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.resultado__migas {
  margin: 0 0 0.35rem;
  font-family: var(--f-mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--c-meta);
}

.resultado__extracto {
  margin: 0;
  font-size: 1rem;
}

/* Reranker score, discreet. */
.resultado__relacion {
  margin: 0.35rem 0 0;
  font-family: var(--f-mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--c-meta);
}

mark {
  background: var(--c-mark);
  color: var(--c-mark-text);
  border-radius: 2px;
  padding: 0 0.1em;
}

/* Access page ------------------------------------------------------------------ */

.formulario {
  max-width: 32rem;
}

.bloque.formulario {
  padding-top: 1rem;
}

.solicitud {
  margin-top: 2rem;
}

/* Dialogs ---------------------------------------------------------------------- */

.dialogo {
  width: min(36rem, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-large);
  background: var(--c-dialog-bg);
  color: var(--c-text);
  overflow: auto;
}

.dialogo::backdrop {
  background: var(--c-backdrop);
}

.dialogo__cuerpo {
  padding: 1.25rem 1.25rem 1.5rem;
}

.dialogo__cuerpo > h2 {
  margin-top: 0.5rem;
}

.dialogo__logo {
  display: block;
  width: 200px; /* above both kits' minimum (Simbiótica 140px, Aljibe 90px) */
  height: auto;
  margin: 1.25rem 0 1.5rem;
}

.dialogo__legal {
  font-size: 0.9rem;
  color: var(--c-muted);
}

.dialogo__acciones {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* Footer ---------------------------------------------------------------------- */

.pie {
  flex: 0 0 auto;
  background: var(--c-footer-bg);
  color: var(--c-footer-text);
  font-size: 0.95rem;
  padding: 1.25rem 0 1.5rem;
}

.pie a,
.pie .enlace-boton {
  color: var(--c-link-on-dark);
  text-decoration-color: var(--c-link-on-dark-underline);
}

.pie a:hover,
.pie .enlace-boton:hover {
  color: var(--c-link-on-dark-hover);
  background: var(--c-link-on-dark-hover-bg);
  text-decoration-color: var(--c-link-on-dark-underline);
}

.pie a:active,
.pie .enlace-boton:active {
  background: none;
  color: var(--c-link-on-dark);
}

.pie p {
  margin: 0 0 0.5rem;
}

.pie__enlaces {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0.75rem 0 0;
  padding: 0;
}

.pie__enlaces li {
  display: flex;
  align-items: center;
  min-height: 44px;
}

/* Admin ----------------------------------------------------------------------- */

.admin-barra {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0;
}

.admin-resumen {
  margin: 0.5rem 0;
}

.admin-resumen__fila {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--c-line-faint);
}

.admin-resumen dt {
  flex: 0 0 18rem;
  max-width: 100%;
  color: var(--c-muted);
}

.admin-resumen dd {
  margin: 0;
  flex: 1 1 12rem;
  overflow-wrap: anywhere;
}

.tabla-desplazable {
  position: relative; /* keeps absolutely positioned hidden texts (new-tab hints) inside the scroller */
  max-width: 100%;
  overflow-x: auto;
  border-radius: var(--radius);
}

.tabla {
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 100%;
}

.tabla th,
.tabla td {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--c-line-soft);
  text-align: left;
  vertical-align: top;
}

.tabla thead th {
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--c-meta);
}

.tabla tbody th,
.tabla tfoot th {
  font-weight: 700;
  white-space: nowrap;
}

.tabla tfoot td,
.tabla tfoot th {
  border-top: 2px solid var(--c-border);
  font-weight: 700;
}

.tabla .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tabla__lista {
  margin: 0;
  padding-left: 1rem;
  min-width: 22rem;
}

.tabla__ruta {
  display: block;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--c-meta);
  white-space: normal;
}

.solicitudes {
  list-style: none;
  margin: 0;
  padding: 0;
}

.solicitud-admin__motivo {
  white-space: pre-wrap;
}

body[data-page="admin"] .cabecera,
body[data-page="admin"] .pie__contenido {
  max-width: 80rem;
}

/* Personal accounts (2026-10-22) ------------------------------------------------- */

/* A link that looks like a button (admin "Abrir en mi correo"): keeps the
   button colours on hover instead of the link ones. */
a.boton,
a.boton:hover,
a.boton:active {
  background: var(--c-button-bg);
  color: var(--c-button-text);
  text-decoration: none;
}

a.boton:hover {
  border-color: var(--c-button-hover-border);
  text-decoration: underline 1px;
  text-underline-offset: 2px;
}

.acceso__acciones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.campo > .nota {
  margin: 0.35rem 0 0;
}

.entrega {
  border-left: 3px solid var(--c-accent);
}

.entrega input[readonly] {
  font-family: var(--f-mono);
  font-size: 0.9rem;
}

.cuenta-admin__estado {
  font-weight: 700;
}

.cuenta-admin__estado--suspended {
  color: var(--c-error);
}

/* Unusual-use signals: shown, never acted on automatically. */
.senales {
  margin: 0.5rem 0;
  padding: 0.5rem 0.75rem;
  border-left: 3px solid var(--c-warn);
  background: var(--c-warn-tint);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.senales ul {
  margin: 0.25rem 0 0;
  padding-left: 1.25rem;
}

.admin-barra--acciones {
  gap: 0.5rem;
}

.admin-barra--acciones .boton {
  min-height: 40px;
  padding: 0.35em 0.9em;
  font-size: 0.95rem;
}

#cuenta-privacidad {
  margin-top: 1.5rem;
}

a.boton--secundario,
a.boton--secundario:hover,
a.boton--secundario:active {
  background: transparent;
  color: var(--c-accent-text);
}
