/* styles.css · comparar-hojas-calculo · 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: 2 secciones de carga (Hoja A, Hoja B) + opciones + resultado + FAQ
 * Codificación por colores para diff: verde añadido, amarillo cambiado, rojo eliminado.
 */

/* ============================================================
 * 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;

  /* Diff highlight (semitransparent para legibilidad sobre dark) */
  --diff-added-bg:    rgba(74, 222, 128, 0.18);
  --diff-added-bg-strong: rgba(74, 222, 128, 0.32);
  --diff-changed-bg:  rgba(255, 213, 79, 0.22);
  --diff-changed-bg-strong: rgba(255, 213, 79, 0.40);
  --diff-removed-bg:  rgba(255, 107, 107, 0.18);
  --diff-removed-bg-strong: rgba(255, 107, 107, 0.32);
  --diff-unchanged-bg: rgba(255, 255, 255, 0.02);

  /* 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;
}

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

/* ============================================================
 * 2. ACCESIBILIDAD
 * ============================================================ */

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: 9999;
  background: var(--acid);
  color: var(--void);
  padding: var(--space-3) var(--space-5);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  transition: top var(--t-fast);
}
.skip-link:focus { top: var(--space-4); }

/* Focus global */
*:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ============================================================
 * 3. UTILIDADES
 * ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.accent { color: var(--acid); }
.brand-acid { color: var(--acid); }

/* ============================================================
 * 4. NAV
 * ============================================================ */
.nav {
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--structure);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-3) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.nav-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-mid);
  text-decoration: none;
  font-size: 0.9rem;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-back:hover { color: var(--acid); background: rgba(204, 255, 0, 0.06); }
.nav-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-light);
  letter-spacing: -0.02em;
}

/* Lang switch (inyectado por app.js) */
.lang-switch {
  display: inline-flex;
  gap: 2px;
  background: var(--concrete);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  padding: 2px;
}
.lang-btn {
  background: transparent;
  border: 0;
  color: var(--text-dim);
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 6px;
  transition: all var(--t-fast);
}
.lang-btn.active {
  background: var(--acid);
  color: var(--void);
}
.lang-btn:not(.active):hover {
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.04);
}

/* ============================================================
 * 5. HERO
 * ============================================================ */
.hero {
  padding: var(--space-7) 0 var(--space-6);
  position: relative;
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.tag {
  display: inline-block;
  padding: 4px var(--space-3);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tag-acid {
  background: rgba(204, 255, 0, 0.12);
  color: var(--acid);
  border: 1px solid rgba(204, 255, 0, 0.30);
}
.tag-priv {
  background: rgba(74, 222, 128, 0.10);
  color: var(--success);
  border: 1px solid rgba(74, 222, 128, 0.30);
}

.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  margin-bottom: var(--space-4);
}

.hero-lede {
  font-size: 1.05rem;
  color: var(--text-mid);
  max-width: 880px;
  margin-bottom: var(--space-4);
}
.hero-lede strong { color: var(--text-light); }

.hero-disclaimer {
  background: var(--concrete);
  border-left: 4px solid var(--acid);
  border-radius: var(--radius);
  padding: var(--space-4);
  color: var(--text-mid);
  max-width: 880px;
  margin: 0;
}

/* ============================================================
 * 6. PRIVACY MODAL
 * ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-card {
  position: relative;
  background: var(--concrete);
  border: 1px solid var(--structure);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  max-width: 540px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}
.modal-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-3);
  color: var(--text-light);
}
.modal-desc {
  color: var(--text-mid);
  margin-bottom: var(--space-5);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
}

/* ============================================================
 * 7. TOOL SECTION
 * ============================================================ */
.tool-section {
  padding: 0 0 var(--space-7);
}
.tool-card {
  background: var(--concrete);
  border: 1px solid var(--structure);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.data-section {
  padding: var(--space-5) var(--space-5);
  border-bottom: 1px solid var(--structure);
}
.data-section:last-of-type { border-bottom: 0; }

.section-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-2);
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.panel-hint {
  color: var(--text-mid);
  font-size: 0.92rem;
  margin-bottom: var(--space-4);
}

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

.data-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.data-row-inline {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.data-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-mid);
}

.data-textarea {
  width: 100%;
  background: var(--void);
  border: 1px solid var(--structure);
  color: var(--text-light);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: var(--space-3);
  border-radius: var(--radius);
  resize: vertical;
  min-height: 80px;
  transition: border-color var(--t-fast);
}
.data-textarea:focus { border-color: var(--acid); }

.data-select,
.form-input {
  background: var(--void);
  border: 1px solid var(--structure);
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: var(--space-3);
  border-radius: var(--radius);
  width: 100%;
  cursor: pointer;
  transition: border-color var(--t-fast);
}
.data-select:focus,
.form-input:focus { border-color: var(--acid); }

.data-meta {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.example-row {
  display: flex;
  gap: var(--space-2);
  align-items: stretch;
}
.example-row select { flex: 1; }

/* Dropzone */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-5);
  background: var(--void);
  border: 2px dashed var(--structure);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: all var(--t-fast);
  min-height: 140px;
}
.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--acid);
  background: rgba(204, 255, 0, 0.04);
}
.dropzone.is-dragging {
  border-color: var(--acid);
  background: rgba(204, 255, 0, 0.10);
  border-style: solid;
}
.dropzone-icon {
  font-size: 2.2rem;
  line-height: 1;
}
.dropzone-text {
  color: var(--text-mid);
  font-size: 0.92rem;
}

/* Sheet picker */
.sheet-picker {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.sheet-picker label { white-space: nowrap; }

/* Preview table */
.preview-wrap {
  margin-top: var(--space-4);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  overflow: auto;
  max-height: 280px;
  background: var(--void);
}
.preview-table { padding: var(--space-3); }
.preview-empty {
  color: var(--text-dim);
  font-style: italic;
  text-align: center;
  padding: var(--space-5);
  margin: 0;
}
.preview-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  font-family: var(--font-mono);
}
.preview-table th {
  text-align: left;
  background: var(--structure);
  color: var(--text-light);
  padding: var(--space-2);
  font-weight: 700;
  position: sticky;
  top: 0;
  border-bottom: 1px solid var(--concrete);
  white-space: nowrap;
}
.preview-table td {
  padding: var(--space-2);
  border-bottom: 1px solid var(--structure);
  color: var(--text-mid);
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
 * 8. FORM
 * ============================================================ */
.form-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.form-row { display: flex; flex-direction: column; gap: var(--space-2); }
.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.form-row-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-mid);
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-mid);
  user-select: none;
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--acid);
  cursor: pointer;
}

/* CTA row */
.cta-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-5);
  flex-wrap: wrap;
}
.compare-hint {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ============================================================
 * 9. BUTTONS
 * ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-lg { padding: var(--space-4) var(--space-6); font-size: 1.05rem; }

.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);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(204, 255, 0, 0.25);
}

.btn-secondary {
  background: var(--concrete);
  color: var(--text-light);
  border-color: var(--structure);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--structure);
  border-color: var(--text-dim);
}

.btn-ghost {
  background: transparent;
  color: var(--text-mid);
  border-color: var(--structure);
}
.btn-ghost:hover:not(:disabled) {
  color: var(--text-light);
  border-color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
}

.btn-mini {
  padding: 4px var(--space-3);
  font-size: 0.82rem;
}

/* ============================================================
 * 10. RESULT SECTION + STATS
 * ============================================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-3);
  margin: var(--space-5) 0;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-4);
  background: var(--void);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  transition: transform var(--t-fast);
}
.stat:hover { transform: translateY(-2px); }
.stat-icon { font-size: 1.3rem; }
.stat-num {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-light);
}
.stat-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  text-align: center;
}
.stat-added .stat-num { color: var(--success); }
.stat-changed .stat-num { color: #FFD54F; }
.stat-removed .stat-num { color: var(--danger); }

/* ============================================================
 * 11. FILTERS + SEARCH + EXPORT
 * ============================================================ */
.filter-row {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}
.filter-buttons {
  display: inline-flex;
  gap: 4px;
  background: var(--void);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  padding: 4px;
  flex-wrap: wrap;
}
.filter-btn {
  background: transparent;
  border: 0;
  color: var(--text-dim);
  padding: 6px var(--space-3);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  transition: all var(--t-fast);
}
.filter-btn:hover { color: var(--text-light); }
.filter-btn.active {
  background: var(--acid);
  color: var(--void);
}
.search-input {
  flex: 1;
  min-width: 180px;
  background: var(--void);
  border: 1px solid var(--structure);
  color: var(--text-light);
  padding: var(--space-3);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
}
.search-input:focus { border-color: var(--acid); }
.elapsed-meta {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.export-row {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

/* ============================================================
 * 12. DIFF TABLE
 * ============================================================ */
.diff-wrap {
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  overflow: auto;
  max-height: 600px;
  background: var(--void);
}
.diff-table { padding: 0; }
.diff-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  font-family: var(--font-mono);
}
.diff-table thead {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--structure);
}
.diff-table th {
  text-align: left;
  padding: var(--space-3);
  color: var(--text-light);
  font-weight: 700;
  border-bottom: 2px solid var(--concrete);
  white-space: nowrap;
}
.diff-table th.col-status { width: 100px; min-width: 100px; }
.diff-table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--structure);
  color: var(--text-mid);
  vertical-align: top;
  max-width: 320px;
  overflow-wrap: anywhere;
}
.diff-table tr.row-added td {
  background: var(--diff-added-bg);
}
.diff-table tr.row-added td.cell-status { color: var(--success); font-weight: 700; }
.diff-table tr.row-removed td {
  background: var(--diff-removed-bg);
}
.diff-table tr.row-removed td.cell-status { color: var(--danger); font-weight: 700; }
.diff-table tr.row-changed td.cell-status { color: #FFD54F; font-weight: 700; }
.diff-table tr.row-unchanged { opacity: 0.78; }
.diff-table tr.row-unchanged td.cell-status { color: var(--text-dim); }

.diff-table td.cell-changed {
  background: var(--diff-changed-bg-strong);
  color: var(--text-light);
  font-weight: 600;
  border-left: 2px solid #FFD54F;
}
.diff-table td.cell-old {
  text-decoration: line-through;
  color: var(--text-dim);
  opacity: 0.7;
}

/* Side-by-side mode */
.diff-table.side-by-side table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.diff-table.side-by-side colgroup,
.diff-table.side-by-side thead,
.diff-table.side-by-side tbody,
.diff-table.side-by-side tr {
  display: contents;
}
.diff-table.side-by-side th,
.diff-table.side-by-side td {
  border-right: 1px solid var(--structure);
}

/* ============================================================
 * 13. PROGRESS BAR
 * ============================================================ */
.progress-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--concrete);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  margin-top: var(--space-4);
}
.progress-track {
  flex: 1;
  height: 8px;
  background: var(--structure);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--acid);
  width: 0%;
  transition: width var(--t-fast);
}
.progress-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--acid);
  font-weight: 700;
  min-width: 50px;
  text-align: right;
}

/* ============================================================
 * 14. AD SECTION
 * ============================================================ */
.ad-section {
  padding: var(--space-6) 0;
  text-align: center;
}
.adsbygoogle {
  display: inline-block;
  min-height: 90px;
}

/* ============================================================
 * 15. CONTENT SECTION (text, FAQ, etc.)
 * ============================================================ */
.content-section {
  padding: var(--space-6) 0;
}
.content-section h2 {
  font-size: 1.5rem;
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
  color: var(--text-light);
}
.content-section h2:first-child { margin-top: 0; }
.content-section p { color: var(--text-mid); }
.content-section p strong { color: var(--text-light); }

.content-list {
  color: var(--text-mid);
  padding-left: var(--space-5);
  margin: 0 0 var(--space-4);
}
.content-list li {
  margin-bottom: var(--space-2);
  line-height: 1.6;
}

.funcs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.func-card {
  background: var(--concrete);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  padding: var(--space-4);
}
.func-card h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-2);
  color: var(--acid);
}
.func-card p {
  font-size: 0.9rem;
  color: var(--text-mid);
  margin-bottom: var(--space-3);
}
.func-syntax {
  display: block;
  background: var(--void);
  border: 1px solid var(--structure);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--acid);
  word-break: break-all;
}

/* Callouts */
.callout {
  border-radius: var(--radius);
  padding: var(--space-5);
  margin: var(--space-5) 0;
  border-left: 4px solid;
}
.callout h3 {
  margin-bottom: var(--space-3);
  font-size: 1.1rem;
}
.callout ul { margin-bottom: 0; }
.callout-warn {
  background: rgba(255, 183, 77, 0.06);
  border-color: var(--warn);
}
.callout-warn h3 { color: var(--warn); }

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.faq-item {
  background: var(--concrete);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: var(--space-4);
  font-weight: 600;
  color: var(--text-light);
  list-style: none;
  position: relative;
  padding-right: var(--space-7);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--acid);
  font-weight: 400;
  transition: transform var(--t-fast);
}
.faq-item[open] summary::after {
  content: '−';
}
.faq-item p {
  padding: 0 var(--space-4) var(--space-4);
  color: var(--text-mid);
  margin: 0;
}

.footer-disclaimer {
  background: var(--concrete);
  border-radius: var(--radius);
  padding: var(--space-4);
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-top: var(--space-5);
}

/* ============================================================
 * 16. FOOTER
 * ============================================================ */
.site-footer {
  border-top: 1px solid var(--structure);
  padding: var(--space-6) 0;
  background: var(--concrete);
  margin-top: var(--space-7);
}
.site-footer p {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: var(--space-2);
}
.site-footer .footer-brand {
  color: var(--text-light);
  font-weight: 800;
}
.site-footer .footer-meta { font-size: 0.78rem; }

/* ============================================================
 * 17. 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);
  font-size: 0.88rem;
  color: var(--text-light);
  max-width: 90vw;
  box-shadow: var(--shadow-md);
  z-index: 200;
}
.offline-banner-icon {
  color: var(--acid);
  font-weight: 700;
}
.offline-banner-text { flex: 1; }
.offline-banner-close {
  background: transparent;
  border: 0;
  color: var(--text-dim);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 var(--space-2);
}
.offline-banner-close:hover { color: var(--text-light); }

/* ============================================================
 * 18. DONATION TOAST
 * ============================================================ */
.donation-toast {
  position: fixed;
  bottom: var(--space-5);
  right: var(--space-5);
  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);
  font-size: 0.88rem;
  color: var(--text-light);
  max-width: 360px;
  box-shadow: var(--shadow-md);
  z-index: 200;
  animation: slideIn var(--t-slow) ease-out;
}
.donation-toast-icon { font-size: 1.4rem; }
.donation-toast-content { flex: 1; }
.donation-toast-title {
  margin: 0 0 2px;
  font-weight: 700;
  font-size: 0.88rem;
}
.donation-toast-subtitle {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-mid);
}
.donation-toast-btn {
  background: var(--acid);
  color: var(--void);
  padding: 6px var(--space-3);
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.82rem;
}
.donation-toast-close {
  background: transparent;
  border: 0;
  color: var(--text-dim);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 var(--space-2);
}
.donation-toast-close:hover { color: var(--text-light); }

@keyframes slideIn {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ============================================================
 * 19. 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;
  }
}

/* ============================================================
 * 20. RESPONSIVE (mobile-first progressive enhancement)
 * ============================================================ */
@media (min-width: 600px) {
  .form-row-3col { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .form-row-2col { grid-template-columns: 1fr; }
  .form-row-3col { grid-template-columns: 1fr; }
  .hero { padding: var(--space-6) 0 var(--space-5); }
  .hero h1 { font-size: 1.5rem; }
  .data-section { padding: var(--space-4); }
  .filter-row { flex-direction: column; align-items: stretch; }
  .search-input { width: 100%; }
  .export-row { flex-direction: column; }
  .export-row .btn { width: 100%; }
  .preview-table th, .preview-table td { font-size: 0.78rem; padding: var(--space-2); }
  .diff-table th, .diff-table td { font-size: 0.78rem; padding: var(--space-2); }
  .donation-toast {
    left: var(--space-3);
    right: var(--space-3);
    bottom: var(--space-3);
    max-width: none;
  }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; }
  .hero-tags .tag { font-size: 0.7rem; padding: 3px var(--space-2); }
  .cta-row { flex-direction: column; align-items: stretch; }
  .btn-lg { width: 100%; }
}