/* =============================================================
   Calculadora Laboral Express — styles.css
   1. Tokens · 2. Reset · 3. Utilidades · 4. Tipografía
   5. Componentes · 6. Herramienta · 7. Secciones · 8. Anuncios
   9. Responsive · 10. Print · 11. Reduced-motion
   ============================================================= */

/* 1. Tokens ------------------------------------------------------ */
:root {
  --azul-900: #0b2545;
  --azul-800: #13315c;
  --azul-700: #134074;
  --azul-600: #1d5b9e;
  --azul-500: #2a7de1;
  --azul-400: #5aa0ec;
  --azul-100: #e8f1fc;
  --azul-50:  #f4f8fe;

  --tinta:    #16202e;
  --gris-700: #3d4a5c;
  --gris-500: #6b7787;
  --gris-300: #c6cedb;
  --gris-200: #e2e8f0;
  --gris-100: #eef2f7;
  --blanco:   #ffffff;
  --hueso:    #f7f9fc;

  --verde-600: #157347;
  --verde-100: #e2f3ea;
  --ambar-600: #a9611a;
  --ambar-100: #fbeeda;
  --rojo-600:  #b42318;
  --rojo-100:  #fbeae8;

  --bg: var(--hueso);
  --card: var(--blanco);
  --text: var(--tinta);
  --muted: var(--gris-500);
  --border: var(--gris-200);
  --accent: var(--azul-600);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --radio: 14px;
  --radio-sm: 9px;
  --sombra-sm: 0 1px 2px rgba(11, 37, 69, .06), 0 1px 3px rgba(11, 37, 69, .08);
  --sombra: 0 4px 12px rgba(11, 37, 69, .08), 0 12px 32px rgba(11, 37, 69, .10);
  --sombra-lg: 0 12px 40px rgba(11, 37, 69, .16);
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --max: 1120px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* 2. Reset ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--azul-600); text-decoration: none; }
a:hover { text-decoration: underline; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.15; letter-spacing: -0.015em; color: var(--azul-900); }
::selection { background: var(--azul-500); color: #fff; }
:focus-visible { outline: 2px solid var(--azul-500); outline-offset: 2px; border-radius: 4px; }

/* 3. Utilidades ---------------------------------------------- */
.contenedor { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 9999; padding: .6rem 1rem; background: var(--azul-900); color: #fff; border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 1rem; }
.nowrap { white-space: nowrap; }

/* 4. Tipografía --------------------------------------------- */
h1 { font-size: clamp(1.7rem, 4.6vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3.4vw, 1.95rem); }
h3 { font-size: clamp(1.12rem, 2.4vw, 1.3rem); }
.lead { font-size: clamp(1.02rem, 2.2vw, 1.18rem); color: var(--gris-700); }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--azul-600); }

/* 5. Componentes ------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.4rem; border-radius: var(--radio-sm); font-weight: 650;
  background: var(--azul-600); color: #fff; transition: background .18s var(--ease-out), transform .18s var(--ease-out), box-shadow .18s var(--ease-out);
  box-shadow: var(--sombra-sm); text-align: center; line-height: 1.2;
}
.btn:hover { background: var(--azul-700); text-decoration: none; transform: translateY(-1px); box-shadow: var(--sombra); }
.btn:active { transform: translateY(0); }
.btn--fantasma { background: transparent; color: var(--azul-700); box-shadow: inset 0 0 0 1.5px var(--gris-300); }
.btn--fantasma:hover { background: var(--azul-50); box-shadow: inset 0 0 0 1.5px var(--azul-400); }
.btn--grande { padding: 1.05rem 1.8rem; font-size: 1.06rem; }
.btn--bloque { width: 100%; }
.btn--descargar { background: var(--verde-600); }
.btn--descargar:hover { background: #0f5c37; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem; border-radius: 999px; font-size: .82rem; font-weight: 600; background: var(--azul-100); color: var(--azul-800); }
.chip--ok { background: var(--verde-100); color: var(--verde-600); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-header .contenedor { display: flex; align-items: center; justify-content: space-between; min-height: 62px; gap: 1rem; }
.logo { display: flex; align-items: center; gap: .55rem; font-weight: 800; color: var(--azul-900); font-size: 1.02rem; letter-spacing: -0.02em; }
.logo:hover { text-decoration: none; }
.logo svg { flex-shrink: 0; }
.nav-links { display: flex; gap: 1.35rem; align-items: center; font-size: .92rem; font-weight: 550; }
.nav-links a { color: var(--gris-700); }
.nav-links a:hover { color: var(--azul-700); }

/* Card genérica */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radio); box-shadow: var(--sombra-sm); }

/* Tablas de resultados */
.tabla-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radio-sm); border: 1px solid var(--border); }
table.resultado { width: 100%; border-collapse: collapse; font-size: .93rem; background: #fff; min-width: 460px; }
table.resultado caption { text-align: left; font-weight: 700; padding: .75rem .9rem; color: var(--azul-900); background: var(--azul-50); }
table.resultado th, table.resultado td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--gris-100); }
table.resultado thead th { background: var(--gris-100); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--gris-700); }
table.resultado td.num, table.resultado th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.resultado tr:last-child td { border-bottom: 0; }
table.resultado tbody tr.total td { font-weight: 800; background: var(--azul-50); color: var(--azul-900); font-size: 1rem; border-top: 2px solid var(--azul-100); }
table.resultado tbody tr.subtotal td { font-weight: 700; background: #fbfcfe; }
/* Tablas informativas dentro de la prosa (páginas guía) */
table.resultado.tabla-info { min-width: 0; width: 100%; }
table.resultado.tabla-info th, table.resultado.tabla-info td { white-space: normal; vertical-align: top; }

.paga-emp { color: var(--ambar-600); font-weight: 600; }
.paga-ss  { color: var(--azul-700); font-weight: 600; }
.paga-nadie { color: var(--gris-500); }

/* Notas legales */
.nota-legal { display: flex; gap: .6rem; padding: .85rem 1rem; border-radius: var(--radio-sm); background: var(--azul-50); border: 1px solid var(--azul-100); font-size: .87rem; color: var(--gris-700); }
.nota-legal svg { flex-shrink: 0; color: var(--azul-600); margin-top: 2px; }
.aviso { background: var(--ambar-100); border-color: #f3dcbb; }
.aviso svg { color: var(--ambar-600); }

/* Badge privacidad */
.privacidad-badge {
  display: flex; align-items: center; gap: .7rem; padding: .8rem 1.1rem; margin-top: 1rem;
  border-radius: var(--radio-sm); background: var(--verde-100); color: #0f5c37; font-size: .9rem; font-weight: 600;
}
.privacidad-badge svg { flex-shrink: 0; }

/* 6. Herramienta ------------------------------------------- */
.hero-tool { padding-block: clamp(1rem, 3vw, 2.4rem) 1rem; }
.hero-tool h1 { margin-bottom: .5rem; font-size: clamp(1.5rem, 6vw, 2.6rem); }
.hero-tool .lead { max-width: 46ch; margin-bottom: 1.1rem; }
@media (max-width: 620px) {
  .hero-tool h1 { font-size: clamp(1.42rem, 6.4vw, 2rem); }
  .hero-tool .lead { font-size: .96rem; margin-bottom: .9rem; }
  .hero-tool .privacidad-badge { margin-top: .7rem; padding: .6rem .8rem; font-size: .82rem; }
}

.tool-card { padding: clamp(1.1rem, 3vw, 1.8rem); }

/* Zona de subida de nómina */
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center;
  padding: 1.5rem 1rem; border: 2px dashed var(--gris-300); border-radius: var(--radio-sm);
  background: var(--azul-50); cursor: pointer; transition: border-color .18s, background .18s;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--azul-500); background: var(--azul-100); }
.dropzone svg { color: var(--azul-600); }
.dropzone strong { color: var(--azul-900); }
.dropzone small { color: var(--gris-500); }
.dropzone-estado { margin-top: .8rem; font-size: .9rem; font-weight: 600; }
.dropzone-estado.ok { color: var(--verde-600); }
.dropzone-estado.error { color: var(--rojo-600); }
.dropzone-estado.trabajando { color: var(--azul-700); }
.progreso { height: 6px; border-radius: 999px; background: var(--gris-200); overflow: hidden; margin-top: .6rem; }
.progreso > span { display: block; height: 100%; width: 0; background: var(--azul-500); transition: width .25s var(--ease-out); }

.separador-o { display: flex; align-items: center; gap: 1rem; margin: 1.3rem 0; color: var(--gris-500); font-size: .82rem; font-weight: 700; letter-spacing: .06em; }
.separador-o::before, .separador-o::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Pestañas */
.tabs { display: flex; gap: .3rem; background: var(--gris-100); padding: .3rem; border-radius: var(--radio-sm); margin-bottom: 1.3rem; flex-wrap: wrap; }
.tab-btn {
  flex: 1 1 auto; min-width: 130px; padding: .7rem .6rem; border-radius: 7px; font-weight: 650; font-size: .92rem;
  color: var(--gris-700); transition: background .16s, color .16s; display: flex; align-items: center; justify-content: center; gap: .4rem;
}
.tab-btn[aria-selected="true"] { background: #fff; color: var(--azul-800); box-shadow: var(--sombra-sm); }
.tab-panel[hidden] { display: none; }

/* Formularios */
.campos { display: grid; gap: 1rem 1.1rem; grid-template-columns: 1fr; }
.campo { display: flex; flex-direction: column; gap: .35rem; }
.campo label { font-weight: 600; font-size: .9rem; color: var(--gris-700); }
.campo .ayuda { font-size: .8rem; color: var(--gris-500); }
.campo input, .campo select {
  padding: .7rem .8rem; border: 1.5px solid var(--gris-300); border-radius: var(--radio-sm);
  background: #fff; transition: border-color .16s, box-shadow .16s; width: 100%;
}
.campo input:focus, .campo select:focus { outline: none; border-color: var(--azul-500); box-shadow: 0 0 0 3px var(--azul-100); }
.campo.ancho-total { grid-column: 1 / -1; }
.input-euro { position: relative; }
.input-euro input { padding-left: 1.7rem; }
.input-euro::before { content: "€"; position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--gris-500); font-weight: 600; }
.check-linea { flex-direction: row; align-items: flex-start; gap: .6rem; }
.check-linea input { width: 18px; height: 18px; margin-top: 3px; flex-shrink: 0; }
.acciones-form { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.3rem; }

fieldset { border: 1px solid var(--border); border-radius: var(--radio-sm); padding: 1rem; }
fieldset legend { padding: 0 .4rem; font-weight: 700; font-size: .85rem; color: var(--azul-700); text-transform: uppercase; letter-spacing: .04em; }

/* Resultado */
.resultado-zona { margin-top: 1.5rem; display: grid; gap: 1rem; }
.resultado-zona[hidden] { display: none; }
.resultado-cabecera { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; }
.resultado-cabecera .gran-cifra { font-size: clamp(1.8rem, 6vw, 2.6rem); font-weight: 800; color: var(--azul-900); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.resultado-cabecera .gran-cifra small { font-size: .9rem; font-weight: 600; color: var(--gris-500); letter-spacing: 0; }
.desglose-barras { display: flex; height: 30px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.desglose-barras > span { display: block; min-width: 3px; }
.leyenda { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .82rem; color: var(--gris-700); }
.leyenda span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: middle; background: var(--c, var(--azul-500)); }

.b-salario { background: var(--azul-500); }
.b-vacaciones { background: var(--azul-700); }
.b-pagas { background: var(--azul-400); }
.b-indem { background: var(--verde-600); }

.reset-link { background: none; color: var(--azul-600); font-weight: 600; font-size: .9rem; text-decoration: underline; padding: 0; }

/* Hallazgos (revisor de contratos / test despido) */
.hallazgos { list-style: none; padding: 0; display: grid; gap: .7rem; }
.hallazgo { border: 1px solid var(--border); border-left: 4px solid var(--gris-300); border-radius: var(--radio-sm); padding: .85rem 1rem; background: #fff; }
.hallazgo-cab { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .3rem; }
.hallazgo strong { color: var(--azul-900); }
.hallazgo p { margin: 0; font-size: .9rem; color: var(--gris-700); }
.hallazgo-badge { font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: .18rem .5rem; border-radius: 999px; }
.hallazgo.sev-rojo { border-left-color: var(--rojo-600); }
.hallazgo.sev-rojo .hallazgo-badge { background: var(--rojo-100); color: var(--rojo-600); }
.hallazgo.sev-ambar { border-left-color: var(--ambar-600); }
.hallazgo.sev-ambar .hallazgo-badge { background: var(--ambar-100); color: var(--ambar-600); }
.hallazgo.sev-verde { border-left-color: var(--verde-600); }
.hallazgo.sev-verde .hallazgo-badge { background: var(--verde-100); color: var(--verde-600); }
.hallazgo.sev-info { border-left-color: var(--azul-500); }
.hallazgo.sev-info .hallazgo-badge { background: var(--azul-100); color: var(--azul-800); }

/* Documento generado (cartas) */
.doc-preview {
  white-space: pre-wrap; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: .82rem; line-height: 1.6; color: var(--tinta); background: #fff;
  border: 1px solid var(--border); border-radius: var(--radio-sm); padding: 1rem; overflow-x: auto;
}

/* Cuestionario del test de despido */
.pregunta { border: 1px solid var(--border); border-radius: var(--radio-sm); padding: 1rem; }
.pregunta > legend { float: left; width: 100%; font-weight: 700; color: var(--azul-900); font-size: .95rem; text-transform: none; letter-spacing: 0; padding: 0; margin-bottom: .55rem; line-height: 1.35; }
.pregunta .opciones { clear: both; display: grid; gap: .5rem; }
.pregunta .ayuda { clear: both; }
.opcion { display: flex; align-items: flex-start; gap: .55rem; font-size: .92rem; color: var(--gris-700); cursor: pointer; }
.opcion input { margin-top: 3px; width: 17px; height: 17px; flex-shrink: 0; }
.pregunta .ayuda { margin-top: .4rem; }

/* 7. Secciones -------------------------------------------- */
.seccion { padding: clamp(2.2rem, 6vw, 3.6rem) 0; }
.seccion--gris { background: var(--azul-50); border-block: 1px solid var(--azul-100); }
.seccion h2 { margin-bottom: .4rem; }
.seccion > .contenedor > .lead { margin-bottom: 1.8rem; max-width: 60ch; }

.pasos { display: grid; gap: 1.2rem; grid-template-columns: 1fr; counter-reset: paso; }
.paso { display: flex; gap: .9rem; }
.paso .num { flex-shrink: 0; width: 34px; height: 34px; border-radius: 999px; background: var(--azul-600); color: #fff; display: grid; place-items: center; font-weight: 700; }
.paso h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.paso p { font-size: .92rem; color: var(--gris-700); margin: 0; }

.grid-guias { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.guia-card { padding: 1.3rem; display: flex; flex-direction: column; gap: .5rem; transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out); }
.guia-card:hover { transform: translateY(-3px); box-shadow: var(--sombra); text-decoration: none; }
.guia-card h3 { font-size: 1.06rem; }
.guia-card p { font-size: .9rem; color: var(--gris-700); margin: 0; }
.guia-card .flecha { color: var(--azul-600); font-weight: 700; font-size: .9rem; margin-top: auto; }

.prosa { max-width: 68ch; }
.prosa h2 { margin-top: 2rem; }
.prosa h3 { margin-top: 1.5rem; margin-bottom: .3rem; }
.prosa p, .prosa li { color: var(--gris-700); }
.prosa ul, .prosa ol { padding-left: 1.3rem; margin: .6rem 0; }
.prosa li { margin-bottom: .35rem; }

details.faq { border-bottom: 1px solid var(--border); padding: .95rem 0; }
details.faq summary { font-weight: 650; color: var(--azul-900); cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--azul-500); flex-shrink: 0; }
details.faq[open] summary::after { content: "–"; }
details.faq p { margin-top: .6rem; color: var(--gris-700); font-size: .95rem; }

/* Footer */
.site-footer { background: var(--azul-900); color: #cdd9ea; padding: 2.6rem 0 1.6rem; font-size: .9rem; }
.site-footer a { color: #cdd9ea; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 1.6rem; grid-template-columns: 1fr; margin-bottom: 1.8rem; }
.footer-grid h4 { color: #fff; font-size: .95rem; margin-bottom: .5rem; }
.footer-grid ul { list-style: none; padding: 0; display: grid; gap: .35rem; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.14); padding-top: 1.2rem; color: #93a6bf; font-size: .82rem; }

/* 8. Anuncios (placeholders) ------------------------------ */
.ad-slot {
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--gris-300); border-radius: var(--radio-sm);
  background: repeating-linear-gradient(45deg, #fbfcfe, #fbfcfe 10px, #f3f6fb 10px, #f3f6fb 20px);
  color: var(--gris-500); font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  margin-inline: auto; text-transform: uppercase;
}
.ad-leaderboard { max-width: 728px; min-height: 90px; margin-block: 1.6rem; }
.ad-incontent { max-width: 580px; min-height: 250px; margin-block: 2rem; }
.ad-rect { max-width: 300px; min-height: 250px; }

/* Pop-up al descargar */
dialog.ad-modal { border: 0; border-radius: var(--radio); padding: 0; box-shadow: var(--sombra-lg); max-width: 440px; width: calc(100vw - 2rem); }
dialog.ad-modal::backdrop { background: rgba(11, 37, 69, .45); backdrop-filter: blur(2px); }
.ad-modal-inner { padding: 1.4rem; }
.ad-modal-inner header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .9rem; }
.ad-modal-inner h3 { font-size: 1.05rem; }
.ad-modal-cerrar { width: 32px; height: 32px; border-radius: 999px; background: var(--gris-100); color: var(--gris-700); font-size: 1.1rem; display: grid; place-items: center; }
.ad-modal-cerrar:hover { background: var(--gris-200); }
.ad-modal .ad-slot { min-height: 250px; width: 100%; }
.ad-modal footer { margin-top: 1rem; text-align: center; }

/* Notificación de esquina */
.toast-ad {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 200; max-width: 300px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radio); box-shadow: var(--sombra-lg);
  padding: .9rem 1rem; display: grid; gap: .5rem; transform: translateY(140%); transition: transform .4s var(--ease-out);
}
.toast-ad.visible { transform: translateY(0); }
.toast-ad header { display: flex; justify-content: space-between; align-items: center; font-size: .72rem; font-weight: 700; letter-spacing: .1em; color: var(--gris-500); text-transform: uppercase; }
.toast-ad .ad-slot { min-height: 90px; width: 100%; }
.toast-ad-cerrar { background: none; color: var(--gris-500); font-size: 1rem; line-height: 1; padding: 0 .2rem; }

.sin-js { padding: 1rem; background: var(--ambar-100); border: 1px solid #f3dcbb; border-radius: var(--radio-sm); color: var(--ambar-600); font-weight: 600; font-size: .9rem; }

/* Menú hamburguesa (solo móvil, sin JS: <details>) */
.nav-movil { display: none; }

/* 9. Responsive ------------------------------------------ */
@media (max-width: 860px) {
  .nav-links { gap: .8rem; font-size: .82rem; }
  .nav-links .ocultar-movil { display: none; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-movil { display: block; position: relative; }
  .nav-movil > summary { list-style: none; cursor: pointer; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 9px; -webkit-tap-highlight-color: transparent; }
  .nav-movil > summary::-webkit-details-marker { display: none; }
  .nav-movil > summary > span { position: relative; display: block; width: 22px; height: 2px; background: var(--azul-900); border-radius: 2px; }
  .nav-movil > summary > span::before,
  .nav-movil > summary > span::after { content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: var(--azul-900); border-radius: 2px; }
  .nav-movil > summary > span::before { top: -7px; }
  .nav-movil > summary > span::after { top: 7px; }
  .nav-movil[open] > summary { background: var(--gris-100); }
  .nav-movil > nav {
    position: absolute; right: 0; top: calc(100% + 12px);
    background: #fff; border: 1px solid var(--border); border-radius: var(--radio);
    box-shadow: var(--sombra-lg); min-width: 250px; max-width: calc(100vw - 2rem);
    padding: .4rem; z-index: 200; display: grid; gap: 2px;
  }
  .nav-movil > nav::before { content: "Herramientas"; padding: .5rem .8rem .3rem; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gris-500); }
  .nav-movil > nav a { padding: .72rem .8rem; border-radius: 8px; font-size: .95rem; font-weight: 550; color: var(--gris-700); }
  .nav-movil > nav a:hover, .nav-movil > nav a:focus-visible { background: var(--azul-50); color: var(--azul-800); text-decoration: none; }
}
@media (max-width: 560px) {
  /* Cabecera compacta */
  .site-header .contenedor { min-height: 54px; }
  .logo { font-size: .9rem; gap: .45rem; }
  .logo svg { width: 22px; height: 22px; }

  /* Pestañas apiladas para que no se corte ningún texto */
  .tabs { flex-direction: column; gap: .35rem; }
  .tab-btn { width: 100%; min-width: 0; justify-content: flex-start; padding: .8rem .9rem; }

  /* Anuncio de esquina -> franja inferior a lo ancho (no tapa el contenido) */
  .toast-ad {
    left: 0; right: 0; bottom: 0; max-width: none; width: 100%;
    border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0;
    transform: translateY(120%);
  }
  .toast-ad.visible { transform: translateY(0); }
  .toast-ad .ad-slot { min-height: 60px; }

  /* Tablas de resultados: un poco más compactas */
  table.resultado { font-size: .84rem; min-width: 340px; }
  table.resultado th, table.resultado td { padding: .5rem .55rem; }
  table.resultado caption { padding: .6rem .7rem; font-size: .9rem; }
  table.resultado.tabla-info { font-size: .82rem; min-width: 0; }
  table.resultado.tabla-info th, table.resultado.tabla-info td { padding: .5rem .5rem; }
  .resultado-cabecera .gran-cifra { font-size: clamp(1.6rem, 8vw, 2.2rem); }
}
@media (min-width: 720px) {
  .campos { grid-template-columns: 1fr 1fr; }
  .pasos { grid-template-columns: repeat(3, 1fr); }
  .grid-guias { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
@media (min-width: 960px) {
  .hero-tool { display: grid; grid-template-columns: 0.9fr 1.4fr; gap: 2.4rem; align-items: start; }
  .hero-tool .hero-copy { position: sticky; top: 90px; }
  .grid-guias { grid-template-columns: repeat(4, 1fr); }
}

/* 10. Print --------------------------------------------- */
@media print {
  .site-header, .site-footer, .ad-slot, .toast-ad, dialog.ad-modal, .dropzone, .separador-o, .acciones-form, .tabs, .seccion, .privacidad-badge, .reset-link { display: none !important; }
  body { background: #fff; }
  .tool-card { border: 0; box-shadow: none; padding: 0; }
}

/* 11. Reduced-motion (solo lo intrusivo) ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .toast-ad { transition: none; }
}
