/* PrestacionesMX — hoja de estilos unica, sin dependencias */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1a2230;
  --muted: #5b6675;
  --brand: #0b7a52;
  --brand-dark: #085f40;
  --brand-soft: #e6f4ee;
  --border: #e2e6ec;
  --accent: #c9a227;
  --danger: #b3261e;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --maxw: 760px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141b;
    --surface: #171e28;
    --text: #e7ecf3;
    --muted: #9aa6b6;
    --brand: #34c88a;
    --brand-dark: #2aa876;
    --brand-soft: #14261f;
    --border: #26303d;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

a { color: var(--brand-dark); }
@media (prefers-color-scheme: dark) { a { color: var(--brand); } }

img { max-width: 100%; height: auto; }

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

/* Encabezado */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -.01em;
}
.brand .dot { color: var(--brand); }
.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  color: var(--brand-dark);
  background: var(--brand-soft);
}
@media (prefers-color-scheme: dark) {
  .site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--brand); }
}

/* Contenido */
main { padding: 32px 0 56px; }

.hero { text-align: center; padding: 20px 0 8px; }
.hero h1 {
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  line-height: 1.15;
  margin: .2em 0 .3em;
  letter-spacing: -.02em;
}
.hero p.lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 56ch;
  margin: 0 auto;
}

h2 { font-size: 1.45rem; margin-top: 2em; letter-spacing: -.01em; }
h3 { font-size: 1.1rem; margin-top: 1.6em; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin: 24px 0;
}

/* Rejilla de herramientas */
.tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 28px 0;
  padding: 0;
  list-style: none;
}
.tool-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform .12s ease, border-color .12s ease;
}
.tool-card:hover { transform: translateY(-2px); border-color: var(--brand); }
.tool-card .emoji { font-size: 1.6rem; }
.tool-card strong { display: block; margin: 8px 0 4px; font-size: 1.1rem; }
.tool-card span { color: var(--muted); font-size: .95rem; }

/* Formularios */
form { margin: 8px 0; }
.field { margin: 0 0 18px; }
.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}
.field .hint { font-weight: 400; color: var(--muted); font-size: .9rem; }
input[type="number"], input[type="date"], input[type="text"], select {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}
input:focus, select:focus, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row .field { flex: 1 1 200px; }

button.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px 22px;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
}
button.btn:hover { background: var(--brand-dark); }

/* Resultado */
.result {
  margin-top: 20px;
  border: 1px solid var(--brand);
  background: var(--brand-soft);
  border-radius: var(--radius);
  padding: 20px;
}
.result[hidden] { display: none; }
.result .total {
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-dark);
  letter-spacing: -.02em;
}
@media (prefers-color-scheme: dark) { .result .total { color: var(--brand); } }
.result .total small { font-size: 1rem; font-weight: 600; color: var(--muted); }

.breakdown { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: .97rem; }
.breakdown th, .breakdown td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); }
.breakdown td:last-child, .breakdown th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.breakdown tr:last-child td { border-bottom: none; font-weight: 700; }

.note {
  font-size: .9rem;
  color: var(--muted);
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 14px;
  margin: 18px 0;
}

/* FAQ */
details {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px 16px;
  margin: 10px 0;
  background: var(--surface);
}
details summary {
  cursor: pointer;
  font-weight: 600;
  padding: 10px 0;
}
details[open] summary { color: var(--brand-dark); }
@media (prefers-color-scheme: dark) { details[open] summary { color: var(--brand); } }

/* Ranura de anuncio (placeholder, sin cargar nada) */
.ad-slot {
  margin: 28px 0;
  min-height: 90px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: .85rem;
  text-align: center;
}

/* Migas de pan */
.breadcrumb { font-size: .9rem; color: var(--muted); margin: 4px 0 8px; }
.breadcrumb a { color: var(--muted); }

/* Pie */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 28px 0;
  color: var(--muted);
  font-size: .9rem;
}
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--brand);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 50;
}
.skip-link:focus { left: 8px; }

.disclaimer {
  font-size: .85rem;
  color: var(--muted);
  margin-top: 8px;
}
