:root {
  --fondo: #f6f7f4;
  --papel: #ffffff;
  --tinta: #1c2421;
  --suave: #55615c;
  --linea: #d5dbd6;
  --verde: #0b6b4f;
  --verde-oscuro: #084d39;
  --aviso: #fff6d9;
  --aviso-borde: #d9b84a;
  --rojo: #9c2b1c;
}

* {
  box-sizing: border-box;
}

html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--tinta);
  background: var(--fondo);
}

body {
  margin: 0;
}

header.sitio {
  background: var(--verde-oscuro);
  color: #ffffff;
}

header.sitio .ancho {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}

header.sitio a {
  color: #ffffff;
  text-decoration: none;
}

header.sitio a:hover,
header.sitio a:focus {
  text-decoration: underline;
}

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

nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.92rem;
}

.ancho {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1rem;
}

main {
  padding: 1.5rem 0 2.5rem;
}

main.texto .ancho {
  max-width: 46rem;
}

h1 {
  font-size: 1.8rem;
  line-height: 1.2;
  margin: 0 0 0.6rem;
}

h2 {
  font-size: 1.3rem;
  margin: 2rem 0 0.5rem;
}

h3 {
  font-size: 1.08rem;
  margin: 1.4rem 0 0.4rem;
}

p {
  margin: 0 0 0.9rem;
}

a {
  color: var(--verde);
}

.entrada {
  color: var(--suave);
  font-size: 1.05rem;
}

.tarjeta {
  background: var(--papel);
  border: 1px solid var(--linea);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  margin: 1.2rem 0;
}

.aviso {
  background: var(--aviso);
  border: 1px solid var(--aviso-borde);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  font-size: 0.93rem;
  margin: 1rem 0;
}

.fuente {
  color: var(--suave);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.alerta {
  background: #fde8e4;
  border: 1px solid var(--rojo);
  color: var(--rojo);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  font-weight: 600;
}

.tabla-scroll {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.93rem;
  background: var(--papel);
}

caption {
  text-align: left;
  font-weight: 600;
  padding: 0.4rem 0;
}

th,
td {
  border: 1px solid var(--linea);
  padding: 0.4rem 0.55rem;
  text-align: left;
  vertical-align: middle;
}

thead th {
  background: #e9eeea;
  font-size: 0.85rem;
}

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

tr.fuera td,
tr.fuera th {
  background: #fde8e4;
}

input[type="number"],
input[type="text"],
input[type="date"],
input[type="password"],
select {
  font: inherit;
  padding: 0.35rem 0.45rem;
  border: 1px solid #9aa5a0;
  border-radius: 5px;
  background: #ffffff;
  color: var(--tinta);
  max-width: 100%;
}

td input[type="number"] {
  width: 9.5rem;
}

button,
.boton {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--verde);
  border-radius: 6px;
  background: var(--verde);
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.boton:hover {
  background: var(--verde-oscuro);
}

button.secundario {
  background: #ffffff;
  color: var(--verde);
  font-weight: 500;
  padding: 0.3rem 0.6rem;
}

button.secundario:hover {
  background: #e9eeea;
}

button:disabled {
  opacity: 0.55;
  cursor: default;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #e0a100;
  outline-offset: 2px;
}

.resultados {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.7rem;
  margin: 1rem 0;
}

.dato {
  background: var(--papel);
  border: 1px solid var(--linea);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
}

.dato .etiqueta {
  display: block;
  color: var(--suave);
  font-size: 0.82rem;
}

.dato .valor {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

meter {
  width: 100%;
  height: 1.1rem;
}

.fila {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.7rem 1rem;
  margin: 0.8rem 0;
}

.campo {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.9rem;
}

.campo.linea {
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
}

.estado {
  min-height: 1.5rem;
  font-weight: 600;
}

.estado.error,
.error {
  color: var(--rojo);
}

.lista-clara li {
  margin-bottom: 0.35rem;
}

footer.sitio {
  border-top: 1px solid var(--linea);
  background: var(--papel);
  padding: 1.2rem 0 2rem;
  font-size: 0.88rem;
  color: var(--suave);
}

footer.sitio ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
  list-style: none;
  margin: 0 0 0.8rem;
  padding: 0;
}

[hidden] {
  display: none;
}

@media (max-width: 40rem) {
  html {
    font-size: 16px;
  }

  h1 {
    font-size: 1.5rem;
  }

  td input[type="number"] {
    width: 7.5rem;
  }
}
