/* Mismos colores que la app «Calcula tu Grati» */
:root {
  --rojo: #b3122b;
  --rojo-suave: #ffdada;
  --verde: #0b7a3e;
  --verde-suave: #d5f5df;
  --fondo: #fff8f7;
  --texto: #1a1111;
  --gris: #5c4f4f;
  --borde: #e6d6d5;
  --radio: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--texto);
  background: var(--fondo);
  line-height: 1.55;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--rojo); }
img { max-width: 100%; }

.cabecera { background: var(--rojo); color: #fff; }
.cabecera .contenedor { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: .8rem; }
.marca { color: #fff; font-weight: 800; font-size: 1.15rem; text-decoration: none; }
.cabecera nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.cabecera nav a { color: #fff; text-decoration: none; opacity: .9; }
.cabecera nav a[aria-current="page"] { opacity: 1; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }

.contenedor { width: min(100% - 2rem, 760px); margin-inline: auto; }

h1 { font-size: clamp(1.6rem, 5vw, 2.2rem); line-height: 1.2; margin: 1.5rem 0 .5rem; }
.bajada { color: var(--gris); margin-top: 0; }

.tarjeta { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 1.25rem; margin-block: 1.25rem; }

form { display: grid; gap: 1rem; }
.campo { display: grid; gap: .35rem; }
.fila-2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
label, .etiqueta { font-weight: 600; }
.ayuda { color: var(--gris); font-size: .9rem; font-weight: 400; }
input, select { font: inherit; padding: .7rem .8rem; border: 1px solid #c9b8b7; border-radius: 10px; background: #fff; width: 100%; }
input:focus-visible, select:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--rojo); outline-offset: 2px; }
.check { display: flex; gap: .6rem; align-items: center; font-weight: 600; }
.check input { width: 1.3rem; height: 1.3rem; accent-color: var(--rojo); }

details { border: 1px dashed #c9b8b7; border-radius: 10px; padding: .6rem .8rem; }
summary { cursor: pointer; font-weight: 600; }
.variables { width: 100%; border-collapse: collapse; margin-top: .6rem; }
.variables th { text-align: left; font-size: .85rem; color: var(--gris); font-weight: 600; padding-bottom: .3rem; }
.variables td { padding: .25rem .3rem .25rem 0; }
.variables input, .variables select { padding: .5rem; }

button[type="submit"] { font: inherit; font-weight: 700; font-size: 1.05rem; padding: .9rem; border: 0; border-radius: 999px; background: var(--rojo); color: #fff; cursor: pointer; }
button[type="submit"]:hover { filter: brightness(1.1); }

.resultado { outline: none; }
.resultado h2 { margin-top: 0; font-size: 1.2rem; }
.total { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem; background: var(--verde-suave); color: var(--verde); border-radius: 10px; padding: .8rem 1rem; margin: 0 0 1rem; font-weight: 600; }
.total strong { font-size: 1.8rem; }
.detalle { width: 100%; border-collapse: collapse; }
.detalle td { padding: .45rem 0; border-bottom: 1px solid var(--borde); }
.detalle .monto { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.detalle .dato { color: var(--gris); font-size: .95rem; }
.notas { color: var(--gris); font-size: .92rem; padding-left: 1.1rem; }
.error { color: var(--rojo); font-weight: 600; margin: 0; }
.boton-app { display: block; text-align: center; background: var(--verde); color: #fff; text-decoration: none; font-weight: 700; padding: .8rem; border-radius: 999px; }
.privacidad { font-size: .9rem; color: var(--gris); text-align: center; margin: .5rem 0 0; }

.contenido h2 { font-size: 1.3rem; margin-top: 2rem; }
.contenido .formula { background: #fff; border-left: 4px solid var(--rojo); padding: .8rem 1rem; border-radius: 0 10px 10px 0; }
.ejemplo td, .ejemplo th { padding: .4rem .6rem; border-bottom: 1px solid var(--borde); text-align: left; }
.ejemplo td:last-child, .ejemplo th:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ejemplo { border-collapse: collapse; width: 100%; background: #fff; }

.tarjetas-inicio { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.tarjetas-inicio a { display: block; background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 1.2rem; text-decoration: none; color: var(--texto); }
.tarjetas-inicio a:hover { border-color: var(--rojo); }
.tarjetas-inicio strong { display: block; color: var(--rojo); font-size: 1.15rem; margin-bottom: .3rem; }

.pie { margin-top: 3rem; padding-block: 1.5rem; border-top: 1px solid var(--borde); color: var(--gris); font-size: .88rem; }
.pie a { color: var(--gris); }
