/* =============================================================
   ÉCHACUENTA — Herramientas gratis para emprendedores mexicanos
   Single stylesheet, sectioned. Mobile-first. No preprocessor.

   Dark-first by design, not a "dark mode toggle": the platform's primary
   background is Onyx, exactly #020202 — not a derived gray, not #111.
   Candy Blue (#B2D5E5) is the one accent, used for text/links/icons
   directly on the dark surfaces (excellent contrast there) and, when used
   as a FILL (buttons/badges), paired with --on-accent (fixed dark text)
   since the accent itself is too light for light-on-light or the reverse.
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  /* The platform's primary background — literally Onyx, always. */
  --bg: #020202;
  --surface: #0e0e10;       /* cards/panels, one step up from bg for depth */
  --surface-alt: #17181b;   /* a further step up — alt sections, stripes */
  --border: #232427;
  --border-strong: #34363a;

  --ink: #f5f7f8;           /* body text — near-white, not pure #fff */
  --ink-soft: #aeb4b9;
  --ink-faint: #797f84;

  /* Candy Blue — the one brand accent. Same hex used for both --primary
     and --accent (one color, not a family) so every existing call-site
     stays on-brand automatically. */
  --primary: #b2d5e5;
  --primary-dark: #9bc8dc;  /* hover/active */
  --primary-soft: #12232b;  /* dark-tinted panel fill, e.g. result panels */
  --accent: #b2d5e5;
  --accent-dark: #9bc8dc;
  --accent-soft: #12232b;
  --on-accent: #020202;     /* fixed dark text for anything filled with the light accent */

  --success: #3ddc84;
  --success-soft: #0f2a1c;
  --danger: #ff6b6b;
  --danger-soft: #2c1414;
  --warning: #f2b84b;
  --warning-soft: #2c2211;

  --font-display: "Sora", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.6);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --header-h: 68px;
  --container-w: 1180px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; overflow-x: clip; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.1; letter-spacing: -0.02em; font-family: var(--font-display); font-weight: 700; }
ul, ol { padding-left: 1.2em; }
::selection { background: var(--accent); color: var(--on-accent); }
table { border-collapse: collapse; width: 100%; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .7rem 1.1rem; background: var(--on-accent); color: #fff;
  z-index: 9999; border-radius: var(--radius-sm); font-weight: 600;
  transition: top .25s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.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;
}

.container { width: 100%; max-width: var(--container-w); margin-inline: auto; padding-inline: 1.25rem; }
@media (min-width: 720px) { .container { padding-inline: 2rem; } }

.section { padding-block: 3.5rem; }
.section--tight { padding-block: 2rem; }
.section-head { max-width: 640px; margin-bottom: 2rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--primary); margin-bottom: .6rem;
}
.section-title { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin-bottom: .5rem; }
.section-sub { color: var(--ink-soft); font-size: 1.02rem; }

.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .75rem; font-weight: 600; padding: .3rem .65rem;
  border-radius: var(--radius-full); background: var(--surface-alt); color: var(--ink-soft);
  border: 1px solid var(--border);
}
.badge svg { width: 14px; height: 14px; flex: none; }

/* =============================================================
   4. Typography helpers
   ============================================================= */
.text-soft { color: var(--ink-soft); }
.text-accent { color: var(--accent); }
.text-primary { color: var(--primary); }
.mono { font-family: var(--font-mono); }

/* =============================================================
   5. Buttons & forms
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.4rem; border-radius: var(--radius-full);
  font-weight: 700; font-size: .96rem; line-height: 1;
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out), background-color .2s var(--ease-out), color .2s var(--ease-out);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--ink); color: var(--on-accent); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--ink-soft); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-sm); }
.btn-accent:hover { background: var(--accent-dark); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-secondary { background: var(--surface); color: var(--ink); border: 1.5px solid var(--border-strong); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--ink-soft); padding-inline: .8rem; }
.btn-ghost:hover { color: var(--primary); }
.btn-block { width: 100%; }
.btn-lg { padding: 1.05rem 1.8rem; font-size: 1.05rem; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn-copy.is-copied { background: var(--success); color: var(--on-accent); border-color: var(--success); }

.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.field label { font-size: .86rem; font-weight: 600; color: var(--ink); }
.field .hint { font-size: .78rem; color: var(--ink-faint); }
.input, select.input, textarea.input {
  width: 100%; padding: .78rem .9rem; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--ink);
  font-family: var(--font-body); font-size: .98rem;
  transition: border-color .18s var(--ease-out), box-shadow .18s var(--ease-out);
}
.input:focus, select.input:focus, textarea.input:focus {
  border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); outline: none;
}
textarea.input { resize: vertical; min-height: 5rem; }
.field-row { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 540px) { .field-row.cols-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 720px) { .field-row.cols-3 { grid-template-columns: repeat(3, 1fr); } .field-row.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.switch .track {
  position: absolute; inset: 0; background: var(--border-strong); border-radius: var(--radius-full);
  transition: background .2s var(--ease-out);
}
.switch .thumb {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease-out);
}
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track .thumb { transform: translateX(18px); }
.switch input:checked ~ .thumb { transform: translateX(18px); }

.chip-group { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  padding: .5rem 1rem; border-radius: var(--radius-full); border: 1.5px solid var(--border-strong);
  background: var(--surface); font-size: .88rem; font-weight: 600; color: var(--ink-soft);
  transition: all .18s var(--ease-out); cursor: pointer; position: relative;
}
.chip.is-active, .chip:has(input:checked) { background: var(--primary); border-color: var(--primary); color: var(--on-accent); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }

.color-swatches { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.color-dot {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--border-strong);
  cursor: pointer; position: relative;
}
.color-dot.is-active::after {
  content: ""; position: absolute; inset: -5px; border: 2px solid var(--primary); border-radius: 50%;
}
input[type="color"].color-custom { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--border-strong); padding: 0; overflow: hidden; cursor: pointer; }

.file-drop {
  display: flex; align-items: center; gap: .8rem; padding: .9rem; border-radius: var(--radius-sm);
  border: 1.5px dashed var(--border-strong); cursor: pointer; background: var(--surface-alt);
  transition: border-color .18s var(--ease-out);
}
.file-drop:hover, .file-drop.is-dragover { border-color: var(--primary); }
.file-drop img { width: 44px; height: 44px; object-fit: contain; border-radius: var(--radius-sm); background: var(--surface); }
.file-drop .file-drop-text { font-size: .88rem; color: var(--ink-soft); }
.file-drop input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* =============================================================
   6. Header / nav
   ============================================================= */
.site-header {
  position: sticky; top: 0; z-index: 500; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
@supports not (backdrop-filter: blur(1px)) { .site-header { background: var(--bg); } }
.site-header .container { height: 100%; display: flex; align-items: center; gap: 1.2rem; }
/* Official logo asset (assets/img/logo-echacuenta.jpeg) — the artwork is
   never redrawn or recomposed here, only resized per placement. */
.logo { display: flex; align-items: center; flex: none; }
.logo-img { width: 46px; height: 46px; border-radius: 10px; flex: none; object-fit: cover; }
.footer-mini-logo { flex: none; display: flex; }
.footer-mini-logo .logo-img { width: 34px; height: 34px; border-radius: 8px; }
.main-nav { display: none; align-items: center; gap: 1.6rem; margin-inline: auto; }
.main-nav a { font-size: .92rem; font-weight: 600; color: var(--ink-soft); transition: color .18s var(--ease-out); }
.main-nav a:hover { color: var(--primary); }
@media (min-width: 960px) { .main-nav { display: flex; } }

.header-actions { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.nav-search { position: relative; display: none; }
@media (min-width: 720px) { .nav-search { display: block; } }
.nav-search input {
  width: 220px; padding: .55rem .9rem .55rem 2.3rem; border-radius: var(--radius-full);
  border: 1.5px solid var(--border-strong); background: var(--surface); font-size: .88rem;
  transition: width .22s var(--ease-out), border-color .18s var(--ease-out);
}
.nav-search input:focus { width: 280px; border-color: var(--primary); outline: none; box-shadow: 0 0 0 4px var(--primary-soft); }
.nav-search svg { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-faint); pointer-events: none; }

.menu-toggle { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: var(--radius-sm); }
.menu-toggle svg { width: 22px; height: 22px; }
@media (min-width: 960px) { .menu-toggle { display: none; } }

.mobile-nav {
  position: fixed; inset: var(--header-h) 0 0 0; background: var(--bg); z-index: 490;
  transform: translateY(-8px); opacity: 0; pointer-events: none; transition: all .22s var(--ease-out);
  overflow-y: auto; padding: 1.5rem;
}
.mobile-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-nav .nav-search { display: block; margin-bottom: 1.2rem; }
.mobile-nav .nav-search input { width: 100%; }
.mobile-nav a { display: block; padding: .9rem .2rem; font-size: 1.05rem; font-weight: 700; border-bottom: 1px solid var(--border); }
@media (min-width: 960px) { .mobile-nav { display: none; } }

/* search results dropdown */
.search-results {
  position: absolute; top: calc(100% + .6rem); left: 0; right: 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  max-height: 340px; overflow-y: auto; z-index: 60; display: none; padding: .4rem;
}
.search-results.is-open { display: block; }
.search-results a { display: flex; align-items: center; gap: .6rem; padding: .6rem .7rem; border-radius: var(--radius-sm); font-size: .9rem; font-weight: 600; }
.search-results a:hover, .search-results a.is-active { background: var(--surface-alt); color: var(--primary); }
.search-results .cat { font-size: .72rem; color: var(--ink-faint); font-weight: 500; margin-left: auto; }
.search-empty { padding: .8rem; font-size: .85rem; color: var(--ink-faint); }
.mobile-nav .search-results { position: static; box-shadow: none; border: none; padding: 0; }

/* =============================================================
   7. Hero
   ============================================================= */
.hero { padding-block: 3rem 2.5rem; position: relative; overflow: clip; }
.hero-halo {
  position: absolute; inset: -30% -10% -60% -10%; z-index: -1;
  background: radial-gradient(45% 40% at 30% 20%, color-mix(in srgb, var(--primary) 22%, transparent), transparent 70%),
              radial-gradient(40% 35% at 80% 10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%);
  filter: blur(60px); pointer-events: none;
}
.hero-content { max-width: 760px; margin-inline: auto; text-align: center; }
.hero-brandplate {
  width: clamp(160px, 22vw, 220px); margin: 0 auto 1.2rem; border-radius: var(--radius-lg); overflow: clip;
}
.hero-brandplate .logo-img { width: 100%; height: auto; border-radius: var(--radius-lg); }
.hero h1 { font-size: clamp(2rem, 5.4vw, 3.4rem); margin-bottom: 1rem; }
.hero p.lead { font-size: clamp(1.02rem, 2vw, 1.22rem); color: var(--ink-soft); max-width: 600px; margin-inline: auto 1.8rem; margin-bottom: 1.8rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-bottom: 1.6rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }

.hero-search { max-width: 560px; margin: 0 auto 2rem; position: relative; }
.hero-search input {
  width: 100%; padding: 1.05rem 1.4rem 1.05rem 3.1rem; border-radius: var(--radius-full);
  border: 1.5px solid var(--border-strong); background: var(--surface); font-size: 1.02rem;
  box-shadow: var(--shadow-md);
}
.hero-search input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 5px var(--primary-soft); }
.hero-search svg { position: absolute; left: 1.15rem; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--ink-faint); }
.hero-search .search-results { top: calc(100% + .8rem); }

/* =============================================================
   8. Category grid (home)
   ============================================================= */
.capability-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem; }
@media (min-width: 720px) { .capability-grid { grid-template-columns: repeat(5, 1fr); } }
.capability-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; padding: 1.2rem 1.1rem;
  border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border);
  transition: all .2s var(--ease-out);
}
.capability-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.capability-card .icon-wrap { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.capability-card .icon-wrap svg { width: 21px; height: 21px; }
.capability-card h3 { font-size: .98rem; text-transform: uppercase; letter-spacing: .03em; }
.capability-card p { font-size: .82rem; color: var(--ink-soft); line-height: 1.4; }

.category-block { margin-bottom: 2.6rem; }
.category-block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.category-block-head h2 { font-size: 1.3rem; display: flex; align-items: center; gap: .5rem; }
.category-block-head h2 .cat-icon { width: 26px; height: 26px; color: var(--primary); flex: none; }
.tool-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 540px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .tool-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .tool-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.tool-mini-card {
  display: flex; gap: .9rem; align-items: flex-start; padding: 1.1rem; border-radius: var(--radius-md);
  background: var(--surface); border: 1px solid var(--border); transition: all .2s var(--ease-out);
}
.tool-mini-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tool-mini-card .icon-wrap {
  width: 42px; height: 42px; border-radius: var(--radius-sm); flex: none;
  display: flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary);
}
.tool-mini-card .icon-wrap svg { width: 22px; height: 22px; }
.tool-mini-card h3 { font-size: .98rem; margin-bottom: .25rem; }
.tool-mini-card p { font-size: .82rem; color: var(--ink-soft); line-height: 1.4; }

/* =============================================================
   9. How it works / audience / ideas
   ============================================================= */
.steps { display: grid; grid-template-columns: 1fr; gap: 1.2rem; counter-reset: step; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; padding: 1.6rem 1.4rem 1.4rem; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.step-num {
  width: 40px; height: 40px; border-radius: 50%; background: var(--on-accent);
  color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 1rem; font-family: var(--font-display);
}
.step h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.step p { color: var(--ink-soft); font-size: .92rem; }

.audience-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
@media (min-width: 540px) { .audience-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .audience-grid { grid-template-columns: repeat(4, 1fr); } }
.audience-chip {
  display: flex; align-items: center; gap: .6rem; padding: .9rem 1rem; border-radius: var(--radius-md);
  background: var(--surface); border: 1px solid var(--border); font-size: .88rem; font-weight: 600;
}
.audience-chip svg { width: 20px; height: 20px; color: var(--primary); flex: none; }

.ideas-list { display: grid; grid-template-columns: 1fr; gap: .7rem; }
@media (min-width: 720px) { .ideas-list { grid-template-columns: 1fr 1fr; } }
.idea-item { display: flex; gap: .7rem; padding: .9rem 1rem; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); font-size: .9rem; }
.idea-item svg { width: 18px; height: 18px; color: var(--success); flex: none; margin-top: .1rem; }

/* =============================================================
   10. Popular tools
   ============================================================= */
.popular-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 540px) { .popular-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .popular-grid { grid-template-columns: repeat(4, 1fr); } }
.popular-card {
  position: relative; padding: 1.3rem 1.1rem; border-radius: var(--radius-lg); background: var(--surface);
  border: 1px solid var(--border); overflow: clip; transition: all .2s var(--ease-out);
}
.popular-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.popular-card .rank { position: absolute; top: .8rem; right: .9rem; font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; color: var(--border-strong); }
.popular-card .icon-wrap { width: 46px; height: 46px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: .8rem; }
.popular-card .icon-wrap svg { width: 24px; height: 24px; }
.popular-card h3 { font-size: 1rem; margin-bottom: .3rem; }
.popular-card p { font-size: .8rem; color: var(--ink-soft); }

/* =============================================================
   11. Tool page shell
   ============================================================= */
.tool-hero { padding-block: 2rem 1.5rem; }
.breadcrumbs { display: flex; align-items: center; gap: .4rem; font-size: .82rem; color: var(--ink-faint); margin-bottom: 1rem; flex-wrap: wrap; }
.breadcrumbs a:hover { color: var(--primary); }
.tool-hero h1 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); margin-bottom: .6rem; max-width: 760px; }
.tool-hero .lead { color: var(--ink-soft); font-size: 1.02rem; max-width: 680px; }

.tool-layout { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
@media (min-width: 1120px) { .tool-layout.with-rail { grid-template-columns: minmax(0,1fr) 300px; } }

.tool-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem; box-shadow: var(--shadow-sm);
}
@media (min-width: 720px) { .tool-card { padding: 2rem; } }
.tool-card + .tool-card { margin-top: 1.5rem; }
.tool-card h2 { font-size: 1.1rem; margin-bottom: 1rem; }

.tool-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 1.2rem; }

.result-panel {
  background: var(--surface-alt);
  border: 1px solid var(--border); border-top: 3px solid var(--accent); border-radius: var(--radius-md); padding: 1.4rem;
  margin-top: 1.2rem;
}
.result-headline { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .3rem; }
.result-headline .label { font-size: .84rem; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.result-figure { font-family: var(--font-display); font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 800; color: var(--primary); line-height: 1.1; }
.result-figure.accent { color: var(--primary); }
.result-sub { font-size: .88rem; color: var(--ink-soft); margin-top: .2rem; }
.result-breakdown { margin-top: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.result-row { display: flex; align-items: center; justify-content: space-between; font-size: .92rem; padding-block: .3rem; border-bottom: 1px dashed var(--border); }
.result-row:last-child { border-bottom: none; }
.result-row .val { font-weight: 700; font-family: var(--font-mono); }
.result-row.total { font-size: 1.05rem; font-weight: 800; }

.action-row { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.2rem; }

.privacy-badge { display: flex; align-items: flex-start; gap: .6rem; margin-top: 1.2rem; padding: .9rem 1rem; background: var(--success-soft); border-radius: var(--radius-sm); font-size: .84rem; color: var(--ink-soft); }
.privacy-badge svg { width: 18px; height: 18px; color: var(--success); flex: none; margin-top: .1rem; }
.limits-note { font-size: .78rem; color: var(--ink-faint); margin-top: .5rem; }

.copy-feedback { font-size: .82rem; color: var(--success); font-weight: 600; opacity: 0; transition: opacity .2s; }
.copy-feedback.is-visible { opacity: 1; }

/* calculator error / warning banners — never let NaN/Infinity/undefined show */
.calc-banner {
  display: none; align-items: flex-start; gap: .6rem; margin-top: 1rem;
  padding: .85rem 1rem; border-radius: var(--radius-sm); font-size: .86rem; line-height: 1.5;
}
.calc-banner.is-visible { display: flex; }
.calc-banner svg { width: 18px; height: 18px; flex: none; margin-top: .1rem; }
.calc-banner--error { background: var(--danger-soft); color: var(--danger); }
.calc-banner--warning { background: var(--warning-soft); color: var(--warning); }
.result-panel.has-error .result-figure,
.result-panel.has-error .result-breakdown { opacity: .35; filter: grayscale(1); pointer-events: none; }
.result-explainer { font-size: .84rem; color: var(--ink-soft); margin-top: .9rem; padding-top: .9rem; border-top: 1px dashed var(--border); line-height: 1.55; }
.result-na { color: var(--ink-faint); font-style: italic; }

/* line items table (cotizaciones, recibos, menús, listas de precios) */
.items-table { width: 100%; border-collapse: collapse; margin-bottom: .8rem; }
.items-table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); padding: .5rem .4rem; border-bottom: 1.5px solid var(--border-strong); }
.items-table td { padding: .45rem .35rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.items-table input { padding: .5rem .55rem; font-size: .88rem; }
.items-table .col-qty { width: 70px; } .items-table .col-price { width: 110px; } .items-table .col-disc { width: 90px; } .items-table .col-total { width: 110px; text-align: right; font-family: var(--font-mono); font-weight: 700; }
.items-table .row-remove { width: 36px; text-align: center; }
.items-table .row-remove button { width: 30px; height: 30px; border-radius: 50%; color: var(--danger); }
.items-table .row-remove button:hover { background: var(--danger-soft); }
.table-scroll { overflow-x: auto; margin: 0 -.2rem; padding: 0 .2rem; }
.table-scroll .items-table { min-width: 560px; }

/* document preview (for cotización/recibo/menú/lista de precios) */
.doc-preview {
  background: #fff; color: #1a1a1a; border-radius: var(--radius-md); padding: 1.6rem;
  box-shadow: var(--shadow-md); font-size: .84rem; line-height: 1.5; border: 1px solid var(--border);
}
.doc-preview * { color: inherit; }
.doc-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; padding-bottom: 1rem; border-bottom: 2px solid var(--doc-accent, #2e6a82); margin-bottom: 1rem; }
.doc-head img { max-height: 56px; max-width: 140px; object-fit: contain; }
.doc-brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; }
.doc-brand-meta { font-size: .76rem; color: #666; margin-top: .2rem; }
.doc-title { text-align: right; }
.doc-title .kind { font-weight: 800; font-size: 1.1rem; color: var(--doc-accent, #2e6a82); text-transform: uppercase; letter-spacing: .04em; }
.doc-title .meta { font-size: .76rem; color: #666; margin-top: .3rem; }
.doc-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; font-size: .8rem; }
.doc-parties .label { font-size: .68rem; text-transform: uppercase; color: #888; font-weight: 700; margin-bottom: .2rem; }
.doc-totals { margin-left: auto; width: 100%; max-width: 260px; margin-top: .6rem; }
.doc-totals .r { display: flex; justify-content: space-between; padding: .25rem 0; font-size: .82rem; }
.doc-totals .r.total { border-top: 2px solid var(--doc-accent, #2e6a82); margin-top: .3rem; padding-top: .5rem; font-weight: 800; font-size: 1rem; }
.doc-notes { margin-top: 1rem; font-size: .76rem; color: #666; border-top: 1px dashed #ddd; padding-top: .8rem; }
.doc-foot { margin-top: 1.4rem; text-align: center; font-size: .7rem; color: #999; }

/* =============================================================
   12. Ad slots — PLACEHOLDERS ONLY
   ============================================================= */
.ad-slot {
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: .3rem;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius-md); background: var(--surface-alt);
  color: var(--ink-faint); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.ad-slot::before { content: "ANUNCIO"; }
.ad-slot .ad-note { text-transform: none; font-weight: 400; font-size: .74rem; letter-spacing: 0; }
.ad-slot--leaderboard { min-height: 90px; margin-block: 1.6rem; }
.ad-slot--incontent { min-height: 250px; margin-block: 2rem; max-width: 336px; margin-inline: auto; }
.ad-slot--sidebar { min-height: 600px; display: none; }
@media (min-width: 1120px) { .ad-slot--sidebar { display: flex; position: sticky; top: calc(var(--header-h) + 1.5rem); } }
.ad-slot--section { min-height: 100px; margin-block: 2.6rem; }
.ad-slot--rect { min-height: 250px; }

.corner-ad {
  position: fixed; bottom: 1rem; right: 1rem; z-index: 400; max-width: 260px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); padding: .85rem .9rem; display: flex; gap: .6rem; align-items: flex-start;
  transform: translateY(140%); transition: transform .35s var(--ease-bounce);
}
.corner-ad.is-visible { transform: translateY(0); }
.corner-ad .ad-slot { flex: 1; min-height: 60px; border-style: dashed; }
.corner-ad .close-btn { flex: none; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--ink-faint); }
.corner-ad .close-btn:hover { background: var(--surface-alt); color: var(--ink); }
.corner-ad .close-btn svg { width: 14px; height: 14px; }
@media (max-width: 539px) { .corner-ad { left: 1rem; right: 1rem; max-width: none; bottom: .8rem; } }

/* download interstitial dialog */
.dl-dialog { border: none; border-radius: var(--radius-lg); padding: 0; max-width: 420px; width: calc(100% - 2rem); box-shadow: var(--shadow-lg); background: var(--surface); color: var(--ink); }
.dl-dialog::backdrop { background: rgba(15, 14, 23, .55); backdrop-filter: blur(2px); }
.dl-dialog-inner { padding: 1.5rem; }
.dl-dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.dl-dialog-head strong { font-family: var(--font-display); font-size: 1rem; }
.dl-dialog-head button { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.dl-dialog-head button:hover { background: var(--surface-alt); }
.dl-dialog-head button svg { width: 16px; height: 16px; }
.dl-dialog .ad-slot { min-height: 200px; }
.dl-dialog-foot { margin-top: 1rem; text-align: center; }

/* =============================================================
   13. FAQ
   ============================================================= */
.faq-list { display: flex; flex-direction: column; gap: .7rem; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: clip; }
.faq-item summary {
  padding: 1.1rem 1.3rem; font-weight: 700; font-size: .96rem; cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chevron { flex: none; width: 20px; height: 20px; color: var(--ink-faint); transition: transform .22s var(--ease-out); }
.faq-item[open] summary .chevron { transform: rotate(180deg); }
.faq-item .faq-body { padding: 0 1.3rem 1.1rem; color: var(--ink-soft); font-size: .9rem; line-height: 1.6; }

/* =============================================================
   14. More tools / cross-links
   ============================================================= */
.more-tools-grid { display: grid; grid-template-columns: 1fr; gap: .9rem; }
@media (min-width: 720px) { .more-tools-grid { grid-template-columns: repeat(3, 1fr); } }

/* =============================================================
   15. Footer
   ============================================================= */
.site-footer { border-top: 1px solid var(--border); padding-block: 2.6rem 1.6rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-bottom: 2rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-brand .logo { margin-bottom: .8rem; }
.footer-brand p { color: var(--ink-soft); font-size: .88rem; max-width: 320px; }
.footer-col h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); margin-bottom: .9rem; }
.footer-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.footer-col a { font-size: .88rem; color: var(--ink-soft); }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: .8rem 1.4rem; align-items: center; justify-content: space-between; padding-top: 1.6rem; border-top: 1px solid var(--border); font-size: .8rem; color: var(--ink-faint); }
.footer-legal-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer-legal-links a:hover { color: var(--primary); }
.credits-line { font-size: .74rem; color: var(--ink-faint); margin-top: .4rem; }

/* =============================================================
   16. Legal pages
   ============================================================= */
.legal-page { padding-block: 3rem; max-width: 760px; }
.legal-page h1 { margin-bottom: 1.2rem; }
.legal-page h2 { font-size: 1.15rem; margin-top: 1.8rem; margin-bottom: .6rem; }
.legal-page p, .legal-page li { color: var(--ink-soft); font-size: .95rem; margin-bottom: .8rem; }
.legal-page .updated { font-size: .82rem; color: var(--ink-faint); margin-bottom: 2rem; }

/* =============================================================
   17. Print
   ============================================================= */
@media print {
  .site-header, .site-footer, .ad-slot, .corner-ad, .action-row, .tool-toolbar, .more-tools-grid, .faq-list, .breadcrumbs, .hero-halo { display: none !important; }
  .doc-preview { box-shadow: none; border: none; }
  body { background: #fff; }
}

/* =============================================================
   18. Misc components (JSON viewer-like tables, converter)
   ============================================================= */
.qr-preview-wrap { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.qr-canvas-holder { background: #fff; border-radius: var(--radius-md); padding: 1rem; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.qr-canvas-holder canvas, .qr-canvas-holder img { display: block; }
.download-btn-big { font-size: 1rem; padding: 1.1rem 2rem; }
.wa-link-box { display: flex; gap: .6rem; align-items: center; background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .7rem .9rem; font-family: var(--font-mono); font-size: .85rem; word-break: break-all; }
.wa-link-box span { flex: 1; }
.stat-tiles { display: grid; grid-template-columns: repeat(2,1fr); gap: .8rem; }
@media (min-width: 540px) { .stat-tiles { grid-template-columns: repeat(4,1fr); } }
.stat-tile { background: var(--surface-alt); border-radius: var(--radius-sm); padding: .9rem; text-align: center; }
.stat-tile .n { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--primary); }
.stat-tile .l { font-size: .72rem; color: var(--ink-soft); margin-top: .2rem; }

.convert-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: center; }
@media (min-width: 720px) { .convert-grid { grid-template-columns: 1fr auto 1fr; } }
.convert-swap { display: flex; align-items: center; justify-content: center; }
.convert-swap button { width: 44px; height: 44px; border-radius: 50%; background: var(--surface-alt); border: 1px solid var(--border); }
.convert-swap button:hover { background: var(--primary-soft); color: var(--primary); }
@media (max-width: 719px) { .convert-swap button { transform: rotate(90deg); } }

.card-preview-wrap { display: flex; justify-content: center; }
.digital-card {
  width: 320px; border-radius: 20px; padding: 1.6rem; color: #fff; position: relative; overflow: clip;
  background: linear-gradient(150deg, var(--card-color1, #2e6a82), var(--card-color2, #b2d5e5));
  box-shadow: var(--shadow-lg);
}
.digital-card .dc-logo { width: 56px; height: 56px; border-radius: 14px; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; overflow: hidden; }
.digital-card .dc-logo img { width: 100%; height: 100%; object-fit: cover; }
.digital-card .dc-name { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; }
.digital-card .dc-role { font-size: .84rem; opacity: .85; margin-bottom: 1rem; }
.digital-card .dc-row { display: flex; align-items: center; gap: .55rem; font-size: .82rem; padding: .3rem 0; opacity: .95; }
.digital-card .dc-row svg { width: 16px; height: 16px; flex: none; }

.menu-doc-cat { font-weight: 800; text-transform: uppercase; letter-spacing: .05em; font-size: .78rem; color: var(--doc-accent, #2e6a82); margin: 1rem 0 .4rem; }
.menu-doc-item { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; border-bottom: 1px dotted #ddd; font-size: .84rem; }
.menu-doc-item .desc { font-size: .72rem; color: #888; display: block; }
