/* styles.css · PDF QR Adder · 1000HW
 * Cache-bust: ?v=3
 * Vanilla CSS · mobile-first · paleta 1000HW (void/acid/concrete/softgray/text-light)
 * WCAG 2.1 AA compliant · prefers-reduced-motion respetado
 *
 * Diseño: foco en wizard por pasos (5 steps) + grid 3×3 visual de posición +
 * preview canvas + tipo de QR en cards. Vanilla, sin frameworks.
 */

/* ============================================================
 * 0. CUSTOM PROPERTIES (design tokens)
 * ============================================================ */
:root {
  /* Paleta canónica 1000HW */
  --void:        #050505;
  --concrete:    #1A1A1E;
  --structure:   #2A2A30;
  --acid:        #CCFF00;
  --acid-dim:    #A8CC00;
  --softgray:    #9CA3AF;
  --text-light:  #E5E7EB;
  --text-mid:    #B5B7C0;
  --text-dim:    #6B6E78;
  --danger:      #FF6B6B;
  --warn:        #FFB74D;
  --success:     #4ADE80;
  --info:        #60A5FA;

  /* Tipografía */
  --font-display: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', Monaco, Consolas, monospace;
  --font-body:    'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Espaciado */
  --space-1:  4px;
  --space-2:  8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* Otros */
  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 14px;
  --shadow-md: 0 6px 22px rgba(0,0,0,0.45);
  --shadow-lg: 0 14px 50px rgba(0,0,0,0.55);

  /* Transiciones */
  --t-fast: 150ms cubic-bezier(.4,0,.2,1);
  --t-mid:  300ms cubic-bezier(.4,0,.2,1);
  --t-slow: 600ms cubic-bezier(.4,0,.2,1);
}

/* ============================================================
 * 1. RESET + BASE
 * ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background-color: var(--void);
  color: var(--text-light);
  line-height: 1.55;
  font-size: 16px;
  background-image: radial-gradient(circle at 20% 0%, rgba(204, 255, 0, 0.05) 0%, transparent 40%),
                    radial-gradient(circle at 100% 100%, rgba(204, 255, 0, 0.03) 0%, transparent 40%);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-4);
  line-height: 1.2;
}

p { margin: 0 0 var(--space-4); }

a {
  color: var(--acid);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--t-fast);
}
a:hover { color: var(--text-light); }
a:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
  border-radius: 2px;
}

code {
  font-family: var(--font-mono);
  background: rgba(255,255,255,0.04);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

/* ============================================================
 * 2. UTILIDADES + ACCESIBILIDAD
 * ============================================================ */
.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;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--acid);
  color: var(--void);
  padding: var(--space-3) var(--space-4);
  z-index: 100;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus {
  left: var(--space-3);
  top: var(--space-3);
}

::selection { background: var(--acid); color: var(--void); }

/* ============================================================
 * 3. LAYOUT (container)
 * ============================================================ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}
@media (min-width: 768px) {
  .container { padding: 0 var(--space-5); }
}

/* ============================================================
 * 4. NAV (sticky top)
 * ============================================================ */
.nav {
  border-bottom: 1px solid var(--structure);
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: var(--space-3) var(--space-4);
  position: sticky;
  top: 0;
  z-index: 40;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.nav-back {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.nav-back:hover { color: var(--acid); }
.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.04em;
  color: var(--text-light);
}
.nav-brand .brand-acid { color: var(--acid); }

/* ============================================================
 * 5. HERO
 * ============================================================ */
.hero {
  padding: var(--space-7) 0 var(--space-5);
  border-bottom: 1px solid var(--structure);
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 4px 10px;
  border: 1px solid var(--structure);
  color: var(--text-mid);
  background: var(--concrete);
  border-radius: var(--radius-sm);
}
.tag-acid {
  border-color: var(--acid);
  color: var(--acid);
  background: rgba(204, 255, 0, 0.08);
}
.tag-priv {
  border-color: var(--success);
  color: var(--success);
  background: rgba(74, 222, 128, 0.08);
}

.hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  margin-bottom: var(--space-4);
}
.hero .accent { color: var(--acid); }
.hero-lede {
  font-size: clamp(16px, 1.5vw, 18px);
  color: var(--text-mid);
  max-width: 70ch;
  margin-bottom: var(--space-5);
}

.hero-disclaimer {
  background: rgba(204, 255, 0, 0.06);
  border-left: 3px solid var(--acid);
  padding: var(--space-4);
  border-radius: var(--radius);
  color: var(--text-light);
  max-width: 75ch;
  margin: 0;
  font-size: 14px;
}
.hero-disclaimer strong { color: var(--acid); }

/* ============================================================
 * 6. TOOL
 * ============================================================ */
.tool-section {
  padding: var(--space-6) 0;
}
.tool-card {
  background: var(--concrete);
  border: 1px solid var(--structure);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-md);
}
.tool-card-inner > * + * {
  margin-top: var(--space-5);
}

/* Fieldset por paso */
.step-fieldset {
  border: none;
  border-top: 1px solid var(--structure);
  padding: var(--space-5) 0 var(--space-4);
  margin: 0;
  position: relative;
}
.step-fieldset:first-of-type {
  border-top: none;
  padding-top: 0;
}
.step-fieldset legend {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0 0 var(--space-4);
  margin: 0;
  color: var(--text-light);
  font-weight: 600;
  font-size: 18px;
  width: 100%;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--acid);
  color: var(--void);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}
.fieldset-hint {
  color: var(--text-mid);
  font-size: 14px;
  margin: 0 0 var(--space-4);
}

/* ============================================================
 * 6.1 DROPZONE
 * ============================================================ */
.dropzone {
  border: 2px dashed var(--structure);
  border-radius: var(--radius-lg);
  padding: var(--space-7) var(--space-5);
  text-align: center;
  background: var(--void);
  cursor: pointer;
  transition: all var(--t-fast);
  position: relative;
}
.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--acid);
  background: rgba(204, 255, 0, 0.04);
  outline: none;
}
.dropzone.is-drag-over {
  border-color: var(--acid);
  background: rgba(204, 255, 0, 0.08);
  transform: scale(1.01);
}
.dropzone-icon {
  font-size: 48px;
  margin-bottom: var(--space-3);
  opacity: 0.8;
}
.dropzone-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: var(--space-2);
}
.dropzone-sub {
  font-size: 14px;
  color: var(--text-mid);
  margin-bottom: var(--space-3);
}
.dropzone-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* File meta block after load */
.file-meta {
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: var(--void);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}
@media (min-width: 600px) {
  .file-meta {
    grid-template-columns: 1fr 1fr 1fr auto;
    align-items: center;
  }
}
.file-meta-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.file-meta-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}
.file-meta-value {
  font-size: 14px;
  color: var(--text-light);
  word-break: break-all;
}
@media (min-width: 600px) {
  .file-meta-row {
    flex-direction: row;
    align-items: baseline;
    gap: var(--space-2);
  }
}

/* ============================================================
 * 6.2 TYPE CARDS (selección de tipo de QR)
 * ============================================================ */
.type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}
@media (min-width: 600px) {
  .type-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .type-grid { grid-template-columns: repeat(6, 1fr); }
}

.type-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-1);
  padding: var(--space-4) var(--space-2);
  background: var(--void);
  border: 2px solid var(--structure);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--t-fast);
  min-height: 96px;
}
.type-card:hover {
  border-color: var(--acid);
  background: rgba(204, 255, 0, 0.04);
}
.type-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.type-card input[type="radio"]:checked + * {
  /* nothing */
}
.type-card:has(input:checked) {
  border-color: var(--acid);
  background: rgba(204, 255, 0, 0.08);
  box-shadow: 0 0 0 1px var(--acid) inset;
}
.type-card input[type="radio"]:focus-visible + .type-icon {
  outline: 2px solid var(--acid);
  outline-offset: 4px;
}
.type-icon {
  font-size: 28px;
  line-height: 1;
}
.type-label {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-light);
}
.type-sub {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Type inputs (dynamic show/hide) */
.type-inputs { margin-top: var(--space-4); }
.type-input {
  padding: var(--space-4);
  background: var(--void);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
}

/* ============================================================
 * 6.3 MODE CARDS (misma / per-page / auto #page)
 * ============================================================ */
.mode-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 768px) {
  .mode-grid { grid-template-columns: repeat(3, 1fr); }
}

.mode-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-4);
  background: var(--void);
  border: 2px solid var(--structure);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--t-fast);
  min-height: 80px;
}
.mode-card:hover {
  border-color: var(--acid);
  background: rgba(204, 255, 0, 0.04);
}
.mode-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.mode-card:has(input:checked) {
  border-color: var(--acid);
  background: rgba(204, 255, 0, 0.08);
  box-shadow: 0 0 0 1px var(--acid) inset;
}
.mode-card input[type="radio"]:focus-visible + .mode-label {
  outline: 2px solid var(--acid);
  outline-offset: 4px;
}
.mode-label {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-light);
}
.mode-sub {
  font-size: 12px;
  color: var(--text-mid);
  font-family: var(--font-mono);
}

/* Per-page table */
.perpage-table-wrap {
  overflow-x: auto;
  margin-top: var(--space-4);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  background: var(--void);
}
.perpage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.perpage-table thead {
  background: var(--concrete);
  position: sticky;
  top: 0;
}
.perpage-table th {
  padding: var(--space-3);
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--structure);
}
.perpage-table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--structure);
}
.perpage-table td:first-child {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--acid);
  width: 50px;
  text-align: center;
}
.perpage-table input[type="text"] {
  width: 100%;
  padding: 6px 10px;
  background: var(--void);
  border: 1px solid var(--structure);
  border-radius: var(--radius-sm);
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 13px;
  min-height: 36px;
}
.perpage-table input[type="text"]:focus {
  border-color: var(--acid);
  outline: 2px solid var(--acid);
  outline-offset: 0;
}
.perpage-table input[type="text"]::placeholder {
  color: var(--text-dim);
  font-style: italic;
}

/* ============================================================
 * 6.4 POSITION GRID (3×3)
 * ============================================================ */
.pos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: var(--space-2);
  width: 200px;
  height: 200px;
  padding: var(--space-3);
  background: var(--void);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  position: relative;
}
.pos-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--concrete);
  border: 1px solid var(--structure);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--t-fast);
  min-height: 50px;
  min-width: 50px;
}
.pos-cell:hover {
  border-color: var(--acid);
  background: rgba(204, 255, 0, 0.04);
}
.pos-cell input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pos-cell:has(input:checked) {
  border-color: var(--acid);
  background: rgba(204, 255, 0, 0.12);
  box-shadow: 0 0 0 1px var(--acid) inset;
}
.pos-cell input[type="radio"]:focus-visible + .pos-dot {
  outline: 2px solid var(--acid);
  outline-offset: 4px;
  border-radius: 50%;
}
.pos-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--acid);
  opacity: 0.4;
  transition: opacity var(--t-fast);
}
.pos-cell:has(input:checked) .pos-dot {
  opacity: 1;
}
.pos-cell-center {
  background: transparent;
  border: 1px dashed var(--structure);
  cursor: default;
}
.pos-cell-center:hover { background: transparent; border-color: var(--structure); }
.pos-center-label {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

/* ============================================================
 * 6.5 FORM
 * ============================================================ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 600px) {
  .form-grid-2 { grid-template-columns: 1fr 1fr; }
  .form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.form-row label,
.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-mid);
}
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="number"],
.form-row input[type="url"],
.form-row select,
.form-row textarea {
  font-family: var(--font-body);
  font-size: 14px;
  padding: var(--space-3);
  background: var(--void);
  color: var(--text-light);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  transition: border-color var(--t-fast);
  min-height: 44px;
  width: 100%;
}
.form-row textarea { min-height: 96px; resize: vertical; }
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--acid);
  outline: 2px solid var(--acid);
  outline-offset: 0;
}

.form-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--acid);
  cursor: pointer;
}
.form-row label:has(input[type="checkbox"]) {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.form-row input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--structure);
  border-radius: 3px;
  cursor: pointer;
}
.form-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--acid);
  border-radius: 50%;
  cursor: grab;
  border: 2px solid var(--void);
}
.form-row input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--acid);
  border-radius: 50%;
  cursor: grab;
  border: 2px solid var(--void);
}

.hint {
  font-size: 12px;
  color: var(--text-dim);
}

/* color picker + hex readout */
.color-control {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.color-control input[type="color"] {
  width: 44px;
  height: 44px;
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  background: var(--void);
  padding: 4px;
  cursor: pointer;
}
.color-hex {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-mid);
  min-width: 80px;
}

/* ============================================================
 * 6.6 BOTONES PRIMARIOS
 * ============================================================ */
.btn {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--t-fast);
  border: 1px solid transparent;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}
.btn-primary {
  background: var(--acid);
  color: var(--void);
  border-color: var(--acid);
}
.btn-primary:hover:not(:disabled) {
  background: var(--acid-dim);
  border-color: var(--acid-dim);
}
.btn-primary:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-ghost {
  background: transparent;
  color: var(--text-mid);
  border-color: var(--structure);
}
.btn-ghost:hover:not(:disabled) {
  border-color: var(--text-mid);
  color: var(--text-light);
}
.btn-small {
  font-size: 13px;
  padding: var(--space-2) var(--space-3);
  min-height: 36px;
}
.btn-tiny {
  font-size: 11px;
  padding: 4px 8px;
  min-height: 28px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--structure);
}

.form-message {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font-mono);
  margin-top: var(--space-3);
}
.form-message.success { background: rgba(74, 222, 128, 0.1); border-left: 3px solid var(--success); color: var(--success); }
.form-message.warn    { background: rgba(255, 183, 77, 0.1); border-left: 3px solid var(--warn);    color: var(--warn); }
.form-message.error   { background: rgba(255, 107, 107, 0.1); border-left: 3px solid var(--danger); color: var(--danger); }
.form-message.info    { background: rgba(96, 165, 250, 0.1); border-left: 3px solid var(--info);    color: var(--info); }

/* ============================================================
 * 6.7 PREVIEW CANVAS
 * ============================================================ */
.preview-stage {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--structure);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#preview-canvas {
  display: block;
  max-width: 100%;
  max-height: 480px;
  width: auto;
  height: auto;
}
.preview-empty {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: var(--space-5);
  text-align: center;
}

/* ============================================================
 * 7. CALLOUT (compatibilidad navegadores)
 * ============================================================ */
.callout-pro {
  background: rgba(255, 183, 77, 0.06);
  border: 1px solid rgba(255, 183, 77, 0.25);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  margin: var(--space-6) 0;
}
.callout-pro h3 {
  margin: 0 0 var(--space-2);
  color: var(--warn);
  font-size: 17px;
}
.callout-pro p {
  color: var(--text-mid);
  font-size: 14px;
  margin: 0;
}

/* ============================================================
 * 8. SECCIONES DE CONTENIDO
 * ============================================================ */
.content-section {
  margin: var(--space-7) 0;
}
.content-section h2 {
  font-size: clamp(20px, 2.5vw, 28px);
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
  color: var(--text-light);
}
.content-section h2:first-child { margin-top: 0; }
.content-section h3 {
  font-size: clamp(17px, 2vw, 22px);
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
  color: var(--text-light);
}
.content-section h4 {
  font-size: 16px;
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
  color: var(--text-light);
  font-weight: 700;
}
.content-section p {
  color: var(--text-mid);
  font-size: 15px;
  line-height: 1.6;
}
.content-section ul,
.content-section ol {
  color: var(--text-mid);
  font-size: 15px;
  line-height: 1.65;
  padding-left: var(--space-5);
  margin-bottom: var(--space-4);
}
.content-section li { margin-bottom: var(--space-2); }
.content-section strong { color: var(--text-light); }
.content-section a { color: var(--acid); }

.nota {
  border-left: 3px solid var(--acid);
  padding: var(--space-3) var(--space-4);
  background: rgba(204, 255, 0, 0.05);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-light);
}

/* FAQ */
.faq details {
  border-bottom: 1px solid var(--structure);
  padding: var(--space-3) 0;
}
.faq details:first-of-type {
  border-top: 1px solid var(--structure);
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-light);
  font-size: 15px;
  list-style: none;
  padding: var(--space-3) var(--space-5) var(--space-3) 0;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--acid);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  transition: transform var(--t-fast);
}
.faq details[open] summary::after {
  content: "−";
}
.faq details p {
  margin: var(--space-3) 0 0 0;
  font-size: 14px;
  color: var(--text-mid);
}
.faq summary:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Glosario */
.glossary {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-top: var(--space-3);
}
@media (min-width: 600px) {
  .glossary { grid-template-columns: 1fr 1fr; }
}
.glossary div {
  padding: var(--space-3) var(--space-4);
  background: var(--concrete);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
}
.glossary dt {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--acid);
  margin-bottom: var(--space-1);
}
.glossary dd {
  margin: 0;
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.5;
}

/* ============================================================
 * 9. FOOTER
 * ============================================================ */
footer {
  border-top: 1px solid var(--structure);
  padding: var(--space-5) var(--space-4);
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ============================================================
 * 10. OFFLINE-READY BANNER (top, NO modal)
 * ============================================================ */
.offline-banner {
  position: fixed;
  top: var(--space-3);
  left: 50%;
  transform: translateX(-50%) translateY(-200%);
  background: var(--success);
  color: var(--void);
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-5);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  z-index: 50;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: transform var(--t-mid);
  max-width: calc(100% - 32px);
}
.offline-banner.visible {
  transform: translateX(-50%) translateY(0);
}
.offline-banner-icon {
  font-size: 18px;
  font-weight: 700;
}
.offline-banner-text { white-space: nowrap; }
@media (max-width: 480px) {
  .offline-banner-text { white-space: normal; }
}
.offline-banner-close {
  background: transparent;
  border: 1px solid var(--void);
  color: var(--void);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  margin-left: var(--space-2);
  transition: background var(--t-fast);
}
.offline-banner-close:hover {
  background: var(--void);
  color: var(--success);
}
.offline-banner-close:focus-visible {
  outline: 2px solid var(--text-light);
  outline-offset: 2px;
}

/* ============================================================
 * 11. DONATION TOAST (bottom-right)
 * ============================================================ */
.donation-toast {
  position: fixed;
  bottom: var(--space-5);
  right: var(--space-5);
  background: var(--concrete);
  border: 1px solid var(--structure);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  box-shadow: var(--shadow-lg);
  z-index: 45;
  max-width: calc(100% - 32px);
  transform: translateY(200%);
  opacity: 0;
  transition: transform var(--t-mid), opacity var(--t-mid);
}
.donation-toast.visible {
  transform: translateY(0);
  opacity: 1;
}
.donation-toast-icon {
  font-size: 28px;
  line-height: 1;
}
.donation-toast-body { flex: 1; }
.donation-toast-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-light);
}
.donation-toast-subtitle {
  margin: 2px 0 0 0;
  font-size: 12px;
  color: var(--text-mid);
  line-height: 1.4;
  max-width: 320px;
}
.donation-toast-btn {
  display: inline-block;
  background: var(--acid);
  color: var(--void);
  text-decoration: none;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: background var(--t-fast);
}
.donation-toast-btn:hover { background: var(--acid-dim); }
.donation-toast-btn:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}
.donation-toast-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-left: var(--space-1);
}
.donation-toast-close:hover { color: var(--text-light); }
.donation-toast-close:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .donation-toast {
    bottom: var(--space-3);
    right: var(--space-3);
    left: var(--space-3);
    max-width: none;
  }
  .donation-toast-icon { font-size: 22px; }
  .donation-toast-subtitle { max-width: none; }
  .offline-banner {
    left: var(--space-3);
    right: var(--space-3);
    transform: translateX(0) translateY(-200%);
    max-width: none;
    width: auto;
    padding: var(--space-3) var(--space-4);
    font-size: 13px;
    line-height: 1.3;
  }
  .offline-banner.visible {
    transform: translateX(0) translateY(0);
  }
  .offline-banner-text {
    white-space: normal;
    flex: 1;
  }
}

/* ============================================================
 * 12. A11Y — FOCUS VISIBLE GLOBAL
 * ============================================================ */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}

/* ============================================================
 * 13. PREFERS-REDUCED-MOTION
 * ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .offline-banner,
  .donation-toast {
    transition: none !important;
  }
  .dropzone.is-drag-over {
    transform: none;
  }
}

/* ============================================================
 * 13.5 LANG SWITCH (ES/EN)
 * ============================================================ */
.lang-switch {
  display: inline-flex;
  gap: 2px;
  align-items: center;
  background: var(--concrete);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  padding: 2px;
}
.lang-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  min-height: 28px;
  min-width: 36px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--t-fast);
}
.lang-btn:hover { color: var(--text-light); }
.lang-btn[aria-pressed="true"] {
  background: var(--acid);
  color: var(--void);
}
.lang-btn:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}

/* ============================================================
 * 14. MOBILE TWEAKS
 * ============================================================ */
@media (max-width: 600px) {
  .pos-grid {
    width: 100%;
    max-width: 240px;
    margin: 0 auto;
  }
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn { width: 100%; }
  .form-grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .type-grid { grid-template-columns: repeat(2, 1fr); }
  .mode-grid { grid-template-columns: 1fr; }
  .nav-right { gap: var(--space-2); }
}

/* Impresión (cuando el usuario quiera imprimir la página, no el PDF) */
@media print {
  body { background: white; color: black; }
  .nav, .hero-disclaimer, .tool-section, .callout-pro, .offline-banner, .donation-toast, footer { display: none; }
}