/* Calculadora de hipotecas — paleta tools-ci; sin rebuild Vite */
.hip {
  --hip-bg: #151D1A;
  --hip-panel: #202C27;
  --hip-border: #394941;
  --hip-ink: #F3F5F3;
  --hip-muted: #c5d0cb;
  --hip-mint: #00D49A;
  --hip-blue: #7EB6FF;
  --hip-gold: #F5C15A;
  --hip-input-bg: #fff;
  --hip-input-ink: #10251a;
  --hip-danger: #ff3b3b;
  color: var(--hip-ink);
  background: var(--hip-bg);
  padding: clamp(16px, 4vw, 28px);
  border: 1px solid var(--hip-border);
  border-radius: 20px;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: clip;
}
.hip *, .hip *::before, .hip *::after { box-sizing: border-box; }
.hip h1, .hip h2, .hip h3 { color: var(--hip-ink); margin: 0; overflow-wrap: anywhere; }
.hip h1 { font-size: clamp(26px, 5vw, 38px); line-height: 1.2; margin-bottom: 12px; }
.hip h2 { font-size: clamp(18px, 3vw, 22px); margin: 0 0 12px; }
.hip p { line-height: 1.6; margin: 10px 0; color: var(--hip-muted); overflow-wrap: anywhere; }
.hip a { color: var(--hip-mint); }
.hip-lead { max-width: 46rem; }
.hip-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0 12px;
}
.hip label { display: block; font-size: 14px; color: var(--hip-ink); }
.hip label span { display: block; font-size: 11px; color: var(--hip-muted); margin-top: 2px; }
.hip input[type="text"], .hip input[type="number"], .hip select {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--hip-input-bg);
  color: var(--hip-input-ink);
  border: 1px solid #698676;
  border-radius: 10px;
  font-size: 16px;
}
.hip :focus-visible { outline: 3px solid #88b9ff; outline-offset: 3px; }
.hip-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 8px 0 4px; }
.hip button[type="submit"], .hip-toggle {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  padding: 12px 24px;
  font-weight: 700;
  cursor: pointer;
}
.hip button[type="submit"] { background: var(--hip-mint); color: #042218; }
.hip-toggle {
  background: transparent;
  color: var(--hip-ink);
  border: 1px solid var(--hip-border) !important;
}
.hip-toggle[aria-expanded="true"] { border-color: var(--hip-mint) !important; color: var(--hip-mint); }
.hip-advanced {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 16px;
  padding: 14px;
  background: var(--hip-panel);
  border: 1px solid var(--hip-border);
  border-radius: 14px;
}
.hip-advanced.is-open { display: grid; }
.hip-error { color: var(--hip-danger); font-weight: 600; min-height: 1.4em; margin: 4px 0 12px; }
.hip-results { display: none; }
.hip-results.is-ready { display: block; }
.hip-summary, .hip-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 20px 0;
}
.hip-card {
  background: var(--hip-panel);
  border: 1px solid var(--hip-border);
  border-radius: 16px;
  padding: 16px;
  min-width: 0;
  max-width: 100%;
}
.hip-kpis { display: grid; grid-template-columns: 1fr; gap: 10px; }
.hip-kpi { padding: 10px 0; border-bottom: 1px solid var(--hip-border); }
.hip-kpi:last-child { border-bottom: 0; }
.hip-kpi span { display: block; font-size: 12px; color: var(--hip-muted); }
.hip-kpi strong { display: block; margin-top: 4px; font-size: clamp(18px, 3vw, 24px); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hip-chart { width: 100%; height: auto; max-width: 100%; display: block; }
.hip-chart-wrap, .hip-table-wrap {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.hip-legend { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-top: 10px; font-size: 13px; color: var(--hip-muted); }
.hip-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.hip-note { font-size: 14px; }
.hip-yearbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.hip table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hip caption { text-align: left; font-weight: 700; padding: 0 0 8px; color: var(--hip-ink); }
.hip th, .hip td {
  text-align: right;
  padding: 10px 12px;
  border-top: 1px solid var(--hip-border);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.hip th:first-child, .hip td:first-child { text-align: left; }
.hip-glossary details {
  border-top: 1px solid var(--hip-border);
  padding: 10px 0;
}
.hip-glossary summary { cursor: pointer; font-weight: 700; color: var(--hip-ink); }
.hip-glossary p { margin: 6px 0 0; }
@media (min-width: 720px) {
  .hip-summary, .hip-split { grid-template-columns: 1.1fr 0.9fr; }
  .hip-advanced { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hip-kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .hip-fields, .hip-advanced.is-open { grid-template-columns: 1fr; }
}
