/* Estilos compartidos por todas las calculadoras. Mobile-first (360 px). */
:root {
  --fondo: #f7f7f4;
  --superficie: #ffffff;
  --texto: #1d1f1e;
  --suave: #5b605d;
  --borde: #d9dbd6;
  --acento: #1f6f54;
  --acento-texto: #ffffff;
  --aviso: #fff6dc;
  --aviso-borde: #e6c96a;
  --error: #b3261e;
  --radio: 10px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #121413;
    --superficie: #1b1e1c;
    --texto: #ecefec;
    --suave: #a6aca8;
    --borde: #333835;
    --acento: #5fc39c;
    --acento-texto: #0b1a14;
    --aviso: #2b2611;
    --aviso-borde: #7a6826;
    --error: #ff8a80;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fondo); color: var(--texto);
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.contenedor { max-width: 640px; margin: 0 auto; padding: 0 16px 48px; }
header.sitio { padding: 14px 16px; border-bottom: 1px solid var(--borde); background: var(--superficie); }
header.sitio a { color: var(--texto); text-decoration: none; font-weight: 700; }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 24px 0 8px; }
h2 { font-size: 1.25rem; margin: 32px 0 8px; }
.bajada { color: var(--suave); margin: 0 0 20px; }
a { color: var(--acento); }

.tarjeta { background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); padding: 16px; margin: 16px 0; }
fieldset { border: 0; padding: 0; margin: 0 0 16px; }
legend, label { display: block; font-weight: 600; margin-bottom: 6px; }
.ayuda { display: block; font-weight: 400; color: var(--suave); font-size: 0.9rem; margin-top: 2px; }
.campo { margin-bottom: 16px; }
input[type="text"], input[type="date"] {
  width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: inherit;
  background: var(--fondo); border: 1px solid var(--borde); border-radius: 8px;
}
input:focus-visible, summary:focus-visible, button:focus-visible { outline: 3px solid var(--acento); outline-offset: 2px; }
.opciones { display: grid; gap: 8px; }
.opciones label {
  display: flex; align-items: center; gap: 10px; min-height: 48px; margin: 0; padding: 10px 12px;
  border: 1px solid var(--borde); border-radius: 8px; font-weight: 500; cursor: pointer;
}
.opciones input { width: 20px; height: 20px; accent-color: var(--acento); }
details { margin: 8px 0 16px; }
summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; color: var(--acento); }
.boton {
  width: 100%; min-height: 52px; border: 0; border-radius: 8px; font: inherit; font-weight: 700;
  background: var(--acento); color: var(--acento-texto); cursor: pointer;
}
.boton[disabled] { opacity: 0.55; cursor: not-allowed; }

#resultado { scroll-margin-top: 12px; }
table.rubros { width: 100%; border-collapse: collapse; }
.rubros th, .rubros td { padding: 10px 0; border-bottom: 1px solid var(--borde); vertical-align: top; }
.rubros th { text-align: left; font-weight: 500; padding-right: 12px; }
.rubros th small { display: block; color: var(--suave); font-size: 0.8rem; font-weight: 400; }
.rubros td { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rubros td.neg { color: var(--error); }
.rubros tfoot th, .rubros tfoot td { font-weight: 800; font-size: 1.1rem; border-bottom: 0; padding-top: 14px; }
.avisos { padding-left: 18px; color: var(--suave); font-size: 0.95rem; }
.error { color: var(--error); font-weight: 600; margin: 0; }
.aviso-legal { background: var(--aviso); border: 1px solid var(--aviso-borde); border-radius: var(--radio); padding: 12px 14px; font-size: 0.9rem; }
.aviso-legal p { margin: 0 0 6px; }
.aviso-legal p:last-child { margin: 0; }
.cta h2 { margin-top: 0; }
.faq details { border-bottom: 1px solid var(--borde); margin: 0; padding: 4px 0; }
.faq summary { color: var(--texto); }
.faq p { margin: 4px 0 12px; }
h3 { font-size: 1.05rem; margin: 24px 0 6px; }
blockquote { margin: 12px 0; padding: 8px 14px; border-left: 4px solid var(--acento); background: var(--superficie); font-style: italic; }
footer { color: var(--suave); font-size: 0.85rem; margin-top: 40px; }
