/* styles.css · unir-buscarv-sheets · 1000HW
 * Cache-bust: ?v=1
 * Vanilla CSS · mobile-first · paleta 1000HW (void/acid/concrete/structure)
 * WCAG 2.1 AA compliant · prefers-reduced-motion respetado
 *
 * Diseño: 3 secciones (Sheet A, Sheet B, join config) + resultado + glosario + FAQ
 * 8 operaciones como cards visuales, generador de fórmula, export CSV/TSV/XLSX/JSON.
 */

/* ============================================================
 * 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:    #8B8E98;
  --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;
  color: var(--acid);
}

pre {
  font-family: var(--font-mono);
  background: var(--void);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  color: var(--acid);
  font-size: 14px;
  margin: 0;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

input, select, textarea {
  font-family: inherit;
  font-size: 14px;
  background-color: var(--void);
  border: 1px solid var(--structure);
  color: var(--text-light);
  padding: 8px 12px;
  border-radius: var(--radius);
  outline: none;
  transition: all var(--t-fast);
  min-height: 44px;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--acid);
  box-shadow: 0 0 0 2px rgba(204, 255, 0, 0.18);
}

textarea { resize: vertical; min-height: 80px; line-height: 1.5; }

button {
  font-family: inherit;
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

ul, ol { padding-left: var(--space-5); margin-bottom: var(--space-4); }
li { margin-bottom: var(--space-2); }

/* ============================================================
 * 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;
  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;
  font-weight: 700;
}
.skip-link:focus {
  left: var(--space-3);
  top: var(--space-3);
}

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

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

/* ============================================================
 * 4. NAV
 * ============================================================ */
.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: 1200px;
  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-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); }

/* Lang switch (injected by app.js) */
.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--structure);
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 11px;
}
.lang-btn {
  padding: 4px 10px;
  background: transparent;
  color: var(--text-dim);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  min-height: 32px;
  min-width: 36px;
}
.lang-btn.active {
  background: var(--acid);
  color: var(--void);
  font-weight: 700;
}
.lang-btn:hover:not(.active) {
  color: var(--text-light);
}
.lang-btn:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}

/* ============================================================
 * 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: 75ch;
  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: 85ch;
  margin: 0;
  font-size: 14px;
}
.hero-disclaimer strong { color: var(--acid); }

/* ============================================================
 * 6. MODAL (privacidad al primer archivo)
 * ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.modal[hidden] { display: none !important; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-card {
  position: relative;
  background: var(--concrete);
  border: 1px solid var(--structure);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  max-width: 560px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}
.modal-title {
  font-size: 22px;
  color: var(--acid);
  margin-bottom: var(--space-3);
}
.modal-desc {
  font-size: 15px;
  color: var(--text-mid);
  margin-bottom: var(--space-5);
  line-height: 1.6;
}
.modal-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
}

/* ============================================================
 * 7. TOOL CARD + DATA SECTION
 * ============================================================ */
.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);
}

@media (min-width: 768px) {
  .tool-card { padding: var(--space-6); }
}

.data-section {
  background: var(--void);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin-bottom: var(--space-5);
}

@media (min-width: 768px) {
  .data-section { padding: var(--space-5); }
}

.section-title {
  font-size: 20px;
  color: var(--text-light);
  margin-bottom: var(--space-2);
}
.panel-hint {
  color: var(--text-mid);
  font-size: 14px;
  margin-bottom: var(--space-4);
}

.data-controls {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  border: 2px dashed var(--structure);
  border-radius: var(--radius);
  padding: var(--space-5);
  background: rgba(255,255,255,0.02);
  color: var(--text-mid);
  cursor: pointer;
  transition: all var(--t-fast);
  min-height: 80px;
  text-align: center;
}
.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--acid);
  background: rgba(204, 255, 0, 0.04);
  color: var(--text-light);
  outline: none;
}
.dropzone.dragover {
  border-color: var(--acid);
  background: rgba(204, 255, 0, 0.08);
  transform: scale(1.01);
}
.dropzone-icon {
  font-size: 24px;
  flex-shrink: 0;
}
.dropzone-text {
  font-size: 14px;
  line-height: 1.4;
}

.data-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.data-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-mid);
}
.data-textarea,
.data-select {
  font-family: var(--font-mono);
  font-size: 13px;
}
.example-row {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.example-row select { flex: 1 1 200px; }

.data-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-left: var(--space-3);
}

.sheet-sheet-picker {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.sheet-sheet-picker label {
  margin: 0;
  white-space: nowrap;
}
.sheet-sheet-picker select {
  flex: 1 1 200px;
}

/* Preview table */
.preview-wrap {
  margin-top: var(--space-4);
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  background: var(--void);
}
.preview-result {
  max-height: 480px;
}
.preview-empty {
  padding: var(--space-5);
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  margin: 0;
}
.preview-table table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  font-family: var(--font-mono);
}
.preview-table th,
.preview-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid var(--structure);
  white-space: nowrap;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preview-table th {
  background: var(--concrete);
  color: var(--acid);
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 10px;
}
.preview-table tr:hover td {
  background: rgba(204, 255, 0, 0.04);
}
.preview-table .match-highlight {
  background: rgba(204, 255, 0, 0.22) !important;
  outline: 2px solid var(--acid);
  outline-offset: -2px;
  color: var(--void);
  font-weight: 700;
}
.preview-table .match-row td {
  background: rgba(204, 255, 0, 0.06);
}
.preview-table .nomatch-row td {
  background: rgba(255, 107, 107, 0.05);
}
.preview-table .key-col {
  border-left: 2px solid var(--acid-dim);
  border-right: 2px solid var(--acid-dim);
}

/* ============================================================
 * 8. OP-CARDS (8 operaciones visuales)
 * ============================================================ */
.op-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

@media (min-width: 600px) {
  .op-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .op-cards { grid-template-columns: repeat(4, 1fr); }
}

.op-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: var(--space-3);
  background: var(--void);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--t-fast);
  text-align: left;
  font-family: inherit;
  font-size: inherit;
  color: var(--text-light);
  min-height: 92px;
}
.op-card:hover {
  border-color: var(--text-mid);
  background: rgba(255,255,255,0.02);
}
.op-card:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}
.op-card.active {
  border-color: var(--acid);
  background: rgba(204, 255, 0, 0.08);
  box-shadow: 0 0 0 1px var(--acid);
}
.op-icon {
  font-size: 20px;
  line-height: 1;
}
.op-name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-light);
}
.op-card.active .op-name { color: var(--acid); }
.op-desc {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.35;
}

/* ============================================================
 * 9. FORM GRID (join config)
 * ============================================================ */
.form-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.form-row-2col {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 600px) {
  .form-row-2col { grid-template-columns: 1fr 1fr; }
}
.form-row-3col {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex-wrap: wrap;
}
@media (min-width: 600px) {
  .form-row-3col { flex-direction: row; gap: var(--space-4); }
}
.form-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-mid);
  font-weight: 700;
}
.form-input {
  font-family: var(--font-mono);
  font-size: 14px;
}

select[multiple] {
  min-height: 120px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.parse-actions,
.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  color: var(--text-mid);
  cursor: pointer;
  min-height: 44px;
  padding: 0 var(--space-2);
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--acid);
  flex-shrink: 0;
}

/* ============================================================
 * 10. OUTPUT BLOCK (fórmula generada)
 * ============================================================ */
.output-block {
  margin-bottom: var(--space-4);
}
.output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
  flex-wrap: wrap;
  gap: var(--space-2);
}
.output-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-mid);
  font-weight: 700;
}
.output-code {
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--void);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  color: var(--acid);
  white-space: pre-wrap;
  word-break: break-all;
  min-height: 48px;
}

/* ============================================================
 * 11. STATS BAR (resultado)
 * ============================================================ */
.stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--concrete);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  margin-bottom: var(--space-3);
  font-family: var(--font-mono);
  font-size: 12px;
}
.stats-bar:empty {
  display: none;
}
.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 var(--space-2);
  border-right: 1px solid var(--structure);
}
.stat-item:last-child { border-right: none; }
.stat-label {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.stat-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--acid);
}
.stat-value.muted {
  color: var(--text-mid);
}

.result-disclaimer {
  background: rgba(204, 255, 0, 0.06);
  border-left: 3px solid var(--acid);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  color: var(--text-mid);
  font-size: 13px;
  margin-bottom: var(--space-3);
  line-height: 1.5;
}

/* ============================================================
 * 12. BUTTONS
 * ============================================================ */
.btn {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--t-fast);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
}
.btn:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}
.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-secondary {
  background: transparent;
  color: var(--text-light);
  border-color: var(--structure);
}
.btn-secondary:hover:not(:disabled) {
  border-color: var(--acid);
  color: var(--acid);
}
.btn-ghost {
  background: transparent;
  color: var(--text-mid);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
  color: var(--text-light);
  background: rgba(255,255,255,0.04);
}
.btn-mini {
  background: var(--concrete);
  color: var(--acid);
  border-color: var(--structure);
  font-size: 10px;
  padding: 6px 12px;
  min-height: 32px;
}
.btn-mini:hover:not(:disabled) {
  background: var(--structure);
  border-color: var(--acid);
}

/* ============================================================
 * 13. GLOSSARY
 * ============================================================ */
.glossary {
  background: var(--void);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  padding: var(--space-4);
}
@media (min-width: 768px) {
  .glossary { padding: var(--space-5); }
}
.glossary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-top: var(--space-3);
}
@media (min-width: 768px) {
  .glossary-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .glossary-grid { grid-template-columns: repeat(3, 1fr); }
}
.glossary-item {
  background: var(--concrete);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.glossary-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.glossary-code {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--danger);
  background: rgba(255, 107, 107, 0.12);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}
.glossary-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-light);
  flex: 1;
}
.glossary-desc {
  font-size: 13px;
  color: var(--text-mid);
  margin: 0;
  line-height: 1.45;
}
.glossary-fix {
  font-size: 12px;
  color: var(--text-dim);
  background: rgba(74, 222, 128, 0.06);
  border-left: 2px solid var(--success);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  line-height: 1.5;
  margin: 0;
}
.glossary-fix strong {
  color: var(--success);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.12em;
  display: block;
  margin-bottom: 4px;
}

/* ============================================================
 * 14. AD SECTION
 * ============================================================ */
.ad-section {
  padding: var(--space-5) 0;
}
.ad-section ins {
  display: block;
  min-height: 90px;
}

/* ============================================================
 * 15. CONTENT SECTIONS
 * ============================================================ */
.content-section {
  padding: var(--space-7) 0;
  border-top: 1px solid var(--structure);
}
.content-section h2 {
  font-size: clamp(22px, 2.5vw, 28px);
  color: var(--acid);
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
}
.content-section h2:first-child {
  margin-top: 0;
}
.content-list {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.7;
}
.content-list li {
  margin-bottom: var(--space-3);
}
.content-list strong {
  color: var(--text-light);
}

.callout {
  background: var(--concrete);
  border-left: 3px solid var(--warn);
  padding: var(--space-4);
  border-radius: var(--radius);
  margin: var(--space-5) 0;
}
.callout h3 {
  color: var(--warn);
  margin-bottom: var(--space-3);
}
.callout ul { margin-bottom: 0; }

/* ============================================================
 * 16. FAQ
 * ============================================================ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.faq-item {
  background: var(--concrete);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  transition: all var(--t-fast);
}
.faq-item[open] {
  border-color: var(--acid);
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text-light);
  padding: var(--space-2) 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.faq-item summary::before {
  content: '▸';
  color: var(--acid);
  transition: transform var(--t-fast);
  flex-shrink: 0;
}
.faq-item[open] summary::before {
  transform: rotate(90deg);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}
.faq-item p {
  margin: var(--space-2) 0 0;
  color: var(--text-mid);
  font-size: 14px;
  line-height: 1.6;
}

/* ============================================================
 * 17. FUNC CARDS
 * ============================================================ */
.funcs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
@media (min-width: 768px) {
  .funcs-grid { grid-template-columns: repeat(2, 1fr); }
}
.func-card {
  background: var(--concrete);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.func-card h3 {
  font-size: 15px;
  color: var(--acid);
  margin: 0;
}
.func-card p {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.5;
  margin: 0;
}
.func-card .func-syntax {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--void);
  border-left: 2px solid var(--acid-dim);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--acid);
  white-space: pre-wrap;
  word-break: break-word;
  display: block;
}

/* ============================================================
 * 18. FOOTER + DISCLAIMER
 * ============================================================ */
.site-footer {
  border-top: 1px solid var(--structure);
  background: var(--concrete);
  padding: var(--space-5) 0 var(--space-6);
  text-align: center;
}
.site-footer p {
  font-size: 12px;
  color: var(--text-dim);
  margin: 0 0 var(--space-2);
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-light);
}
.footer-brand .brand-acid { color: var(--acid); }
.footer-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.footer-disclaimer {
  background: rgba(204, 255, 0, 0.04);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  padding: var(--space-4);
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
  margin: var(--space-6) 0 0;
}

/* ============================================================
 * 19. OFFLINE BANNER
 * ============================================================ */
.offline-banner {
  position: fixed;
  bottom: var(--space-5);
  left: 50%;
  transform: translateX(-50%);
  background: var(--concrete);
  border: 1px solid var(--acid);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  z-index: 80;
  box-shadow: var(--shadow-md);
  max-width: 90vw;
}
.offline-banner[hidden] { display: none !important; }
.offline-banner-icon {
  color: var(--acid);
  font-size: 18px;
  flex-shrink: 0;
}
.offline-banner-text {
  font-size: 13px;
  color: var(--text-light);
  flex: 1;
}
.offline-banner-close {
  background: transparent;
  border: none;
  color: var(--text-mid);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.offline-banner-close:hover { color: var(--text-light); }
.offline-banner-close:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}

/* ============================================================
 * 20. DONATION TOAST
 * ============================================================ */
.donation-toast {
  position: fixed;
  bottom: var(--space-5);
  right: var(--space-4);
  background: var(--concrete);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  z-index: 90;
  box-shadow: var(--shadow-lg);
  max-width: 360px;
  animation: slideUp 400ms cubic-bezier(.4,0,.2,1);
}
.donation-toast[hidden] { display: none !important; }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .donation-toast { animation: none; }
  .dropzone.dragover { transform: none; }
}
.donation-toast-icon {
  font-size: 22px;
  flex-shrink: 0;
}
.donation-toast-content {
  flex: 1;
  min-width: 0;
}
.donation-toast-title {
  font-weight: 700;
  font-size: 14px;
  margin: 0;
  color: var(--text-light);
}
.donation-toast-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  margin: 2px 0 0;
  line-height: 1.3;
}
.donation-toast-btn {
  background: var(--acid);
  color: var(--void);
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
.donation-toast-btn:hover { background: var(--acid-dim); }
.donation-toast-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.donation-toast-close:hover { color: var(--text-light); }
.donation-toast-close:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .donation-toast {
    left: var(--space-3);
    right: var(--space-3);
    bottom: var(--space-3);
    max-width: none;
  }
  .offline-banner {
    left: var(--space-3);
    right: var(--space-3);
    transform: none;
    bottom: var(--space-3);
  }
}

/* ============================================================
 * 21. PRINT (vista imprimible)
 * ============================================================ */
@media print {
  body { background: white; color: black; }
  .nav, .offline-banner, .donation-toast, .modal,
  .ad-section, .site-footer, .op-cards, .dropzone,
  .data-controls, .parse-actions { display: none !important; }
  .tool-card { border: none; box-shadow: none; }
  .preview-result { max-height: none; overflow: visible; }
  .footer-disclaimer { background: transparent; border-color: black; color: black; }
  a { color: #0066cc; text-decoration: underline; }
}
