/* Institutional palette. Teal and orange don't reach AA contrast with white text,
   so they are used for accents and borders; text and buttons use slate. */
:root {
  --teal: #00A499;
  --naranja: #E77500;
  --pizarra: #394049;
  --morado: #8C4799;
  --azul: #498BCA;
  --amarillo: #EAAA00;
  --rojo: #C8102E;
  --texto: #22272d;
  --texto-suave: #4d5560;
  --fondo: #f4f5f6;
  --superficie: #ffffff;
  --borde: #c9cdd2;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--fondo);
  color: var(--texto);
  font: 1rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.ancho { width: 100%; max-width: 64rem; margin: 0 auto; padding: 0 1rem; }
main { flex: 1; padding-top: 2rem; padding-bottom: 3rem; }

h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 .5rem; text-wrap: balance; }
h2 { font-size: 1.15rem; margin: 2rem 0 .5rem; }
a { color: var(--pizarra); text-underline-offset: .15em; }
a:hover { color: #000; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; overflow-wrap: anywhere; }

:focus-visible { outline: 3px solid var(--morado); outline-offset: 2px; }

.saltar { position: absolute; left: -999rem; background: var(--superficie); padding: .5rem 1rem; }
.saltar:focus { left: .5rem; top: .5rem; z-index: 10; }

.banda-pruebas { margin: 0; padding: .4rem 1rem; text-align: center; background: var(--amarillo); color: #1d2126; }

.cabecera { background: var(--pizarra); color: #fff; border-bottom: .3rem solid var(--teal); }
.cabecera-fila { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-top: .75rem; padding-bottom: .75rem; }
.marca { color: #fff; font-weight: 700; font-size: 1.1rem; text-decoration: none; }
.marca:hover { color: #fff; text-decoration: underline; }
.cabecera-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; }
.cabecera-nav a { color: #fff; }
.cabecera-nav form { margin: 0; }
.cabecera-usuario { font-weight: 600; }
.cabecera :focus-visible { outline-color: var(--amarillo); }

.pie { border-top: 1px solid var(--borde); padding: 1rem 0; color: var(--texto-suave); font-size: .9rem; }

.bajada { color: var(--texto-suave); max-width: 44rem; margin-top: 0; }
.nota { color: var(--texto-suave); font-size: .9rem; }
.aviso { background: var(--superficie); border-left: .3rem solid var(--azul); padding: .75rem 1rem; max-width: 44rem; }
.error { color: var(--rojo); font-weight: 600; }

.boton {
  display: inline-block;
  min-height: 2.75rem;
  padding: .6rem 1.1rem;
  border: 2px solid var(--pizarra);
  border-radius: .35rem;
  background: var(--pizarra);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.boton:hover { background: #22272d; border-color: #22272d; color: #fff; }
.boton-secundario { background: var(--superficie); color: var(--pizarra); }
.boton-secundario:hover { background: #e6e8ea; color: var(--pizarra); border-color: var(--pizarra); }
.boton-claro { min-height: 0; padding: .3rem .8rem; background: transparent; border-color: #fff; }
.boton-claro:hover { background: #fff; color: var(--pizarra); border-color: #fff; }
.boton-ancho { display: block; width: 100%; margin-top: .75rem; }
.boton:disabled { background: #e6e8ea; border-color: var(--borde); color: var(--texto-suave); cursor: not-allowed; }

.tarjeta { background: var(--superficie); border: 1px solid var(--borde); border-top: .3rem solid var(--teal); border-radius: .35rem; padding: 1.5rem; }
.tarjeta-acceso { max-width: 28rem; margin: 0 auto; }
.tarjeta section + section { border-top: 1px solid var(--borde); margin-top: 1.5rem; }
.tarjeta h2 { margin-top: 1.25rem; }

.campo { margin-top: .75rem; }
.campo label { display: block; font-weight: 600; margin-bottom: .25rem; }
.campo input { width: 100%; min-height: 2.75rem; padding: .5rem .65rem; border: 1px solid #6b7480; border-radius: .35rem; font: inherit; color: var(--texto); background: #fff; }

.mosaico { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.modulo { display: flex; flex-direction: column; background: var(--superficie); border: 1px solid var(--borde); border-top: .3rem solid var(--pizarra); border-radius: .35rem; padding: 1rem 1.25rem 1.25rem; }
.modulo h2 { margin: 0 0 .25rem; }
.modulo p { margin: 0 0 1rem; color: var(--texto-suave); flex: 1; }
.modulo-teal { border-top-color: var(--teal); }
.modulo-naranja { border-top-color: var(--naranja); }
.modulo-morado { border-top-color: var(--morado); }
.modulo-azul { border-top-color: var(--azul); }
.modulo-amarillo { border-top-color: var(--amarillo); }
.etiqueta { align-self: flex-start; padding: .15rem .6rem; border: 1px solid var(--borde); border-left: .3rem solid var(--naranja); border-radius: .2rem; font-size: .85rem; font-weight: 600; background: var(--fondo); }

.tabla-ancha { overflow-x: auto; background: var(--superficie); border: 1px solid var(--borde); border-radius: .35rem; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; vertical-align: top; padding: .55rem .85rem; border-bottom: 1px solid var(--borde); }
tbody tr:last-child td { border-bottom: 0; }
th { background: var(--fondo); font-size: .9rem; }

.datos { display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: .35rem 1.5rem; margin: 0; }
.datos dt { font-weight: 600; }
.datos dd { margin: 0; }
.datos ul { margin: 0; padding-left: 1.1rem; }
@media (max-width: 32rem) {
  .datos { grid-template-columns: 1fr; }
  .datos dd { margin-bottom: .5rem; }
}
