/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f0f1f4;
  --border: #e2e4ea;
  --border-strong: #cbced8;
  --text: #1a1d29;
  --text-muted: #656b7a;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef0ff;
  --danger: #dc2626;
  --danger-soft: #fdeaea;
  --success: #16a34a;
  --warning: #b45309;
  --warning-soft: #fef3c7;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(20, 22, 40, .06);
  --shadow-md: 0 8px 24px rgba(20, 22, 40, .10);
  --shadow-lg: 0 20px 48px rgba(20, 22, 40, .16);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121319;
    --surface: #1b1d27;
    --surface-2: #22242f;
    --border: #2d2f3b;
    --border-strong: #3a3d4c;
    --text: #f0f1f6;
    --text-muted: #9a9fb0;
    --accent: #818cf8;
    --accent-hover: #a5b0fb;
    --accent-soft: #262a45;
    --danger: #f87171;
    --danger-soft: #3a2229;
    --success: #4ade80;
    --warning: #fbbf24;
    --warning-soft: #3f2d0f;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, .4);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, .5);
  }
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2 { text-wrap: balance; line-height: 1.12; letter-spacing: -0.02em; }
::selection { background: var(--accent); color: #fff; }

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

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 1.25rem; }

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--surface); color: var(--text);
  z-index: 9999; border-radius: 8px; font-weight: 500; box-shadow: var(--shadow-md);
}
.skip-link:focus { top: 1rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.4rem; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .95rem;
  transition: background-color .15s var(--ease-out), transform .1s var(--ease-out), box-shadow .15s var(--ease-out);
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { background: var(--border-strong); color: var(--text-muted); cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); }

/* =============================================================
   4. Header / Footer
   ============================================================= */
.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .9rem; }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.15rem; color: var(--text); }
.brand-icon { width: 22px; height: 22px; color: var(--accent); }
.header-note { font-size: .82rem; color: var(--text-muted); font-weight: 500; }
@media (max-width: 539px) { .header-note { display: none; } }

.site-footer { margin-top: auto; border-top: 1px solid var(--border); padding-block: 1.5rem; color: var(--text-muted); font-size: .85rem; }

main { flex: 1; }

/* =============================================================
   5. Hero
   ============================================================= */
.hero { padding-block: 2.5rem 1.5rem; text-align: center; }
.hero h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); max-width: 20ch; margin-inline: auto; }
.hero .subtitle { margin: .9rem auto 0; max-width: 56ch; color: var(--text-muted); font-size: 1.02rem; }

/* =============================================================
   6. Tool section & card
   ============================================================= */
.tool-section { padding-bottom: 3rem; }

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  min-height: 260px;
}

.tool-card [data-panel] { display: none; }
.tool-card[data-state="loading"] [data-panel="loading"] { display: flex; }
.tool-card[data-state="error"] [data-panel="error"] { display: flex; }
.tool-card[data-state="working"] [data-panel="working"] { display: block; }
.tool-card[data-state="idle"] .dropzone { display: flex; }

.limits-note { margin-top: 1rem; text-align: center; font-size: .85rem; color: var(--text-muted); }

/* ----- Dropzone ----- */
.dropzone {
  display: none;
  align-items: center; justify-content: center;
  padding: 3rem 1.5rem;
  min-height: 320px;
}
.dropzone.is-dragover { background: var(--accent-soft); }
.dropzone-label {
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  text-align: center; cursor: pointer; width: 100%; max-width: 420px;
  padding: 2rem 1.5rem;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  transition: border-color .15s var(--ease-out), background-color .15s var(--ease-out);
}
.dropzone-label:hover, .dropzone.is-dragover .dropzone-label { border-color: var(--accent); }
.dropzone-icon { width: 40px; height: 40px; color: var(--accent); margin-bottom: .3rem; }
.dropzone-title { font-weight: 700; font-size: 1.15rem; }
.dropzone-sub { color: var(--text-muted); font-size: .92rem; margin-bottom: .5rem; }
.dropzone-btn { margin-top: .4rem; pointer-events: none; }

/* ----- Loading / Error panels ----- */
.state-panel {
  flex-direction: column; align-items: center; justify-content: center;
  gap: .9rem; padding: 3.5rem 1.5rem; text-align: center; min-height: 320px;
}
.loading-title, .error-title { font-weight: 700; font-size: 1.1rem; }
.error-detail { color: var(--text-muted); max-width: 42ch; }
.error-icon { width: 44px; height: 44px; color: var(--danger); }

.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.progress-track {
  width: 100%; max-width: 320px; height: 8px; border-radius: 999px;
  background: var(--surface-2); overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0%; background: var(--accent);
  border-radius: 999px; transition: width .2s var(--ease-out);
}
.loading-detail { color: var(--text-muted); font-size: .88rem; min-height: 1.2em; }

/* ----- Toolbar ----- */
.editor { padding: 1rem 1rem 1.25rem; }
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem;
  padding-bottom: .9rem; margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.toolbar-group { display: flex; flex-wrap: wrap; gap: .4rem; }
.toolbar-count {
  font-size: .85rem; font-weight: 600; color: var(--text-muted);
  padding: .35rem .7rem; background: var(--surface-2); border-radius: 999px;
  white-space: nowrap;
}

.tbtn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem .8rem; border-radius: var(--radius-sm);
  font-size: .85rem; font-weight: 600;
  background: var(--surface-2); border: 1px solid transparent;
  transition: background-color .15s var(--ease-out), color .15s var(--ease-out), opacity .15s var(--ease-out);
}
.tbtn svg { width: 16px; height: 16px; flex: none; }
.tbtn:hover:not(:disabled) { background: var(--border); }
.tbtn:disabled { opacity: .4; cursor: not-allowed; }
.tbtn-danger:hover:not(:disabled) { background: var(--danger-soft); color: var(--danger); }

.perf-warning {
  font-size: .82rem; color: var(--text-muted); background: var(--surface-2);
  border-radius: var(--radius-sm); padding: .5rem .8rem; margin-bottom: 1rem;
}

.split-summary { font-weight: 700; margin: 0 0 .3rem; }
.split-hint { font-size: .85rem; color: var(--text-muted); margin: 0 0 1.2rem; }

/* ----- Pages grid ----- */
.pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  padding-bottom: .5rem;
}

.page-card {
  position: relative;
  background: var(--surface-2);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: .6rem .6rem .5rem;
  display: flex; flex-direction: column; gap: .5rem;
  touch-action: pan-y;
  transition: border-color .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.page-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.page-card.is-dragging { z-index: 40; box-shadow: var(--shadow-lg); cursor: grabbing; transition: none; }
.pages-grid.is-reordering .page-card:not(.is-dragging) { transition: transform .15s var(--ease-out); }

.page-card.drop-before::before,
.page-card.drop-after::after {
  content: ""; position: absolute; top: 4px; bottom: 4px; width: 3px;
  background: var(--accent); border-radius: 3px;
}
.page-card.drop-before::before { left: -7px; }
.page-card.drop-after::after { right: -7px; }

.page-check {
  position: absolute; top: .5rem; left: .5rem; z-index: 2;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface); border: 1.5px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  transition: background-color .15s var(--ease-out), border-color .15s var(--ease-out);
}
.page-check .check-icon { width: 16px; height: 16px; color: #fff; opacity: 0; transition: opacity .1s; }
.page-card.is-selected .page-check { background: var(--accent); border-color: var(--accent); }
.page-card.is-selected .page-check .check-icon { opacity: 1; }

.drag-handle {
  position: absolute; top: .5rem; right: .5rem; z-index: 2;
  width: 26px; height: 26px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); touch-action: none;
  background: var(--surface); border: 1px solid var(--border);
}
.drag-handle svg { width: 15px; height: 15px; fill: currentColor; }
.drag-handle:hover { color: var(--text); }
.drag-handle:active { cursor: grabbing; }

.split-toggle {
  position: absolute; top: 50%; right: -14px; z-index: 3;
  width: 28px; height: 28px; border-radius: 50%; transform: translateY(-50%);
  background: var(--surface); border: 1.5px solid var(--border-strong);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: background-color .15s var(--ease-out), border-color .15s var(--ease-out), color .15s var(--ease-out);
}
.split-toggle svg { width: 15px; height: 15px; }
.split-toggle.is-split { background: var(--accent); border-color: var(--accent); color: #fff; }
.split-toggle[hidden] { display: none; }

.preview-part { display: flex; flex-direction: column; gap: .4rem; align-items: center; }
.preview-part-label { font-size: .78rem; color: var(--text-muted); text-align: center; }

.page-thumb-frame {
  width: 100%; aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
}
.page-thumb { max-width: 88%; max-height: 88%; object-fit: contain; transition: transform .2s var(--ease-out); box-shadow: 0 1px 4px rgba(0,0,0,.15); }

.page-card-footer { display: flex; flex-direction: column; gap: .4rem; align-items: center; }
.page-number { font-size: .78rem; font-weight: 700; color: var(--text-muted); }
.page-actions { display: flex; gap: .15rem; }
.icon-btn {
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; color: var(--text-muted);
  transition: background-color .15s var(--ease-out), color .15s var(--ease-out);
}
.icon-btn:hover:not(:disabled) { background: var(--border); color: var(--text); }
.icon-btn:disabled { opacity: .3; cursor: not-allowed; }
.icon-btn-danger:hover:not(:disabled) { background: var(--danger-soft); color: var(--danger); }

/* ----- Download bar ----- */
.download-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  position: sticky; bottom: 0;
}
.privacy-note { font-size: .82rem; color: var(--text-muted); }
.btn-download { min-width: 180px; }

/* =============================================================
   7. Preview modal
   ============================================================= */
.preview-modal {
  border: none; border-radius: var(--radius-lg); padding: 0;
  width: min(720px, calc(100vw - 2rem));
  max-height: min(88vh, 760px);
  background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-lg);
}
.preview-modal::backdrop { background: rgba(10, 11, 20, .55); backdrop-filter: blur(2px); }
.preview-modal-inner { display: flex; flex-direction: column; max-height: min(88vh, 760px); }
.preview-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
}
.preview-modal-header h2 { font-size: 1.1rem; }
.preview-modal-body { padding: 1.25rem; overflow-y: auto; flex: 1; }
.preview-loading { display: flex; flex-direction: column; align-items: center; gap: .8rem; padding: 3rem 0; color: var(--text-muted); }
.preview-strip {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .8rem;
}
.preview-loading[hidden], .preview-strip[hidden] { display: none; }
.preview-thumb { width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.preview-modal-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1rem 1.25rem; border-top: 1px solid var(--border);
}
.preview-summary { font-size: .88rem; color: var(--text-muted); font-weight: 600; }
.preview-modal-actions { display: flex; gap: .6rem; }

/* =============================================================
   8. Toast
   ============================================================= */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
  background: var(--text); color: var(--bg);
  padding: .7rem 1.1rem; border-radius: var(--radius-sm);
  font-size: .88rem; font-weight: 600; box-shadow: var(--shadow-lg);
  z-index: 200; max-width: calc(100vw - 2rem); text-align: center;
}
.toast.toast-error { background: var(--danger); color: #fff; }

/* =============================================================
   9. Responsive
   ============================================================= */
@media (max-width: 539px) {
  .container { padding-inline: 1rem; }
  .hero { padding-block: 1.6rem 1rem; }
  .toolbar { gap: .5rem .6rem; }
  .toolbar-count { order: -1; width: 100%; text-align: center; }
  .tbtn span { display: none; }
  .tbtn svg { width: 18px; height: 18px; }
  .tbtn { padding: .55rem; }
  .pages-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .7rem; }
  .download-bar { flex-direction: column; align-items: stretch; text-align: center; }
  .btn-download { width: 100%; }
}

@media (min-width: 720px) {
  .pages-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1.1rem; }
}

@media (min-width: 960px) {
  .editor { padding: 1.25rem 1.5rem 1.5rem; }
}

/* =============================================================
   10. Reduced motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* =============================================================
   11. Landing page sections (nav, hero trust row, steps,
   benefits, privacy, other tools, faq, footer)
   ============================================================= */

/* ---- header nav ---- */
.main-nav { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; }
.main-nav a {
  font-size: .9rem; font-weight: 600; color: var(--text-muted);
  padding: .3rem 0; transition: color .15s var(--ease-out);
}
.main-nav a:hover { color: var(--accent); }

/* ---- hero trust row ---- */
.trust-row {
  list-style: none; display: flex; flex-wrap: wrap; justify-content: center;
  gap: .5rem .9rem; margin-top: 1.1rem; padding: 0;
}
.trust-row li {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .85rem; font-weight: 600; color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border);
  padding: .4rem .8rem; border-radius: 999px;
}

/* ---- shared section chrome ---- */
.section-steps, .section-benefits, .section-privacy,
.section-other-tools, .section-faq { padding-block: 3.5rem; }
.section-benefits, .section-other-tools { background: var(--surface); }
.section-steps h2, .section-benefits h2, .section-privacy h2,
.section-other-tools h2, .section-faq h2 {
  font-size: clamp(1.5rem, 3vw, 2rem); text-align: center; max-width: 32ch; margin-inline: auto;
}
.section-subtitle {
  text-align: center; color: var(--text-muted); max-width: 48ch; margin: .6rem auto 0;
}

/* ---- cómo funciona (3 steps) ---- */
.steps-grid {
  list-style: none; padding: 0; margin-top: 2rem;
  display: grid; gap: 1.25rem; grid-template-columns: 1fr;
}
.step-card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.75rem 1.5rem 1.5rem; text-align: center;
}
.step-number {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff;
  font-weight: 700; font-size: .85rem; display: flex; align-items: center; justify-content: center;
}
.step-icon { width: 32px; height: 32px; color: var(--accent); margin: .5rem auto 1rem; }
.step-card h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.step-card p { color: var(--text-muted); font-size: .92rem; }

/* ---- beneficios ---- */
.benefits-grid { display: grid; gap: 1.1rem; grid-template-columns: 1fr; margin-top: 2rem; }
.benefit-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 1.5rem;
}
.benefit-card svg { width: 30px; height: 30px; color: var(--accent); margin-bottom: .8rem; }
.benefit-card h3 { font-size: 1rem; margin-bottom: .4rem; }
.benefit-card p { color: var(--text-muted); font-size: .9rem; }

/* ---- privacidad ---- */
.privacy-inner {
  display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: center;
}
.privacy-copy h2 { text-align: left; margin-inline: 0; max-width: none; }
.privacy-copy p { color: var(--text-muted); margin-top: .9rem; }
.privacy-copy p strong { color: var(--text); }
.privacy-visual {
  display: flex; flex-direction: column; align-items: center; gap: .8rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.privacy-visual svg { width: 100%; max-width: 260px; color: var(--accent); }
.privacy-visual span { font-size: .85rem; font-weight: 600; color: var(--text-muted); text-align: center; }

/* ---- otras herramientas ---- */
.other-tools-grid {
  display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); margin-top: 2rem;
}
.tool-chip-card {
  display: flex; flex-direction: column; align-items: center; gap: .6rem; text-align: center;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
}
.tool-chip-card svg { width: 28px; height: 28px; color: var(--text-muted); }
.tool-chip-card span:first-of-type { font-weight: 600; font-size: .92rem; }
.badge-soon {
  font-size: .72rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: .2rem .55rem; border-radius: 999px;
}

/* ---- faq ---- */
.faq-list { max-width: 720px; margin: 2rem auto 0; display: flex; flex-direction: column; gap: .7rem; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}
.faq-item summary {
  cursor: pointer; font-weight: 600; 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::after {
  content: "+"; font-size: 1.3rem; color: var(--accent); font-weight: 400; flex: none;
  transition: transform .2s var(--ease-out);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--text-muted); margin-top: .8rem; font-size: .92rem; }

/* ---- footer ---- */
.footer-inner {
  display: flex; flex-direction: column; gap: 1.5rem; padding-block: 2rem 1.5rem;
}
.footer-brand .brand { font-size: 1.05rem; margin-bottom: .5rem; }
.footer-brand p { color: var(--text-muted); font-size: .88rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; }
.footer-links a { font-size: .88rem; color: var(--text-muted); transition: color .15s var(--ease-out); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { padding-block: 1.25rem; border-top: 1px solid var(--border); font-size: .85rem; color: var(--text-muted); }

/* ---- breadcrumb ---- */
.breadcrumb { padding-block: .75rem 0; }
.breadcrumb ol {
  list-style: none; display: flex; flex-wrap: wrap; align-items: center;
  gap: .4rem; margin: 0; padding: 0; font-size: .82rem; color: var(--text-muted);
}
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: .4rem; color: var(--border-strong); }
.breadcrumb a { color: var(--text-muted); transition: color .15s var(--ease-out); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb li[aria-current="page"] { color: var(--text); font-weight: 600; }

/* ---- SEO text section ---- */
.section-seo-text { padding-block: 3.5rem; }
.seo-text { max-width: 760px; }
.seo-text h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
.seo-text p, .seo-text li { color: var(--text-muted); font-size: .96rem; }
.seo-text p { margin-top: 1rem; }
.seo-text ul { margin-top: .8rem; padding-left: 1.3rem; display: flex; flex-direction: column; gap: .5rem; }
.seo-text a { color: var(--accent); font-weight: 600; }
.seo-text a:hover { text-decoration: underline; }

/* =============================================================
   12. Landing responsive
   ============================================================= */
@media (max-width: 959px) {
  .main-nav { display: none; }
}

@media (min-width: 720px) {
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
  .other-tools-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { flex-direction: row; align-items: flex-start; justify-content: space-between; }
}

@media (min-width: 960px) {
  .benefits-grid { grid-template-columns: repeat(4, 1fr); }
  .privacy-inner { grid-template-columns: 1.1fr 0.9fr; }
}

/* =============================================================
   13. Ad placeholders (visual only — no ad network wired up yet)

   Every slot is a plain, dashed-border "ANUNCIO" box marked with
   data-ad-slot="<name>" and an HTML comment showing where a real
   <ins class="adsbygoogle"> unit (or another network's snippet)
   would replace it later. Reserved sizes match common AdSense
   formats so swapping them in won't reflow the page.
   ============================================================= */

.ad-slot {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--text-muted);
}
.ad-slot-label {
  font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .78rem;
}

/* ---- 1. leaderboard: full-width banner under the tool ---- */
.ad-slot--leaderboard { width: 100%; min-height: 90px; margin-block: 2rem 0; }

/* ---- 2. in-content rectangle (classic 300x250) ---- */
.ad-slot--rectangle { width: 300px; max-width: 100%; height: 250px; margin: 2rem auto; }

/* ---- 3. desktop skyscraper (160x600), fixed alongside the content ---- */
.ad-slot--skyscraper {
  position: fixed; top: 50%; right: 20px; transform: translateY(-50%);
  width: 160px; height: 600px; z-index: 50;
}
@media (max-width: 1599px) { .ad-slot--skyscraper { display: none; } }

/* ---- 5. small corner placeholder, dismissible ---- */
.ad-slot--corner {
  position: fixed; right: 16px; bottom: 16px; width: 240px; height: 90px;
  z-index: 150; box-shadow: var(--shadow-md); padding-top: .5rem;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
}
.ad-slot--corner.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.ad-corner-close {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; color: var(--text-muted);
}
.ad-corner-close:hover { color: var(--text); background: var(--border); }
@media (max-width: 539px) {
  .ad-slot--corner { width: 190px; height: 78px; right: 10px; bottom: 10px; }
}

/* ---- 4. download interstitial modal ---- */
.ad-modal {
  border: none; border-radius: var(--radius-lg); padding: 0;
  width: min(420px, calc(100vw - 2rem));
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg);
}
.ad-modal::backdrop { background: rgba(10, 11, 20, .55); backdrop-filter: blur(2px); }
.ad-modal-inner { position: relative; padding: 2.5rem 1.5rem 1.5rem; display: flex; flex-direction: column; align-items: center; gap: 1.25rem; }
.ad-modal-close {
  position: absolute; top: .75rem; right: .75rem; width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: .95rem;
}
.ad-modal-close:hover { background: var(--border); }
.ad-slot--modal { width: 100%; height: 250px; }
.ad-modal-continue { width: 100%; }

/* =============================================================
   14. Multi-file tools (unir-pdf, …): files strip + page source badge
   ============================================================= */

.files-strip-title, .pages-grid-title {
  font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-muted); margin-bottom: .75rem;
}
.files-strip-title { margin-top: 0; }
.pages-grid-title { margin-top: 1.5rem; }

.files-strip {
  display: flex; flex-wrap: wrap; gap: .75rem;
  padding-bottom: 1.25rem; border-bottom: 1px solid var(--border);
}
.file-chip {
  position: relative;
  display: flex; align-items: center; gap: .6rem;
  background: var(--surface-2); border: 2px solid transparent; border-radius: var(--radius-md);
  padding: .6rem 2.4rem .6rem .7rem;
  min-width: 190px; max-width: 260px;
  touch-action: pan-y;
  transition: border-color .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.file-chip.is-dragging { z-index: 40; box-shadow: var(--shadow-lg); cursor: grabbing; transition: none; }
.files-strip.is-reordering .file-chip:not(.is-dragging) { transition: transform .15s var(--ease-out); }
.file-chip.drop-before::before, .file-chip.drop-after::after {
  content: ""; position: absolute; top: 4px; bottom: 4px; width: 3px;
  background: var(--accent); border-radius: 3px;
}
.file-chip.drop-before::before { left: -7px; }
.file-chip.drop-after::after { right: -7px; }
.file-chip-icon { width: 24px; height: 24px; color: var(--accent); flex: none; }
.file-chip-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.file-chip-name { font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-chip-pages { font-size: .75rem; color: var(--text-muted); }
.file-chip-actions { display: flex; gap: .1rem; flex: none; }

/* page-source badge on the (checkbox-less) merge page-card */
.page-source {
  display: block; font-size: .68rem; color: var(--text-muted);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-align: center; margin-top: -.2rem;
}

/* "already live" tool chip in the Más herramientas grid (real link, not a placeholder) */
a.tool-chip-card.tool-chip-card--live { cursor: pointer; }
a.tool-chip-card.tool-chip-card--live:hover { border-color: var(--accent); }
.badge-live {
  font-size: .72rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
  color: var(--success); background: color-mix(in srgb, var(--success) 16%, transparent);
  padding: .2rem .55rem; border-radius: 999px;
}

@media (max-width: 539px) {
  .file-chip { min-width: 150px; }
}

/* =============================================================
   15. Single-file summary tools (comprimir-pdf, …): static file
   card, honest text-heavy warning, compression level picker
   ============================================================= */

/* reuses .file-chip's look but as a plain, non-reorderable summary row */
.file-chip--static {
  max-width: 420px; padding-right: .9rem; margin-bottom: 1.5rem;
}

.text-warning {
  display: flex; gap: .6rem; align-items: flex-start;
  background: var(--warning-soft); color: var(--warning);
  border: 1px solid var(--warning); border-radius: var(--radius-md);
  padding: .9rem 1rem; margin-bottom: 1.5rem; font-size: .88rem; line-height: 1.5;
}
.text-warning::before { content: "⚠️"; flex: none; }

.level-picker { border: 0; padding: 0; margin: 0 0 1.5rem; }
.level-picker legend {
  font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-muted); padding: 0; margin-bottom: .75rem;
}
.level-option {
  display: flex; align-items: center; gap: .9rem;
  padding: .9rem 1.1rem; border: 2px solid var(--border); border-radius: var(--radius-md);
  cursor: pointer; margin-bottom: .7rem;
  transition: border-color .15s var(--ease-out), background-color .15s var(--ease-out);
}
.level-option:last-child { margin-bottom: 0; }
.level-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.level-option input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.level-option-text { display: flex; flex-direction: column; gap: .15rem; }
.level-name { font-weight: 700; font-size: .95rem; }
.level-name em { font-style: normal; color: var(--accent); font-weight: 600; }
.level-desc { color: var(--text-muted); font-size: .85rem; }
