/* Calcula tu Nómina — hoja de estilos compartida */
:root {
  --ink: #0f2417;
  --ink-soft: #3b4b43;
  --paper: #f7f5ef;
  --card: #ffffff;
  --line: #e2ddcf;
  --brand: #0b6e4f;
  --brand-dark: #084d38;
  --brand-light: #e6f3ec;
  --accent: #c98a1c;
  --accent-light: #fbeed9;
  --danger: #a4292b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 36, 23, 0.06), 0 8px 24px rgba(15, 36, 23, 0.06);
  --maxw: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-dark); }
a:hover { color: var(--brand); }
img { max-width: 100%; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------------- Header ---------------- */
header.site {
  background: var(--brand-dark);
  color: #fff;
  padding: 14px 0;
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-weight: 700; font-size: 19px; }
.brand .mark { width: 30px; height: 30px; flex-shrink: 0; }
.brand small { display: block; font-weight: 400; font-size: 11px; color: #cfe8db; letter-spacing: .02em; }
nav.mainnav { display: flex; gap: 4px; flex-wrap: wrap; }
nav.mainnav a {
  color: #eaf4ee; text-decoration: none; font-size: 14px; padding: 8px 12px; border-radius: 8px;
}
nav.mainnav a:hover, nav.mainnav a.active { background: rgba(255,255,255,.12); color: #fff; }
.navtoggle { display: none; background: none; border: 1px solid rgba(255,255,255,.4); color: #fff; border-radius: 8px; padding: 8px 10px; font-size: 14px; cursor: pointer; }

@media (max-width: 780px) {
  nav.mainnav { display: none; width: 100%; flex-direction: column; gap: 2px; margin-top: 10px; }
  nav.mainnav.open { display: flex; }
  header.site .wrap { flex-wrap: wrap; }
  .navtoggle { display: block; }
}

/* ---------------- Breadcrumbs ---------------- */
.breadcrumbs { font-size: 13px; color: var(--ink-soft); padding: 14px 0 0; }
.breadcrumbs a { color: var(--ink-soft); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep { margin: 0 6px; color: #b7b09b; }

/* ---------------- Hero ---------------- */
.hero { padding: 36px 0 8px; }
.hero h1 { font-size: clamp(28px, 4vw, 40px); margin: 6px 0 10px; letter-spacing: -.01em; }
.hero p.lead { font-size: 18px; color: var(--ink-soft); max-width: 720px; margin: 0 0 6px; }
.badge {
  display: inline-block; background: var(--brand-light); color: var(--brand-dark); font-size: 12.5px;
  font-weight: 600; padding: 4px 10px; border-radius: 999px; letter-spacing: .02em; margin-bottom: 10px;
}

/* ---------------- Cards / sections ---------------- */
section { padding: 28px 0; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 900px) {
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-6 { grid-template-columns: 1fr; }
}

h2 { font-size: 24px; margin: 0 0 14px; letter-spacing: -.01em; }
h3 { font-size: 17px; margin: 0 0 8px; }

/* ---------------- Tool cards (link cards to other calculators) ---------------- */
.toolcard {
  display: block; text-decoration: none; color: inherit; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.toolcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #c9e2d4; }
.toolcard .emoji { font-size: 26px; }
.toolcard h3 { color: var(--brand-dark); margin: 8px 0 4px; }
.toolcard p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }

/* ---------------- Form controls ---------------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field .hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; }
input[type="number"], input[type="date"], input[type="text"], select {
  width: 100%; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px;
  background: #fff; font-family: inherit; font-size: 15.5px; color: var(--ink);
}
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11,110,79,.12); }
.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-pill {
  border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 16px; cursor: pointer;
  font-size: 14px; background: #fff; user-select: none;
}
.radio-pill input { display: none; }
.radio-pill.sel { border-color: var(--brand); background: var(--brand-light); color: var(--brand-dark); font-weight: 600; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }

button.btn, a.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand); color: #fff; border: none; border-radius: 10px;
  padding: 13px 22px; font-size: 16px; font-weight: 700; cursor: pointer; text-decoration: none;
  font-family: inherit;
}
button.btn:hover, a.btn:hover { background: var(--brand-dark); }
button.btn.block, a.btn.block { width: 100%; }

/* ---------------- Results ---------------- */
.result {
  background: var(--brand-light); border: 1px solid #cfe6da; border-radius: var(--radius);
  padding: 22px; margin-top: 18px; display: none;
}
.result.show { display: block; }
.result .headline { font-size: 15px; color: var(--brand-dark); font-weight: 600; margin-bottom: 4px; }
.result .amount { font-size: 38px; font-weight: 800; color: var(--brand-dark); letter-spacing: -.01em; }
.result .amount small { font-size: 16px; font-weight: 600; color: var(--ink-soft); }
.breakdown { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14.5px; }
.breakdown th, .breakdown td { text-align: left; padding: 9px 6px; border-bottom: 1px solid #d9ead9; }
.breakdown th { color: var(--ink-soft); font-weight: 600; font-size: 13px; }
.breakdown tr:last-child td { border-bottom: none; font-weight: 700; }
.breakdown td.num, .breakdown th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------- Disclaimer ---------------- */
.disclaimer {
  background: var(--accent-light); border: 1px solid #f0d9a8; border-radius: 10px;
  padding: 14px 16px; font-size: 13.5px; color: #6b4a10; margin: 18px 0;
}
.disclaimer strong { color: #533a0d; }
.disclaimer a { color: #533a0d; text-decoration: underline; }

/* ---------------- FAQ ---------------- */
.faq-item { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-item h3 { margin: 0 0 6px; font-size: 16px; }
.faq-item p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* ---------------- Steps ---------------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 14px; }
.steps li { position: relative; padding-left: 44px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.steps li strong { display: block; margin-bottom: 2px; }
.steps li span { color: var(--ink-soft); font-size: 14.5px; }

/* ---------------- Prose sections ---------------- */
.prose h2 { margin-top: 6px; }
.prose p, .prose li { color: var(--ink-soft); font-size: 15.5px; }
.prose ul, .prose ol { padding-left: 22px; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tag-list a {
  font-size: 13px; text-decoration: none; background: #fff; border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 999px; color: var(--ink);
}
.tag-list a:hover { border-color: var(--brand); color: var(--brand-dark); }

/* ---------------- Footer ---------------- */
footer.site { background: #0e1f16; color: #cfe0d5; padding: 40px 0 26px; margin-top: 40px; }
footer.site a { color: #e5f0e9; }
footer.site .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
footer.site h4 { color: #fff; font-size: 14px; margin: 0 0 10px; }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin-bottom: 6px; font-size: 14px; }
footer.site .fineprint { border-top: 1px solid rgba(255,255,255,.12); margin-top: 26px; padding-top: 18px; font-size: 12.5px; color: #94a99c; }
@media (max-width: 700px) { footer.site .cols { grid-template-columns: 1fr; } }

.table-wrap { overflow-x: auto; }
table.rates-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
table.rates-table th, table.rates-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
table.rates-table th { background: #f1efe4; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); }
table.rates-table td.num { text-align: right; font-variant-numeric: tabular-nums; }

.kpi-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; min-width: 140px; }
.kpi .n { font-size: 20px; font-weight: 800; color: var(--brand-dark); }
.kpi .l { font-size: 12.5px; color: var(--ink-soft); }
