:root {
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --shadow: 0 10px 30px rgba(2, 6, 23, .08);

  --blue: #0b4ea2;
  /* institucional */
  --blue-2: #0a3f86;
  --mint: #2dd4bf;
  /* menta suave */
  --mint-2: #14b8a6;

  --radius: 16px;
  --radius2: 22px;

  --container: 1100px;
  --pad: 20px;

  --font: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none
}

a:focus {
  outline: 2px solid rgba(45, 212, 191, .6);
  outline-offset: 3px
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.muted {
  color: var(--muted)
}

.note,
.disclaimer {
  color: var(--muted);
  font-size: .95rem
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: .2px;
}

.brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--blue), var(--mint));
  box-shadow: 0 6px 16px rgba(11, 78, 162, .18);
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  font-size: .95rem;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 12px;
}

.nav a:hover {
  color: var(--text);
  background: #f8fafc;
}

.nav-cta {
  border: 1px solid var(--border);
  background: #ffffff;
}

.hero {
  padding: 44px 0 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 22px;
  align-items: start;
}

.hero-copy h1 {
  margin: 0 0 10px;
  font-size: 2.15rem;
  line-height: 1.15;
  letter-spacing: -.2px;
}

.subtitle {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1.05rem;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0 14px;
}

/* ==== Form controls: nunca desbordar en móvil ==== */
input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* ==== Coeficientes (items dinámicos): evitar desbordes en móvil ==== */
#coefItems {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  /* si algo es más ancho, hace scroll dentro */
  -webkit-overflow-scrolling: touch;
}

/* Si derrama.js/cuotas.js pinta una tabla dentro de #coefItems */
#coefItems table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  /* evita que una columna fuerce el ancho */
  border-collapse: collapse;
}

#coefItems * {
  max-width: 100%;
}


#coefItems th,
#coefItems td {
  overflow-wrap: anywhere;
  /* rompe textos largos */
  word-break: break-word;
}


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(2, 6, 23, .04);
  transition: filter .15s ease, box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}

.btn:hover {
  filter: brightness(0.95);
  box-shadow: 0 0 0 3px rgba(0, 180, 160, 0.15);
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 180, 160, 0.35);
}


.btn.primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  border-color: transparent;
  color: #fff;
}

.btn.primary:hover {
  filter: brightness(.98);
}

.btn.ghost {
  background: rgba(45, 212, 191, .10);
  border-color: rgba(45, 212, 191, .35);
  color: var(--text);
}

.btn.small {
  padding: 9px 12px;
  border-radius: 12px;
  font-size: .95rem;
}

.hero-bullets {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.hero-bullets li {
  margin: 6px 0
}

.hero-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: var(--shadow);
}

.panel-title {
  margin: 0 0 12px;
  font-size: 1.05rem;
  letter-spacing: .1px;
}

.panel-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-link {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 12px;
  background: #fff;
}

.panel-link:hover {
  border-color: #cbd5e1;
}

.panel-link-title {
  display: block;
  font-weight: 700;
  margin-bottom: 2px;
}

.panel-link-desc {
  display: block;
  color: var(--muted);
  font-size: .95rem;
}

.section {
  padding: 34px 0;
}

.section-alt {
  background: #f8fafc;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  display: block;
  margin-bottom: 24px;
}

.section-head h1,
.section-head h2 {
  margin: 0 0 10px;
  letter-spacing: -.1px;
}

.section-head h1 {
  font-size: 2.15rem;
  line-height: 1.15;
  letter-spacing: -.2px;
}

.section-head h2 {
  font-size: 1.45rem;
}

.section-head p {
  margin: 0;
  max-width: 760px;
  line-height: 1.65;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: 16px;
  background: #fff;
  box-shadow: 0 4px 20px rgba(2, 6, 23, .04);
  min-height: 140px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.card-cta {
  display: inline-block;
  margin-top: 12px;
  font-weight: 700;
  color: var(--blue);
}

.two-col {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
  align-items: start;
}

.list-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.list-link {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  background: #fff;
}

.list-link:hover {
  border-color: #cbd5e1
}

.list-title {
  display: block;
  font-weight: 800;
  margin-bottom: 2px;
}

.list-desc {
  display: block;
  color: var(--muted);
}

.callout {
  border: 1px solid rgba(45, 212, 191, .35);
  background: rgba(45, 212, 191, .10);
  border-radius: var(--radius2);
  padding: 16px;
}

.callout h3 {
  margin: 0 0 10px
}

.callout p {
  margin: 0 0 12px;
  color: var(--muted)
}

.site-footer {
  padding: 28px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr .7fr .7fr;
  gap: 18px;
}

.footer-col h4 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.footer-col a {
  display: block;
  color: var(--muted);
  padding: 6px 0;
}

.footer-col a:hover {
  color: var(--text)
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr
  }

  .grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .two-col {
    grid-template-columns: 1fr
  }

  .footer-grid {
    grid-template-columns: 1fr
  }

  .nav {
    display: none
  }

  /* limpio en móvil; luego añadimos menú si quieres */
}

@media (max-width: 560px) {
  .grid {
    grid-template-columns: 1fr
  }

  .hero-copy h1 {
    font-size: 1.8rem
  }
}

/* Evitar desbordes por cadenas largas (ej. Propietario;Coeficiente;...) */
.card, .muted, p, strong {
  overflow-wrap: anywhere;
}


@media print {

  /* Ocultar cabecera y pie */
  .site-header,
  .site-footer,
  .nav,
  .nav-cta {
    display: none !important;
  }

  /* Ocultar bloques de marketing / ayuda */
  .two-col,
  .callout,
  .hero-bullets,
  .disclaimer,
  .section-head {
    display: none !important;
  }

  /* Ocultar botones (acciones y formularios) */
  button,
  .btn,
  .cc-actions,
  [data-cc-actions="1"] {
    display: none !important;
  }

  /* Ajustes visuales de impresión */
  main.container {
    max-width: 100% !important;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }

  /* Evitar cortes feos de tablas */
  table,
  tr {
    break-inside: avoid;
  }
}