/* =====================================================================
   Kuenta — Sistema de diseño
   Portal de herramientas gratuitas (imán SEO) + futuro ERP SaaS.
   Estático, sin dependencias externas. Estilo limpio, fondo claro,
   acento azul. Inspirado en el patrón de factuo.es pero propio.
   ===================================================================== */

:root {
  /* Marca */
  --brand:        #2f6bff;
  --brand-dark:   #1d4ed8;
  --brand-darker: #1740a6;
  --brand-soft:   #eaf1ff;
  --brand-softer: #f5f8ff;

  /* Neutros */
  --ink:      #0f1729;   /* texto principal */
  --ink-2:    #384357;   /* texto secundario */
  --muted:    #6b7688;   /* texto tenue */
  --line:     #eceff4;   /* bordes (suave, minimalista) */
  --line-2:   #f1f4f8;
  --bg:       #ffffff;
  --bg-2:     #f8fafc;   /* secciones alternas */
  --bg-3:     #f1f5fa;

  /* Estados */
  --ok:      #12a150;
  --ok-soft: #e7f6ee;
  --warn:    #c76a00;
  --warn-soft:#fdf1e1;
  --err:     #d92d20;
  --err-soft:#fdecea;

  /* Formas */
  --radius:   16px;
  --radius-s: 10px;
  --radius-l: 22px;
  --shadow-sm: 0 1px 2px rgba(16,23,41,.04);
  --shadow:    0 6px 24px -12px rgba(16,23,41,.14);
  --shadow-lg: 0 24px 60px -20px rgba(16,23,41,.18);

  --maxw: 1344px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          Helvetica, Arial, sans-serif;
}

/* ------------------------------ Reset ------------------------------ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p  { margin: 0 0 1rem; color: var(--ink-2); }
ul, ol { color: var(--ink-2); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
code { background: var(--bg-3); padding: .12em .4em; border-radius: 6px; font-size: .9em; }

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

/* ------------------------------ Header ------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; gap: 24px;
  height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 800; font-size: 1.28rem; color: var(--ink);
  letter-spacing: -.03em; white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 1rem;
  box-shadow: 0 4px 10px rgba(47,107,255,.35);
}
.brand .dot { color: var(--brand); }
.brand .wordmark { display: inline-flex; align-items: baseline; letter-spacing: -.03em; }
.brand .w-easy { font-weight: 500; color: var(--ink-2); }
.brand .w-count { font-weight: 800; color: var(--ink); }
.site-footer .brand .w-easy { color: #a9b4c6; }
.site-footer .brand .w-count { color: #fff; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-nav a {
  color: var(--ink-2); font-weight: 600; font-size: .96rem;
  padding: 8px 12px; border-radius: 8px; white-space: nowrap;
}
.main-nav a:hover { color: var(--ink); background: var(--bg-2); text-decoration: none; }
.main-nav a.active { color: var(--brand-dark); }
.nav-cta { margin-left: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: .96rem; line-height: 1;
  padding: 12px 20px; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent; transition: transform .06s ease, box-shadow .2s, background .2s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(47,107,255,.28); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-lg { padding: 15px 26px; font-size: 1.02rem; border-radius: 12px; }
.btn-block { width: 100%; }

.nav-toggle {
  display: none; margin-left: auto; background: none; border: 1px solid var(--line);
  border-radius: 8px; width: 42px; height: 40px; cursor: pointer;
  color: var(--ink); align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: fixed; inset: 64px 0 auto 0; flex-direction: column; align-items: stretch;
    gap: 2px; background: #fff; border-bottom: 1px solid var(--line);
    padding: 12px 16px 20px; margin: 0; box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .18s;
  }
  .main-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .main-nav a { padding: 12px 10px; font-size: 1.05rem; }
  .nav-cta { margin: 8px 0 0; }
  .nav-cta .btn { width: 100%; }
}

/* ------------------------------ Hero ------------------------------ */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 460px at 85% -10%, var(--brand-soft) 0%, transparent 60%),
    radial-gradient(760px 380px at 5% 0%, #f0eefe 0%, transparent 55%),
    var(--bg);
  padding: 74px 0 64px;
  border-bottom: 1px solid var(--line);
}
.hero h1 { max-width: 16ch; text-wrap: balance; }
.hero .lead { font-size: 1.2rem; color: var(--ink-2); max-width: 60ch; margin: 0 auto 2rem; }
.hero.center { text-align: center; }
.hero.center h1 { margin-left: auto; margin-right: auto; }
.hero.center .lead { margin-left: auto; margin-right: auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); color: var(--brand-dark);
  font-weight: 700; font-size: .82rem; letter-spacing: .01em;
  padding: 7px 14px; border-radius: 999px; margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.eyebrow .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.trust { margin-top: 22px; font-size: .9rem; color: var(--muted); }
.trust strong { color: var(--ink-2); }

/* ------------------------------ Secciones ------------------------------ */
.section { padding: 64px 0; }
.section.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head p { font-size: 1.08rem; }
.kicker { color: var(--brand-dark); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .82rem; margin-bottom: 10px; }

/* ------------------------------ Grid de herramientas ------------------------------ */
.tools-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
@media (max-width: 900px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .tools-grid { grid-template-columns: 1fr; } }

.tool-card {
  display: flex; flex-direction: column; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
  transition: transform .14s ease, box-shadow .2s, border-color .2s;
  color: inherit; position: relative;
}
a.tool-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #d5deef; }
.tool-card .ic {
  width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft);
  color: var(--brand-dark); display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.tool-card h3 { margin: 4px 0 0; font-size: 1.12rem; }
.tool-card p { margin: 0; font-size: .96rem; color: var(--muted); }
.tool-card .go { margin-top: auto; color: var(--brand-dark); font-weight: 700; font-size: .92rem; padding-top: 8px; }
.tool-card.soon { opacity: .72; }
.badge {
  position: absolute; top: 16px; right: 16px;
  font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; background: var(--bg-3); color: var(--muted);
}
.badge.new { background: var(--ok-soft); color: var(--ok); }

/* ------------------------------ Feature / valor ------------------------------ */
.features { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
@media (max-width: 820px){ .features { grid-template-columns: 1fr; gap: 22px; } }
.feature .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-dark); display: inline-flex; align-items:center; justify-content:center; font-size: 1.3rem; margin-bottom: 14px; }
.feature h3 { font-size: 1.14rem; }
.feature p { color: var(--muted); font-size: .98rem; }

/* ------------------------------ Página de herramienta ------------------------------ */
.breadcrumbs { font-size: .88rem; color: var(--muted); padding: 20px 0 0; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--brand-dark); }
.breadcrumbs span { margin: 0 6px; }

.tool-hero { padding: 14px 0 8px; }
.tool-hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.tool-hero .lead { font-size: 1.12rem; color: var(--ink-2); max-width: 65ch; }

.tool-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 28px; align-items: start; }
@media (max-width: 900px){ .tool-layout { grid-template-columns: 1fr; } }

.calc {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-l);
  box-shadow: var(--shadow); padding: 26px; position: sticky; top: 84px;
}
@media (max-width: 900px){ .calc { position: static; } }
.calc h2 { font-size: 1.2rem; margin-bottom: 4px; }
.calc .hint { color: var(--muted); font-size: .9rem; margin-bottom: 18px; }

.field { margin-bottom: 16px; }
.field > label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 7px; color: var(--ink); }
.field .sub { font-weight: 500; color: var(--muted); font-size: .84rem; }
.control {
  display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-s);
  background: #fff; transition: border-color .15s, box-shadow .15s; overflow: hidden;
}
.control:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,107,255,.15); }
.control input, .control select {
  border: 0; outline: 0; background: transparent; width: 100%;
  padding: 12px 14px; font-size: 1rem; font-family: inherit; color: var(--ink);
}
.control .affix { padding: 0 14px; color: var(--muted); font-weight: 600; background: var(--bg-2); align-self: stretch; display: flex; align-items: center; border-left: 1px solid var(--line); }
.control .affix.left { border-left: 0; border-right: 1px solid var(--line); }
select.control { padding: 12px 14px; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7688' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }

/* Segmented control (chips) */
.seg { display: inline-flex; background: var(--bg-3); border-radius: 10px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg button {
  border: 0; background: transparent; padding: 8px 14px; border-radius: 7px; cursor: pointer;
  font-weight: 700; font-size: .9rem; color: var(--ink-2); font-family: inherit; transition: .12s;
}
.seg button.on { background: #fff; color: var(--brand-dark); box-shadow: var(--shadow-sm); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px){ .two-col { grid-template-columns: 1fr; } }

/* Resultado */
.result { margin-top: 20px; border-top: 1px dashed var(--line); padding-top: 18px; }
.result-row { display: flex; justify-content: space-between; align-items: baseline; padding: 7px 0; font-size: .98rem; }
.result-row .k { color: var(--ink-2); }
.result-row .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.result-total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 12px; padding: 16px 18px; border-radius: 12px;
  background: var(--brand-softer); border: 1px solid var(--brand-soft);
}
.result-total .k { font-weight: 700; color: var(--ink); }
.result-total .v { font-weight: 800; font-size: 1.7rem; color: var(--brand-dark); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.result-note { font-size: .84rem; color: var(--muted); margin-top: 12px; }

.status-pill { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .95rem; padding: 10px 14px; border-radius: 10px; margin-top: 6px; }
.status-pill.ok { background: var(--ok-soft); color: var(--ok); }
.status-pill.err { background: var(--err-soft); color: var(--err); }
.status-pill.warn { background: var(--warn-soft); color: var(--warn); }

/* Contenido SEO */
.prose { max-width: 760px; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: .96rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose th { background: var(--bg-2); font-weight: 700; }
.prose .callout {
  background: var(--brand-softer); border: 1px solid var(--brand-soft); border-left: 4px solid var(--brand);
  border-radius: 10px; padding: 16px 18px; margin: 1.4rem 0;
}
.prose .callout p:last-child { margin-bottom: 0; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
  border: 1px solid var(--line); border-radius: 12px; padding: 4px 20px; margin-bottom: 12px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.faq details[open] { border-color: #d5deef; box-shadow: var(--shadow-sm); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 0; font-weight: 700; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { flex: none; transition: transform .2s; color: var(--muted); }
.faq details[open] summary .chev { transform: rotate(180deg); }
.faq details > div { padding: 0 0 16px; color: var(--ink-2); }
.faq details > div p:last-child { margin-bottom: 0; }

/* CTA */
.cta-band {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  border-radius: var(--radius-l); padding: 48px 40px; text-align: center; color: #fff;
  box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); max-width: 55ch; margin: 0 auto 24px; font-size: 1.06rem; }
.cta-band .btn-primary { background: #fff; color: var(--brand-dark); box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.cta-band .btn-primary:hover { background: #f2f5ff; color: var(--brand-darker); }

/* Related */
.related-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
@media (max-width: 820px){ .related-list { grid-template-columns: 1fr; } }
.related-list a { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-weight: 600; font-size: .96rem; }
.related-list a:hover { text-decoration: none; border-color: #d5deef; background: var(--bg-2); }

/* ------------------------------ Footer ------------------------------ */
.site-footer { background: #0f1729; color: #c3ccdb; padding: 56px 0 28px; margin-top: 20px; }
.site-footer a { color: #c3ccdb; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 820px){ .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 480px){ .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand { color: #fff; }
.site-footer .brand .mark { box-shadow: none; }
.footer-about p { color: #93a0b5; font-size: .95rem; max-width: 34ch; margin-top: 14px; }
.footer-col h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { font-size: .95rem; color: #a9b4c6; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .88rem; color: #8593a8; }

/* ------------------------------ Cookies ------------------------------ */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100;
  max-width: 560px; margin: 0 auto;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 18px 20px;
  display: none;
}
.cookie-banner.show { display: block; }
.cookie-banner p { font-size: .92rem; margin: 0 0 14px; color: var(--ink-2); }
.cookie-banner .row { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-banner .btn { padding: 10px 16px; font-size: .9rem; }

/* Utilidades */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 720px){ .grid-2 { grid-template-columns: 1fr; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ============================================================
   Generador de documentos (facturas / presupuestos / albaranes)
   ============================================================ */
.doc-layout { display: grid; grid-template-columns: 440px 1fr; gap: 28px; align-items: start; }
@media (max-width: 960px){ .doc-layout { grid-template-columns: 1fr; } }

.doc-form {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-l);
  box-shadow: var(--shadow); padding: 22px;
}
.doc-form h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-dark);
  margin: 22px 0 12px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.doc-form h3:first-of-type { margin-top: 4px; padding-top: 0; border-top: 0; }
.doc-form .field { margin-bottom: 12px; }
.doc-form textarea.control-ta { border: 0; outline: 0; background: transparent; width: 100%;
  padding: 12px 14px; font-family: inherit; font-size: 1rem; resize: vertical; color: var(--ink); }

.line-row { display: grid; grid-template-columns: 1fr 62px 84px 30px; gap: 8px; margin-bottom: 8px; align-items: center; }
.line-row .control input { padding: 10px; }
.line-row .del { border: 0; background: var(--err-soft); color: var(--err); border-radius: 8px;
  width: 30px; height: 38px; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.line-head { display: grid; grid-template-columns: 1fr 62px 84px 30px; gap: 8px; font-size: .72rem;
  text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.add-line { margin-top: 4px; background: var(--brand-soft); color: var(--brand-dark); border: 0;
  padding: 10px; border-radius: 8px; font-weight: 700; cursor: pointer; width: 100%; font-family: inherit; }
.add-line:hover { background: #dfeaff; }

.doc-actions { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }

/* Hoja del documento (vista previa) */
.doc-paper {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
  padding: 40px; color: #1a2030; font-size: 14px; line-height: 1.5;
}
.doc-paper .dp-top { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.dp-emisor { max-width: 55%; }
.dp-emisor .dp-name { font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.dp-emisor .dp-lines { color: #46506a; white-space: pre-line; margin-top: 4px; }
.dp-meta { text-align: right; }
.dp-meta .dp-doctype { font-weight: 800; font-size: 1.5rem; color: var(--brand-dark); letter-spacing: -.02em; text-transform: uppercase; }
.dp-meta .dp-row { color: #46506a; margin-top: 3px; }
.dp-meta .dp-row b { color: var(--ink); }
.dp-cliente { background: var(--bg-2); border-radius: 8px; padding: 12px 16px; margin-bottom: 22px; }
.dp-cliente .dp-cap { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.dp-cliente .dp-name { font-weight: 700; color: var(--ink); }
.dp-cliente .dp-lines { color: #46506a; white-space: pre-line; }

table.dp-table { width: 100%; border-collapse: collapse; margin-bottom: 18px; }
table.dp-table th { background: var(--ink); color: #fff; font-weight: 700; font-size: .78rem; text-transform: uppercase;
  letter-spacing: .03em; padding: 10px 12px; text-align: left; }
table.dp-table th.num, table.dp-table td.num { text-align: right; }
table.dp-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
table.dp-table tr:last-child td { border-bottom: 0; }

.dp-totals { margin-left: auto; width: 300px; }
.dp-totals .dp-t { display: flex; justify-content: space-between; padding: 6px 0; color: #46506a; }
.dp-totals .dp-grand { display: flex; justify-content: space-between; margin-top: 8px; padding: 12px 14px;
  background: var(--brand-softer); border-radius: 8px; font-weight: 800; color: var(--brand-dark); font-size: 1.15rem; }
.dp-notes { margin-top: 22px; color: #46506a; white-space: pre-line; }
.dp-foot { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.dp-sign { display: flex; gap: 40px; margin-top: 40px; }
.dp-sign > div { flex: 1; border-top: 1px solid #9aa4bb; padding-top: 6px; color: var(--muted); font-size: .8rem; }

/* Impresión: solo la hoja del documento */
@media print {
  body { background: #fff; }
  body * { visibility: hidden; }
  #doc-print, #doc-print * { visibility: visible; }
  #doc-print { position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; border: 0; border-radius: 0; padding: 0; }
  .cookie-banner { display: none !important; }
}

/* ============================================================
   Refinamiento minimalista + animaciones
   ============================================================ */

/* Título de sección alineado a la izquierda (bien orientado con el contenido) */
.section-head.left { text-align: left; max-width: none; margin-left: 0; margin-right: 0; margin-bottom: 26px; }
.section-head.left .kicker { justify-content: flex-start; }

/* Botón "Ver ejemplo" */
.ex-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--brand-softer); color: var(--brand-dark);
  border: 1px solid var(--brand-soft); border-radius: 999px;
  padding: 7px 15px; font-size: .84rem; font-weight: 700; font-family: inherit;
  cursor: pointer; margin: 2px 0 18px; transition: background .18s, transform .18s, box-shadow .18s;
}
.ex-btn:hover { background: #e2ecff; transform: translateY(-1px); box-shadow: 0 6px 16px -8px rgba(47,107,255,.5); }
.ex-btn:active { transform: translateY(0); }

/* Refinamiento de tarjetas: borde limpio, elevación sutil */
.tool-card { transition: transform .2s cubic-bezier(.16,.8,.24,1), box-shadow .25s, border-color .2s; }
a.tool-card:hover { transform: translateY(-4px); }
.tool-card .ic { transition: transform .25s cubic-bezier(.16,.8,.24,1); }
a.tool-card:hover .ic { transform: scale(1.06) rotate(-3deg); }
.btn-primary { box-shadow: 0 8px 20px -10px rgba(47,107,255,.7); }
.btn-primary:hover { box-shadow: 0 12px 26px -10px rgba(47,107,255,.75); }

/* Marca: animación de entrada de las barras */
@media (prefers-reduced-motion: no-preference) {
  .brand .mark svg rect { transform-origin: bottom; animation: barGrow .6s cubic-bezier(.16,.8,.24,1) both; }
  .brand .mark svg rect:nth-child(1){ animation-delay:.02s } .brand .mark svg rect:nth-child(2){ animation-delay:.12s } .brand .mark svg rect:nth-child(3){ animation-delay:.22s }
}
@keyframes barGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* Pulso del "en directo" un poco más orgánico */
.eyebrow .pulse { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100%{ box-shadow: 0 0 0 0 var(--ok-soft);} 50%{ box-shadow: 0 0 0 5px rgba(18,161,80,.12);} }

/* Reveal on-scroll (respeta reduce-motion) */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s cubic-bezier(.16,.8,.24,1), transform .7s cubic-bezier(.16,.8,.24,1); will-change: opacity, transform; }
  .reveal.in { opacity: 1; transform: none; }
  .reveal.d1 { transition-delay: .07s; } .reveal.d2 { transition-delay: .14s; } .reveal.d3 { transition-delay: .21s; } .reveal.d4 { transition-delay: .28s; } .reveal.d5 { transition-delay: .35s; }

  /* Entrada del hero al cargar */
  .hero .eyebrow, .hero h1, .hero .lead, .hero .hero-actions, .hero .trust,
  .tool-hero .kicker, .tool-hero h1, .tool-hero .lead {
    opacity: 0; animation: heroIn .8s cubic-bezier(.16,.8,.24,1) forwards;
  }
  .hero h1, .tool-hero h1 { animation-delay: .08s; }
  .hero .lead, .tool-hero .lead { animation-delay: .16s; }
  .hero .hero-actions { animation-delay: .24s; }
  .hero .trust { animation-delay: .32s; }
}
@keyframes heroIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* Fondo del hero con desplazamiento muy lento (elegante, casi imperceptible) */
@media (prefers-reduced-motion: no-preference) {
  .hero { background-size: 160% 160%, 160% 160%, auto; animation: heroBg 24s ease-in-out infinite alternate; }
}
@keyframes heroBg { from { background-position: 85% -10%, 5% 0%, 0 0; } to { background-position: 70% 0%, 15% 10%, 0 0; } }

/* Destello al rellenar con datos de ejemplo */
@media (prefers-reduced-motion: no-preference) {
  .result.flash { animation: flashHi 1.1s ease; border-radius: 10px; }
  @keyframes flashHi { 0% { background: var(--brand-soft); } 100% { background: transparent; } }
  #doc-print.flash { animation: ringHi 1.1s ease; }
  @keyframes ringHi { 0% { box-shadow: 0 0 0 3px var(--brand); } 100% { box-shadow: var(--shadow); } }
}


/* --------------------------- Guía de uso (pasos) --------------------------- */
.howto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  counter-reset: step;
}
.howto-step {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px 20px;
  position: relative;
  counter-increment: step;
  box-shadow: var(--shadow-sm);
}
.howto-step::before {
  content: counter(step);
  display: inline-flex;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-s);
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 800;
  margin-bottom: 12px;
}
.howto-step h3 { font-size: 1.02rem; margin-bottom: 6px; }
.howto-step p { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.55; }
/* --------------------------- Marquesina de herramientas --------------------------- */
.marquee { position: relative; overflow: hidden; background: #fff; border-bottom: 1px solid var(--line); padding: 16px 0; }
.marquee::before, .marquee::after { content: ""; position: absolute; top: 0; bottom: 0; width: clamp(40px, 8vw, 90px); z-index: 2; pointer-events: none; }
.marquee::before { left: 0; background: linear-gradient(90deg, #fff, transparent); }
.marquee::after { right: 0; background: linear-gradient(-90deg, #fff, transparent); }
.marquee-track { display: flex; width: max-content; }
.marquee-group { display: flex; gap: 12px; padding-right: 12px; }
.marquee-item {
  display: inline-flex; align-items: center; gap: 9px; white-space: nowrap;
  padding: 9px 18px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; box-shadow: var(--shadow-sm);
  font-weight: 600; font-size: .93rem; color: var(--ink-2);
  transition: border-color .2s, color .2s, box-shadow .2s;
}
.marquee-item .mi { font-size: 1.05rem; }
a.marquee-item:hover { text-decoration: none; color: var(--brand-dark); border-color: #c9d7f5; box-shadow: var(--shadow); }
@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: marqueeScroll 42s linear infinite; }
  .marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { width: auto; flex-wrap: wrap; justify-content: center; }
  .marquee-group[aria-hidden="true"] { display: none; }
}
@keyframes marqueeScroll { to { transform: translateX(-50%); } }

/* Checkbox en formularios de calculadora */
label.check { display: flex; align-items: flex-start; gap: 10px; font-size: .95rem; color: var(--ink-2); cursor: pointer; font-weight: 500; }
label.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand); flex-shrink: 0; }