/* Herramientas gratuitas de librealos30.com (09/11/2026): mismo estilo que /nieve/ y el blog. Sin registro y sin guardar nada. */
:root {
  --azul: #0068c6; --azul-osc: #00529e; --azul-suave: #e6f1fb; --tinta: #10233a; --suave: #5f6f82; --linea: #dfe7f0; --fondo: #f4f7fb;
  --verde: #0b7a5c; --verde-suave: #e3f4ee; --ambar: #a15c00; --ambar-suave: #fff3df; --rojo: #b3261e; --rojo-suave: #fdecea;
  --radio: 20px; --sombra: 0 1px 2px rgba(16, 35, 58, .05), 0 12px 32px rgba(16, 35, 58, .08);
}
* { box-sizing: border-box; margin: 0; }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--tinta); background: var(--fondo); line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
[hidden] { display: none !important; }
.ancho { max-width: 1080px; margin: 0 auto; padding: 0 24px; width: 100%; }
.azul { color: var(--azul); }
h1 { font-size: clamp(1.9rem, 4.6vw, 2.8rem); line-height: 1.08; letter-spacing: -.025em; font-weight: 800; }
h2 { font-size: 1.45rem; line-height: 1.2; letter-spacing: -.015em; font-weight: 800; }
.antetitulo { color: var(--suave); font-size: .82rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 12px; }
.sub { color: var(--suave); font-size: 1.12rem; max-width: 36em; margin-top: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--azul); color: #fff; font: inherit; font-weight: 700; font-size: 1.02rem; padding: 13px 24px; border: 0; border-radius: 999px; cursor: pointer; text-decoration: none; transition: background .15s, transform .15s; }
.btn:hover { background: var(--azul-osc); transform: translateY(-1px); }
.btn.sec { background: #fff; color: var(--azul); border: 1px solid var(--linea); }
.btn.sec:hover { border-color: var(--azul); background: #fff; }
.btn.blanco { background: #fff; color: var(--tinta); }
.btn.blanco:hover { background: var(--azul-suave); }

header { padding: 16px 0; }
header .ancho { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
header .logo { height: 50px; width: auto; }
header nav a { font-weight: 700; text-decoration: none; margin-left: 18px; font-size: .95rem; }
header nav a:hover, header nav a.activo { color: var(--azul); }
main { flex: 1; padding: 8px 0 56px; }
.migas { font-size: .88rem; color: var(--suave); margin: 4px 0 18px; }
.migas a { text-decoration: none; } .migas a:hover { color: var(--azul); }
.cabeza { max-width: 760px; margin-bottom: 28px; }

/* La herramienta: datos a la izquierda, resultado a la derecha (en el móvil, uno debajo del otro) */
.herramienta { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 22px; align-items: start; }
.caja { background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); padding: 24px; }
.caja + .caja { margin-top: 16px; }
.caja h2 { font-size: 1.08rem; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.caja h2 small { font-weight: 600; color: var(--suave); font-size: .82rem; }
.campos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.campos .entero { grid-column: 1 / -1; }
.campo { display: grid; gap: 6px; font-size: .9rem; font-weight: 700; align-content: start; }
.campo small { display: block; font-weight: 400; color: var(--suave); font-size: .8rem; margin-top: 1px; }
.entrada { display: flex; align-items: center; border: 1px solid var(--linea); border-radius: 12px; background: #fff; overflow: hidden; }
.entrada:focus-within { outline: 2px solid var(--azul); outline-offset: 1px; border-color: transparent; }
.entrada input { font: inherit; font-weight: 500; color: var(--tinta); border: 0; outline: 0; padding: 11px 12px; width: 100%; min-width: 0; background: transparent; font-size: 1rem; }
.entrada i { font-style: normal; color: var(--suave); padding-right: 12px; font-weight: 600; }
select, input[type=date], input[type=month] { font: inherit; font-weight: 500; font-size: 1rem; color: var(--tinta); width: 100%; padding: 11px 12px; border: 1px solid var(--linea); border-radius: 12px; background: #fff; }
select:focus, input[type=date]:focus, input[type=month]:focus { outline: 2px solid var(--azul); outline-offset: 1px; border-color: transparent; }
.opciones { display: flex; flex-wrap: wrap; gap: 8px; }
.opciones label { cursor: pointer; }
.opciones input { position: absolute; opacity: 0; pointer-events: none; }
.opciones span { display: inline-block; padding: 9px 14px; border: 1px solid var(--linea); border-radius: 999px; font-weight: 600; font-size: .92rem; background: #fff; }
.opciones input:checked + span { background: var(--azul); border-color: var(--azul); color: #fff; }
.opciones input:focus-visible + span { outline: 2px solid var(--azul); outline-offset: 2px; }
.casilla { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: .92rem; cursor: pointer; }
.casilla input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--azul); }
.borrar { background: none; border: 0; font: inherit; color: var(--suave); font-size: .88rem; text-decoration: underline; cursor: pointer; margin-top: 14px; padding: 0; }

.resultado { position: sticky; top: 16px; }
.resultado .vacio { color: var(--suave); }
.principal { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.res { background: var(--azul-suave); border-radius: 16px; padding: 16px; }
.res span { display: block; font-size: .82rem; font-weight: 700; color: var(--suave); }
.res b { display: block; font-size: 1.7rem; letter-spacing: -.02em; line-height: 1.15; margin-top: 4px; }
.res em { display: block; font-style: normal; font-size: .82rem; color: var(--suave); margin-top: 4px; }
.res.solo { grid-column: 1 / -1; }
.res.verde { background: var(--verde-suave); } .res.verde b { color: var(--verde); }
.res.ambar { background: var(--ambar-suave); } .res.ambar b { color: var(--ambar); }
.res.rojo { background: var(--rojo-suave); } .res.rojo b { color: var(--rojo); }
.lineas { list-style: none; padding: 0; margin-top: 16px; font-size: .95rem; }
.lineas li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--linea); }
.lineas li:last-child { border-bottom: 0; }
.lineas li b { white-space: nowrap; }
.lineas li.total { font-weight: 800; border-top: 2px solid var(--tinta); border-bottom: 0; }
.aviso { font-size: .86rem; color: var(--suave); margin-top: 14px; }
.alerta { background: var(--ambar-suave); color: #5c3a00; border-radius: 14px; padding: 12px 14px; font-size: .92rem; margin-top: 14px; }
.alerta.azul { background: var(--azul-suave); color: var(--tinta); }

/* La versión completa en LIBRES */
.libres { margin-top: 40px; background: var(--tinta); color: #fff; border-radius: 24px; padding: 32px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.libres .marca { width: 52px; height: 52px; border-radius: 13px; margin-bottom: 14px; }
.libres h2 { font-size: 1.6rem; }
.libres p { color: #c9d6e3; margin: 10px 0 16px; }
.libres ul { list-style: none; padding: 0; display: grid; gap: 9px; margin-bottom: 22px; }
.libres li { padding-left: 28px; position: relative; color: #e6edf5; }
.libres li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--azul); color: #fff; font-size: .75rem; font-weight: 800; display: grid; place-items: center; }
.libres .gratis { display: block; font-size: .85rem; color: #9fb3c8; margin-top: 10px; }
.libres figure { border-radius: 16px; overflow: hidden; box-shadow: 0 12px 40px rgba(0, 0, 0, .35); background: #fff; }
.libres figcaption { font-size: .82rem; color: #9fb3c8; text-align: center; margin-top: 8px; }

/* Texto de ayuda debajo (SEO) */
.texto { max-width: 760px; margin-top: 48px; font-size: 1.06rem; line-height: 1.7; }
.texto > * + * { margin-top: 1em; }
.texto h2 { margin-top: 1.8em; }
.texto h3 { font-size: 1.12rem; margin-top: 1.4em; }
.texto a { color: var(--azul); font-weight: 600; }
.texto ul, .texto ol { padding-left: 1.3em; } .texto li + li { margin-top: .35em; }
.texto table { width: 100%; border-collapse: collapse; font-size: .96rem; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--sombra); }
.texto th, .texto td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--linea); vertical-align: top; }
.texto th { background: var(--azul-suave); font-size: .88rem; }
.texto tr[id] { scroll-margin-top: 16px; }
.texto tr:target td { background: var(--ambar-suave); }
.texto details { background: #fff; border-radius: 14px; padding: 14px 18px; box-shadow: var(--sombra); }
.texto details + details { margin-top: 10px; }
.texto summary { font-weight: 700; cursor: pointer; }
.texto details p { margin-top: 8px; color: #33465c; }
.formula { background: #fff; border-left: 4px solid var(--azul); padding: 14px 18px; border-radius: 0 14px 14px 0; font-weight: 600; }

.otras { margin-top: 48px; }
.otras h2 { margin-bottom: 16px; }
.rejilla { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.rejilla.tres { grid-template-columns: repeat(3, 1fr); }
.tarjeta { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: 22px; text-decoration: none; transition: border-color .15s, transform .15s; }
a.tarjeta:hover { border-color: var(--azul); transform: translateY(-2px); }
.tarjeta .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--azul-suave); color: var(--azul); display: grid; place-items: center; margin-bottom: 12px; }
.tarjeta .ico svg { width: 24px; height: 24px; }
.tarjeta h3 { font-size: 1.08rem; letter-spacing: -.01em; margin-bottom: 6px; }
.tarjeta p { color: var(--suave); flex: 1; font-size: .94rem; }
.tarjeta em { font-style: normal; font-weight: 700; color: var(--azul); margin-top: 14px; font-size: .92rem; }

footer { padding: 24px 0; color: var(--suave); font-size: .88rem; }
footer .ancho { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
footer a { text-decoration: none; } footer a:hover { color: var(--azul); }

@media (max-width: 900px) {
  .herramienta, .libres { grid-template-columns: 1fr; }
  .resultado { position: static; }
  .rejilla, .rejilla.tres { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  header .logo { height: 40px; }
  header nav a { margin-left: 12px; font-size: .9rem; }
  .caja { padding: 18px; }
  .campos { grid-template-columns: 1fr; }
  .principal { grid-template-columns: 1fr 1fr; }
  .res b { font-size: 1.4rem; }
  .libres { padding: 24px; border-radius: 20px; }
  .rejilla, .rejilla.tres { grid-template-columns: 1fr; }
  .texto table.apilable thead { display: none; }
  .texto table.apilable, .texto table.apilable tbody, .texto table.apilable tr, .texto table.apilable td { display: block; width: 100%; }
  .texto table.apilable tr { padding: 10px 0; border-bottom: 1px solid var(--linea); }
  .texto table.apilable td { border: 0; padding: 3px 14px; }
  .texto table.apilable td::before { content: attr(data-t) ": "; font-weight: 700; color: var(--suave); font-size: .85rem; }
  .texto table.apilable td:first-child::before { content: none; }
  .texto table.apilable td:first-child { font-weight: 800; }
}
@media print {
  header nav, .libres, .otras, footer, .borrar, .no-imprimir { display: none !important; }
  body { background: #fff; }
  .caja { box-shadow: none; border: 1px solid var(--linea); }
}
