/* =============================================================
   HerramientasFácil — hoja de estilos única
   1. Tokens  2. Reset  3. Utilidades  4. Tipografía  5. Componentes
   6. Secciones  7. Efectos  8. Responsive  9. Reduced-motion
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #f6f8f9;
  --surface: #ffffff;
  --surface-2: #eef1f3;
  --text: #171b1f;
  --text-muted: #5b6472;
  --border: #e2e6ea;
  --border-strong: #cbd1d8;

  --accent: #0e8f6f;
  --accent-dark: #0b6e56;
  --accent-soft: #e4f5ef;
  --accent-contrast: #ffffff;

  --link: #1a6fd6;
  --danger: #c0392b;
  --danger-soft: #fbebe9;
  --warning: #b0700f;
  --warning-soft: #fdf1de;
  --success: #0e8f6f;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(20, 24, 28, 0.06);
  --shadow: 0 6px 24px rgba(20, 24, 28, 0.08);
  --shadow-lg: 0 16px 48px rgba(20, 24, 28, 0.12);

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", var(--sans);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --nav-height: 68px;
  --container: 1180px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1215;
    --surface: #171b20;
    --surface-2: #1e2329;
    --text: #edf0f2;
    --text-muted: #9aa3af;
    --border: #262b32;
    --border-strong: #333a43;

    --accent: #2bc79a;
    --accent-dark: #22a381;
    --accent-soft: #12261f;
    --accent-contrast: #06120d;

    --link: #6ba6ef;
    --danger: #e06a5c;
    --danger-soft: #2a1917;
    --warning: #e0ac52;
    --warning-soft: #2a2114;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 56px rgba(0, 0, 0, 0.55);

    color-scheme: dark;
  }
}

/* =============================================================
   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(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
[hidden] { display: none !important; }
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 { font-family: var(--display); text-wrap: balance; line-height: 1.12; letter-spacing: -0.01em; font-weight: 600; }
ul, ol { padding-left: 1.2em; }
label { display: block; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); color: var(--accent-dark); }

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

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

/* =============================================================
   3. Utilidades
   ============================================================= */
.container { max-width: var(--container); margin-inline: auto; padding-inline: 1.25rem; }
.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;
}
.stack { display: flex; flex-direction: column; }
.section { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.section-tight { padding-block: clamp(1.5rem, 3vw, 2.5rem); }
.badge {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .8rem; font-weight: 600; padding: .35rem .7rem;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark);
}
.eyebrow {
  display: block; font-size: .8rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent-dark); margin-bottom: .5rem;
}
.muted { color: var(--text-muted); }
.center { text-align: center; }

/* =============================================================
   4. Tipografía
   ============================================================= */
h1 { font-size: clamp(2rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: .6rem; }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.35rem); margin-bottom: .4rem; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--text-muted); max-width: 60ch; }

/* =============================================================
   5. Componentes
   ============================================================= */

/* --- Header / nav --- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-height);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
@supports not (backdrop-filter: blur(1px)) {
  .site-header { background: var(--surface); }
}
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .5rem; font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0;
}
.brand-mark svg { width: 17px; height: 17px; }
.nav-links {
  display: flex; align-items: center; gap: 1.4rem; font-weight: 500; font-size: .95rem;
  overflow-x: auto; overflow-y: visible; scrollbar-width: none; -ms-overflow-style: none;
  padding-block: .2rem;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { color: var(--text-muted); transition: color .2s var(--ease-out); white-space: nowrap; }
.nav-links a:hover, .nav-links a.is-active { color: var(--text); }

/* --- Botones --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.3rem; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .95rem;
  transition: transform .15s var(--ease-out), box-shadow .15s var(--ease-out), background .15s var(--ease-out);
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--accent-contrast); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-dark); box-shadow: var(--shadow); }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--border-strong); }
.btn-block { width: 100%; }
.btn-lg { padding: 1rem 1.6rem; font-size: 1.05rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-ghost { color: var(--link); font-weight: 600; }
.btn-ghost:hover { text-decoration: underline; }

/* --- Cards --- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.tool-card-link {
  display: block; height: 100%;
  transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out), border-color .18s var(--ease-out);
}
.tool-card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.tool-card-link .card { height: 100%; }
.tool-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--accent-soft); color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center; margin-bottom: 1rem;
}
.tool-icon svg { width: 22px; height: 22px; }
.tool-category { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: .3rem; display: block; }

.category-block { margin-bottom: clamp(2rem, 4vw, 3rem); }
.category-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.tools-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }

/* --- Tool page: hero + tool card --- */
.tool-hero { padding-block: clamp(1.6rem, 3vw, 2.5rem) 1.2rem; }
.tool-hero .lede { margin-top: .5rem; }

.tool-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: clamp(1.2rem, 3vw, 2rem);
}

.privacy-badge {
  display: flex; align-items: center; gap: .6rem;
  font-size: .88rem; color: var(--text-muted);
  margin-top: 1rem; padding: .7rem .9rem;
  background: var(--accent-soft); border-radius: var(--radius-sm);
}
.privacy-badge svg { flex-shrink: 0; width: 18px; height: 18px; color: var(--accent-dark); }
.limits-note { font-size: .82rem; color: var(--text-muted); margin-top: .6rem; }

/* --- Ad slots --- */
.ad-slot {
  min-height: 100px; display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase;
  margin-block: 1.75rem; background: var(--surface-2);
}

/* --- FAQ --- */
.faq-list { display: flex; flex-direction: column; gap: .6rem; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .2rem .1rem;
}
.faq-item summary {
  cursor: pointer; list-style: none; padding: .9rem 1rem;
  font-weight: 600; 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; font-weight: 400; color: var(--text-muted); flex-shrink: 0;
  transition: transform .2s var(--ease-out);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-answer { padding: 0 1rem 1rem; color: var(--text-muted); }

/* --- Formularios (calculadora) --- */
.form-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-weight: 600; font-size: .92rem; }
.field .hint { font-size: .8rem; color: var(--text-muted); }
.input, select.input {
  width: 100%; padding: .7rem .85rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-size: 1rem;
  transition: border-color .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
textarea.input { min-height: 120px; resize: vertical; font-family: inherit; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.input-prefix-wrap { position: relative; }
.input-prefix-wrap .input { padding-left: 1.9rem; }
.input-prefix { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }

.toggle-row { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; }
.toggle-row input[type="checkbox"] { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.toggle-row label { font-weight: 500; font-size: .92rem; }

.result-panel {
  margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px dashed var(--border);
  display: none;
}
.result-panel.is-visible { display: block; }
.result-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; margin-bottom: 1.2rem; }
.result-stat {
  background: var(--surface-2); border-radius: var(--radius-sm); padding: .9rem 1rem;
}
.result-stat .label { font-size: .78rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.result-stat .value { font-family: var(--display); font-size: 1.5rem; font-weight: 700; margin-top: .15rem; }
.result-stat.highlight { background: var(--accent-soft); grid-column: 1 / -1; }
.result-stat.highlight .value { color: var(--accent-dark); font-size: clamp(1.8rem, 4vw, 2.4rem); }

.bar-chart { display: flex; flex-direction: column; gap: .55rem; margin-top: .5rem; }
.bar-row { display: grid; grid-template-columns: 130px 1fr auto; align-items: center; gap: .6rem; font-size: .85rem; }
.bar-track { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--accent); transition: width .5s var(--ease-out); }
.bar-fill.bar-quota { background: var(--warning); }
.bar-fill.bar-irpf { background: var(--danger); }
.bar-fill.bar-neto { background: var(--accent); }

/* --- Escenarios (calculadora autónomos) --- */
.scenarios-list { display: flex; flex-direction: column; gap: 1.2rem; margin-top: 1.2rem; }
.scenario-card-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 1rem; }
.scenario-name { font-weight: 700; font-family: var(--display); border: 1px solid transparent; background: transparent; padding: .3rem .1rem; max-width: 60%; }
.scenario-name:hover, .scenario-name:focus { border-color: var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); padding: .3rem .6rem; }
.add-scenario-row { margin-top: 1.2rem; }
.comparison-block { margin-top: 1.8rem; padding-top: 1.5rem; border-top: 1px solid var(--border); display: none; }
.comparison-block.is-visible { display: block; }
.bar-fill.bar-scenario-4 { background: var(--link); }

.calc-disclaimer {
  font-size: .82rem; color: var(--text-muted); background: var(--warning-soft);
  border-radius: var(--radius-sm); padding: .8rem 1rem; margin-top: 1.2rem;
}

/* --- Compresor: dropzone --- */
.dropzone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius);
  padding: clamp(1.6rem, 4vw, 2.6rem); text-align: center; cursor: pointer;
  transition: border-color .2s var(--ease-out), background .2s var(--ease-out);
  display: flex; flex-direction: column; align-items: center; gap: .7rem;
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone svg { width: 38px; height: 38px; color: var(--accent-dark); }
.dropzone .dz-title { font-weight: 600; font-size: 1.05rem; }
.dropzone .dz-sub { font-size: .85rem; color: var(--text-muted); }
.dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }

.compressor-options { display: grid; grid-template-columns: 1fr; gap: .9rem; margin-top: 1.2rem; }
.preset-group { display: flex; gap: .5rem; flex-wrap: wrap; }
.preset-btn {
  flex: 1 1 auto; padding: .65rem .9rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface);
  font-weight: 600; font-size: .88rem; text-align: center;
  transition: border-color .15s var(--ease-out), background .15s var(--ease-out);
}
.preset-btn.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }

.file-list { display: flex; flex-direction: column; gap: .6rem; margin-top: 1.2rem; }
.file-row {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .8rem;
  padding: .8rem .9rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2);
}
.file-row .file-info { min-width: 0; }
.file-row .file-name { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .file-meta { font-size: .8rem; color: var(--text-muted); margin-top: .1rem; }
.file-row .file-meta .saved { color: var(--accent-dark); font-weight: 600; }
.file-row progress { width: 100%; height: 6px; accent-color: var(--accent); margin-top: .35rem; }
.file-row .file-actions { display: flex; align-items: center; gap: .5rem; }
.file-row .file-actions a, .file-row .file-actions button { font-size: .85rem; }
.file-row[data-status="error"] .file-meta { color: var(--danger); }

.compressor-actions { display: flex; gap: .7rem; margin-top: 1rem; flex-wrap: wrap; }

/* --- Conversor de facturas: tabla editable --- */
.invoice-table-wrap { margin-top: 1.2rem; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.invoice-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.invoice-table th, .invoice-table td {
  border: 1px solid var(--border); padding: .5rem .6rem; text-align: left; white-space: nowrap;
}
.invoice-table th { background: var(--surface-2); font-weight: 700; position: sticky; top: 0; }
.invoice-table td[contenteditable="true"] { cursor: text; min-width: 80px; }
.invoice-table td[contenteditable="true"]:focus { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--accent-soft); }
.invoice-actions { display: flex; gap: .7rem; margin-top: 1rem; flex-wrap: wrap; }
.tool-status { font-size: .88rem; color: var(--text-muted); margin-top: .8rem; min-height: 1.2em; }
[data-state="error"] .tool-status { color: var(--danger); }

/* --- OCR --- */
.ocr-result { margin-top: 1.2rem; }
.ocr-textarea {
  width: 100%; min-height: 260px; padding: .9rem; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
  font-family: var(--sans); font-size: .92rem; line-height: 1.5; resize: vertical;
}
.ocr-actions { display: flex; gap: .7rem; margin-top: .8rem; flex-wrap: wrap; }
progress[data-ocr-progress] { width: 100%; height: 8px; accent-color: var(--accent); margin-top: .8rem; }

/* --- Generador de QR --- */
.qr-layout { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.qr-controls { display: flex; flex-direction: column; gap: 1.1rem; }
.qr-field-group[hidden] { display: none; }
.qr-preview-col { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.qr-preview {
  width: 260px; height: 260px; display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem;
}
.qr-preview canvas, .qr-preview svg, .qr-preview img { max-width: 100%; max-height: 100%; }
.qr-color-row { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.color-field { display: flex; align-items: center; gap: .6rem; }
.color-field input[type="color"] {
  width: 42px; height: 42px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 2px; background: var(--surface); cursor: pointer;
}
.qr-logo-row { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.qr-actions { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: center; }

/* --- Cómo funciona --- */
.steps-grid { display: grid; grid-template-columns: 1fr; gap: 1.2rem; }
.step { display: flex; gap: 1rem; }
.step-num {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: var(--accent-contrast);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--display);
}

/* --- Footer --- */
.site-footer { border-top: 1px solid var(--border); padding-block: 2.5rem 1.5rem; background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: .8rem; }
.footer-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.footer-col a { color: var(--text-muted); font-size: .92rem; transition: color .15s var(--ease-out); }
.footer-col a:hover { color: var(--text); }
.footer-brand p { color: var(--text-muted); font-size: .9rem; margin-top: .6rem; max-width: 32ch; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; justify-content: space-between; align-items: center;
  padding-top: 1.5rem; border-top: 1px solid var(--border);
  font-size: .82rem; color: var(--text-muted);
}
.affiliate-disclosure { max-width: 70ch; }

/* --- Páginas legales --- */
.legal-content { max-width: 74ch; }
.legal-content h2 { margin-top: 2rem; }
.legal-content p, .legal-content li { color: var(--text-muted); margin-bottom: .8rem; }
.legal-content ul { margin-bottom: .8rem; }

/* --- Home hero --- */
.hero {
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 3vw, 2.5rem);
}
.hero .eyebrow { display: inline-flex; }
.hero-cta-row { display: flex; gap: .8rem; margin-top: 1.6rem; flex-wrap: wrap; }

/* =============================================================
   6. Secciones específicas
   ============================================================= */
.seo-content { max-width: 74ch; }
.seo-content h2 { margin-top: 2.2rem; }
.seo-content p { margin-bottom: 1rem; color: var(--text); }
.seo-content ul { margin-bottom: 1rem; }
.seo-content li { margin-bottom: .4rem; }

.related-tools { margin-top: 2rem; }

/* =============================================================
   7. Efectos
   ============================================================= */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }

[data-state] .idle-only { display: block; }
[data-state="loading"] .idle-only,
[data-state="working"] .idle-only,
[data-state="done"] .idle-only,
[data-state="error"] .idle-only { display: none; }

.state-msg { display: none; align-items: center; gap: .6rem; padding: 1rem; border-radius: var(--radius-sm); font-size: .92rem; }
[data-state="loading"] .state-loading,
[data-state="working"] .state-loading { display: flex; background: var(--accent-soft); color: var(--accent-dark); }
[data-state="error"] .state-error { display: flex; background: var(--danger-soft); color: var(--danger); }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: spin .8s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================================
   8. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .result-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 720px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
  .compressor-options { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid .field-full { grid-column: 1 / -1; }
  .qr-layout { grid-template-columns: 1fr 300px; align-items: start; }
}

@media (min-width: 960px) {
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
  .result-grid { grid-template-columns: repeat(4, 1fr); }
  .result-stat.highlight { grid-column: span 2; }
}

@media (max-width: 539px) {
  .nav-links { gap: 1rem; font-size: .88rem; }
}

/* =============================================================
   9. Reduced-motion — solo lo intrusivo
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spinner { animation-duration: 1.4s; }
}
