/* =============================================================
   Utilia (nombre provisional) — hoja de estilos única
   La marca se cambia en tools/build.py (BRAND) y en los tokens de abajo.
   ============================================================= */

/* 1. Tokens ---------------------------------------------------- */
:root {
  --brand: #1b3a6b;          /* azul oscuro principal */
  --brand-600: #234b8a;
  --brand-50: #eef3fb;
  --accent: #f26b1d;         /* naranja de acento (uso moderado) */
  --accent-50: #fff1e8;
  --pdf: #d64545;
  --pdf-50: #fdeeee;
  --img: #1f8a5b;
  --img-50: #e8f6ef;
  --qr: #6c4bd1;
  --qr-50: #f1edfc;

  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #17202e;
  --muted: #5a6475;
  --line: #e3e7ee;
  --line-strong: #cfd6e1;
  --ok: #1f8a5b;
  --warn: #b26a00;
  --warn-50: #fff6e5;
  --err: #c0392b;
  --err-50: #fdecea;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 4px 12px rgba(16, 24, 40, .05);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
  --gutter: 16px;
}

/* 2. Reset & base ---------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, svg, canvas, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--brand-600); }
p { text-wrap: pretty; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.015em; text-wrap: balance; color: var(--text); }
ul, ol { padding-left: 1.25rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

/* 3. Utilidades ------------------------------------------------ */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 9999; padding: .6rem 1rem; background: var(--brand); color: #fff; border-radius: 8px; }
.skip-link:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }

/* 4. Header ---------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(6px); }
.site-header .wrap { display: flex; align-items: center; gap: 1rem; height: 60px; }
.logo { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.15rem; color: var(--brand); text-decoration: none; letter-spacing: -0.02em; }
.logo-mark { width: 30px; height: 30px; flex: none; }
.nav { display: none; margin-left: auto; gap: .25rem; align-items: center; }
.nav a { padding: .45rem .7rem; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--brand-50); color: var(--brand); }
.nav-toggle { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 10px; color: var(--brand); }
.nav-toggle:hover { background: var(--brand-50); }
.mobile-nav { border-top: 1px solid var(--line); background: #fff; padding: .5rem 0 1rem; }
.mobile-nav a { display: block; padding: .7rem var(--gutter); color: var(--text); text-decoration: none; font-weight: 500; }
.mobile-nav a:hover { background: var(--brand-50); }
.mobile-nav .mn-group { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .8rem var(--gutter) .2rem; }

/* 5. Botones y formularios ------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .65rem 1.15rem; border-radius: 10px; font-weight: 600; font-size: .95rem; text-decoration: none; border: 1px solid transparent; transition: background-color .18s var(--ease-out), border-color .18s, color .18s, box-shadow .18s, transform .18s var(--ease-out); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-600); box-shadow: var(--shadow); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover:not(:disabled) { background: #dd5c10; box-shadow: var(--shadow); }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.btn-link { min-height: 0; padding: .25rem 0; color: var(--brand-600); background: none; font-weight: 600; }
.btn-link:hover { text-decoration: underline; }
.btn-lg { min-height: 52px; padding: .8rem 1.5rem; font-size: 1.05rem; }
.btn-sm { min-height: 34px; padding: .35rem .7rem; font-size: .85rem; border-radius: 8px; }
.btn-icon { min-height: 34px; width: 34px; padding: 0; border-radius: 8px; background: #fff; border: 1px solid var(--line-strong); color: var(--text); }
.btn-icon:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.btn-icon.danger:hover:not(:disabled) { border-color: var(--err); color: var(--err); }
.btn svg, .btn-icon svg { width: 18px; height: 18px; flex: none; }

.field { display: flex; flex-direction: column; gap: .35rem; }
.field > label, .field > .label { font-weight: 600; font-size: .9rem; }
.field .hint { font-size: .8rem; color: var(--muted); }
.input, .select, .textarea { width: 100%; min-height: 42px; padding: .55rem .75rem; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; }
.textarea { min-height: 90px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(35,75,138,.15); }
input[type="range"] { width: 100%; accent-color: var(--brand); }
input[type="color"] { width: 48px; height: 40px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; cursor: pointer; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); width: 18px; height: 18px; }
.check { display: inline-flex; align-items: center; gap: .5rem; font-size: .95rem; cursor: pointer; }
.row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.seg { display: inline-flex; flex-wrap: wrap; gap: .4rem; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .9rem; font-weight: 500; cursor: pointer; background: #fff; transition: all .15s; }
.seg input:checked + label { background: var(--brand); color: #fff; border-color: var(--brand); }
.seg input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 6. Hero y secciones ------------------------------------------ */
.hero { background: linear-gradient(180deg, #fff 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); padding: 2.5rem 0 2.75rem; }
.hero h1 { font-size: clamp(1.85rem, 5vw, 3rem); font-weight: 800; max-width: 19ch; }
.hero p.lead { font-size: clamp(1.02rem, 2.2vw, 1.2rem); color: var(--muted); margin-top: .75rem; max-width: 60ch; }
.hero-badges { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: 1.25rem; color: var(--muted); font-size: .9rem; }
.hero-badges span { display: inline-flex; align-items: center; gap: .4rem; }
.hero-badges svg { width: 18px; height: 18px; color: var(--ok); }

.search { position: relative; margin-top: 1.5rem; max-width: 640px; }
.search input { width: 100%; min-height: 56px; padding: .8rem 1rem .8rem 3rem; border: 1px solid var(--line-strong); border-radius: 14px; font-size: 1.05rem; background: #fff; box-shadow: var(--shadow-sm); }
.search input:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 4px rgba(35,75,138,.14); }
.search > svg { position: absolute; left: 1rem; top: 18px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search-results { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); list-style: none; padding: .35rem; max-height: 360px; overflow: auto; }
.search-results a { display: flex; gap: .75rem; align-items: center; padding: .6rem .7rem; border-radius: 8px; text-decoration: none; color: var(--text); }
.search-results a:hover, .search-results a.is-active { background: var(--brand-50); }
.search-results .sr-cat { margin-left: auto; font-size: .75rem; color: var(--muted); }
.search-results .sr-empty { padding: .8rem; color: var(--muted); font-size: .95rem; }

.section { padding: 3rem 0; }
.section-alt { background: #fff; border-block: 1px solid var(--line); }
.section-head { margin-bottom: 1.5rem; max-width: 70ch; }
.section-head h2 { font-size: clamp(1.4rem, 3.4vw, 1.9rem); font-weight: 800; }
.section-head p { color: var(--muted); margin-top: .4rem; }

/* Tarjetas */
.cards { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.card { position: relative; display: flex; flex-direction: column; gap: .5rem; padding: 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--text); transition: border-color .18s, box-shadow .18s, transform .18s var(--ease-out); }
a.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.card h3 { font-size: 1.05rem; font-weight: 700; }
.card p { color: var(--muted); font-size: .93rem; }
.card .card-cta { margin-top: auto; padding-top: .35rem; color: var(--brand-600); font-weight: 600; font-size: .9rem; }
.ico { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 10px; background: var(--brand-50); color: var(--brand); flex: none; }
.ico svg { width: 22px; height: 22px; }
.ico.pdf { background: var(--pdf-50); color: var(--pdf); }
.ico.img { background: var(--img-50); color: var(--img); }
.ico.qr { background: var(--qr-50); color: var(--qr); }
.cat-card { padding: 1.5rem; }
.cat-card h3 { font-size: 1.2rem; }
.cat-card .tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .25rem; }
.tag { font-size: .78rem; padding: .2rem .55rem; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }

.steps { display: grid; gap: 1rem; grid-template-columns: 1fr; counter-reset: step; list-style: none; padding: 0; }
.steps li { position: relative; padding: 1.25rem 1.25rem 1.25rem 4rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 1.15rem; top: 1.15rem; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: grid; place-items: center; }
.steps h3 { font-size: 1rem; }
.steps p { color: var(--muted); font-size: .93rem; margin-top: .2rem; }

.benefits { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
.benefit { display: flex; gap: .9rem; }
.benefit h3 { font-size: 1rem; }
.benefit p { color: var(--muted); font-size: .93rem; margin-top: .15rem; }

/* FAQ */
.faq { display: grid; gap: .6rem; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.faq summary { cursor: pointer; padding: 1rem 2.6rem 1rem 1.1rem; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 1.1rem; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq .faq-a { padding: 0 1.1rem 1rem; color: var(--muted); }

/* Breadcrumbs */
.breadcrumbs { font-size: .85rem; color: var(--muted); padding: .9rem 0 0; }
.breadcrumbs ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.breadcrumbs li + li::before { content: "/"; margin-right: .3rem; color: var(--line-strong); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand); text-decoration: underline; }

/* 7. Página de herramienta ------------------------------------- */
.tool-head { padding: 1rem 0 1.25rem; }
.tool-head h1 { font-size: clamp(1.6rem, 4.4vw, 2.3rem); font-weight: 800; }
.tool-head p { color: var(--muted); margin-top: .35rem; max-width: 70ch; }
.tool-layout { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
.tool-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 1rem; }
.tool-noscript { padding: 1rem; background: var(--warn-50); border-radius: 10px; color: var(--warn); }

.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; min-height: 220px; padding: 1.5rem 1rem; border: 2px dashed var(--line-strong); border-radius: 12px; background: var(--bg); text-align: center; cursor: pointer; transition: border-color .18s, background-color .18s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--brand-600); background: var(--brand-50); }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone .dz-icon { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); }
.dropzone .dz-icon svg { width: 28px; height: 28px; }
.dropzone strong { font-size: 1.05rem; }
.dropzone .dz-sub { font-size: .85rem; color: var(--muted); }
.dropzone .btn { pointer-events: none; }
.dropzone.compact { min-height: 110px; flex-direction: row; gap: .9rem; }

.privacy-note { display: flex; align-items: flex-start; gap: .5rem; margin-top: .85rem; font-size: .85rem; color: var(--muted); }
.privacy-note svg { width: 18px; height: 18px; color: var(--ok); flex: none; margin-top: 2px; }

.panel { margin-top: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.panel-title { font-weight: 700; font-size: .95rem; margin-bottom: .75rem; }
.options { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1rem; }

.file-list { list-style: none; padding: 0; display: grid; gap: .5rem; margin-top: 1rem; }
.file-item { display: flex; align-items: center; gap: .75rem; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.file-item.is-dragging { opacity: .5; }
.file-item .fi-thumb { width: 46px; height: 46px; border-radius: 6px; object-fit: cover; background: var(--bg); border: 1px solid var(--line); flex: none; }
.file-item .fi-main { min-width: 0; flex: 1; }
.file-item .fi-name { font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-item .fi-meta { font-size: .8rem; color: var(--muted); }
.file-item .fi-meta .ok { color: var(--ok); font-weight: 600; }
.file-item .fi-meta .bad { color: var(--err); font-weight: 600; }
.file-item .fi-actions { display: flex; gap: .3rem; flex: none; }
.drag-handle { cursor: grab; color: var(--muted); touch-action: none; display: grid; place-items: center; width: 28px; height: 34px; flex: none; }
.drag-handle svg { width: 18px; height: 18px; }

.progress { margin-top: 1rem; }
.progress-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress-bar > span { display: block; height: 100%; width: 0; background: var(--brand-600); border-radius: inherit; transition: width .2s; }
.progress-text { font-size: .85rem; color: var(--muted); margin-top: .4rem; }

.alert { display: flex; gap: .6rem; align-items: flex-start; margin-top: 1rem; padding: .8rem 1rem; border-radius: 10px; font-size: .92rem; }
.alert svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.alert-err { background: var(--err-50); color: var(--err); }
.alert-warn { background: var(--warn-50); color: #7a4a00; }
.alert-ok { background: var(--img-50); color: #146240; }
.alert-info { background: var(--brand-50); color: var(--brand); }

.result { margin-top: 1rem; padding: 1.1rem; border: 1px solid #bfe3cf; background: #f3fbf6; border-radius: 12px; }
.result-title { display: flex; align-items: center; gap: .5rem; font-weight: 700; color: #146240; }
.result-title svg { width: 22px; height: 22px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .6rem; margin-top: .85rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .6rem .75rem; }
.stat .k { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stat .v { font-weight: 800; font-size: 1.1rem; }
.stat .v.good { color: var(--ok); }
.stat .v.bad { color: var(--err); }

/* Rejilla de páginas (miniaturas PDF / imágenes) */
.thumbs { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); margin-top: 1rem; }
.thumb { position: relative; display: flex; flex-direction: column; gap: .35rem; padding: .5rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; user-select: none; }
.thumb.is-selected { border-color: var(--brand-600); box-shadow: 0 0 0 2px rgba(35,75,138,.25); }
.thumb.is-deleted .thumb-canvas { opacity: .25; }
.thumb.is-deleted .thumb-label { text-decoration: line-through; }
.thumb.is-dragging { opacity: .45; }
.thumb.drop-before { box-shadow: -4px 0 0 0 var(--accent); }
.thumb.drop-after { box-shadow: 4px 0 0 0 var(--accent); }
.thumb-canvas { display: grid; place-items: center; aspect-ratio: 3 / 4; background: var(--bg); border-radius: 6px; overflow: hidden; }
.thumb-canvas canvas, .thumb-canvas img { max-width: 100%; max-height: 100%; width: auto; height: auto; box-shadow: 0 1px 3px rgba(0,0,0,.15); transition: transform .25s var(--ease-out); background: #fff; }
.thumb-label { display: flex; align-items: center; justify-content: space-between; gap: .3rem; font-size: .8rem; color: var(--muted); }
.thumb-tools { display: flex; gap: .25rem; justify-content: center; flex-wrap: wrap; }
.thumb-tools .btn-icon { width: 30px; min-height: 30px; }
.thumb-tools .btn-icon svg { width: 16px; height: 16px; }
.thumb .thumb-check { position: absolute; top: .9rem; left: .9rem; z-index: 2; }
.thumb .thumb-badge { position: absolute; top: .85rem; right: .85rem; z-index: 2; font-size: .7rem; font-weight: 700; background: var(--accent); color: #fff; padding: .1rem .4rem; border-radius: 6px; }

.preview-box { display: grid; place-items: center; min-height: 200px; padding: .75rem; background: repeating-conic-gradient(#eef0f3 0% 25%, #fff 0% 50%) 50% / 20px 20px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.preview-box img, .preview-box canvas { max-height: 420px; width: auto; }
.compare { display: grid; gap: .75rem; grid-template-columns: 1fr; }
.compare figure { margin: 0; }
.compare figcaption { font-size: .8rem; color: var(--muted); margin-top: .3rem; }

/* QR */
/* En móvil: tipos → datos → vista previa → diseño → logo. En escritorio la vista previa va a la derecha. */
.qr-layout { display: grid; column-gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
.qr-form { display: contents; }
.qr-layout .qr-types { order: 1; }
.qr-layout .qr-form > .panel { order: 2; }
.qr-layout .qr-preview { order: 3; margin-top: 1.25rem; }
.qr-layout .qr-form > details { order: 4; }
.qr-types { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .35rem; scrollbar-width: thin; }
.qr-types button { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; padding: .5rem .8rem; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; font-size: .9rem; font-weight: 500; }
.qr-types button svg { width: 16px; height: 16px; }
.qr-types button[aria-pressed="true"] { background: var(--qr); border-color: var(--qr); color: #fff; }
.qr-preview { display: flex; flex-direction: column; gap: .75rem; align-items: center; }
.qr-canvas { display: grid; place-items: center; width: 100%; max-width: 320px; aspect-ratio: 1; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .5rem; }
.qr-canvas canvas, .qr-canvas svg { width: 100% !important; height: auto !important; }
.qr-status { font-size: .85rem; text-align: center; min-height: 1.3em; }
.qr-status.ok { color: var(--ok); }
.qr-status.bad { color: var(--err); }
.emoji-grid { display: flex; flex-wrap: wrap; gap: .3rem; }
.emoji-grid button { width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: 1.3rem; }
.emoji-grid button[aria-pressed="true"] { border-color: var(--qr); box-shadow: 0 0 0 2px rgba(108,75,209,.3); }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { font-weight: 600; font-size: .9rem; margin-bottom: .35rem; padding: 0; }
details.more { margin-top: 1rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
details.more > summary { cursor: pointer; padding: .9rem 1rem; font-weight: 700; }
details.more > .more-body { padding: 0 1rem 1rem; }

/* 8. Contenido / prosa ----------------------------------------- */
.content { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); padding: 2.5rem 0 1rem; }
.prose { max-width: 75ch; }
.prose h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); font-weight: 800; margin: 2.2rem 0 .7rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.1rem; font-weight: 700; margin: 1.5rem 0 .4rem; }
.prose p, .prose ul, .prose ol { margin-bottom: 1rem; }
.prose li { margin-bottom: .35rem; }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 1.25rem; font-size: .93rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--bg); font-weight: 700; }
.prose .note { padding: .85rem 1rem; background: var(--brand-50); border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0; color: var(--brand); }
.prose code { overflow-wrap: anywhere; background: var(--bg); border: 1px solid var(--line); padding: .05rem .35rem; border-radius: 5px; font-size: .88em; }
.prose .todo { background: var(--warn-50); color: #7a4a00; padding: .05rem .3rem; border-radius: 4px; font-weight: 600; }
.page-head { padding: 1.25rem 0 .5rem; }
.page-head h1 { font-size: clamp(1.7rem, 4.6vw, 2.5rem); font-weight: 800; }
.page-head p { color: var(--muted); margin-top: .4rem; max-width: 70ch; }

.related { padding: 1rem 0 2.5rem; }
.related h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: 1rem; }

/* Blog */
.post-card .post-cover { aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--bg); margin-bottom: .4rem; }
.post-card .post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-meta { font-size: .82rem; color: var(--muted); }
.post-cover-lg { aspect-ratio: 16 / 9; max-width: 820px; border-radius: 14px; overflow: hidden; margin: 1rem 0 1.5rem; border: 1px solid var(--line); }
.post-cover-lg img { width: 100%; height: 100%; object-fit: cover; }
.cat-filter { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.25rem; }
.cat-filter a { padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; text-decoration: none; color: var(--text); font-size: .88rem; }
.cat-filter a[aria-current="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

/* 9. Anuncios (placeholders) ----------------------------------- */
.ad-slot { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; margin: 2rem auto; border: 1px dashed var(--line-strong); border-radius: 10px; background: #fbfbfc; color: #9aa3b2; overflow: hidden; contain: layout; }
.ad-slot .ad-label { font-size: .72rem; font-weight: 700; letter-spacing: .14em; }
.ad-slot--leaderboard { min-height: 100px; max-width: 970px; }
.ad-slot--incontent { min-height: 250px; max-width: 728px; }
.ad-slot--sidebar { display: none; min-height: 600px; margin: 0; }
.ad-slot--footer { min-height: 90px; max-width: 970px; }
.ad-slot.is-live { border: 0; background: transparent; }
.ad-slot.is-live .ad-label { position: absolute; top: 2px; left: 6px; font-size: .6rem; }
.ads-off .ad-slot { display: none !important; }
.tool-sidebar { display: none; }

/* 10. Footer ---------------------------------------------------- */
.site-footer { background: #0f1f3a; color: #c5cfdf; margin-top: 2rem; padding: 2.5rem 0 1.5rem; font-size: .92rem; }
.site-footer a { color: #e6ecf5; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; gap: 1.75rem; grid-template-columns: 1fr 1fr; }
.footer-grid h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #8ea0bd; margin-bottom: .7rem; }
.footer-grid ul { list-style: none; padding: 0; display: grid; gap: .45rem; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand .logo { color: #fff; }
.footer-brand p { margin-top: .6rem; max-width: 42ch; color: #a9b6ca; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.1); font-size: .82rem; color: #8ea0bd; }
.footer-bottom button { color: #e6ecf5; text-decoration: underline; font-size: .82rem; }

/* 11. Consentimiento de cookies --------------------------------- */
.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 100; max-width: 560px; margin-inline: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 40px rgba(16,24,40,.18); padding: 1.1rem; font-size: .9rem; }
.consent h2 { font-size: 1rem; margin-bottom: .35rem; }
.consent p { color: var(--muted); }
.consent .consent-opts { display: grid; gap: .6rem; margin-top: .8rem; padding: .8rem; background: var(--bg); border-radius: 10px; }
.consent .actions { margin-top: .9rem; }

/* 12. Responsive ------------------------------------------------ */
@media (min-width: 540px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compare { grid-template-columns: 1fr 1fr; }
  .tool-card { padding: 1.5rem; }
}
@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer-brand { grid-column: auto; }
  .hero { padding: 3.5rem 0 3.75rem; }
  .section { padding: 4rem 0; }
}
@media (min-width: 960px) {
  .nav { display: flex; }
  .nav-toggle, .mobile-nav { display: none !important; }
  .cards.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .benefits { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .qr-layout { grid-template-columns: minmax(0, 1fr) 340px; }
  .qr-layout .qr-types, .qr-layout .qr-form > * { grid-column: 1; }
  .qr-layout .qr-preview { grid-column: 2; grid-row: 1 / span 6; align-self: start; position: sticky; top: 76px; margin-top: 0; }
  .options.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .content.has-aside { grid-template-columns: minmax(0, 1fr) 300px; }
  .tool-sidebar { display: block; }
  .tool-sidebar .ad-slot--sidebar { display: flex; position: sticky; top: 80px; }
}

/* 13. Movimiento reducido (solo efectos intrusivos) ------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  a.card:hover { transform: none; }
}
@media print {
  .site-header, .site-footer, .ad-slot, .consent { display: none !important; }
}
