/* =============================================================
   Calculagratis — style.css
   Sistema de diseño único para todas las herramientas del sitio.
   1. Tokens  2. Reset  3. Utilidades  4. Tipografía  5. Header/Nav
   6. Componentes  7. Tool card  8. Anuncios  9. Home  10. Quiz
   11. Tablas  12. Footer  13. Responsive  14. Reduced motion
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #f5f7fb;
  --bg-elevated: #ffffff;
  --bg-soft: #eef1f8;
  --text: #171b26;
  --text-muted: #5b6478;
  --text-faint: #8992a3;
  --border: #e1e5ee;
  --border-strong: #c7cee0;

  --primary: #2856d6;
  --primary-dark: #1c3fa0;
  --primary-soft: #e8eefd;
  --accent: #00b894;
  --accent-dark: #00937a;
  --accent-soft: #e2f9f3;
  --warn: #b9770e;
  --warn-soft: #fdf1dd;
  --danger: #d64545;
  --danger-soft: #fbe6e6;

  --cat-finanzas: #2856d6;
  --cat-salud: #e0507a;
  --cat-conversores: #7c5cff;
  --cat-generadores: #e0812f;
  --cat-trafico: #b9770e;
  --cat-tests: #00b894;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(23, 27, 38, 0.06);
  --shadow: 0 6px 20px rgba(23, 27, 38, 0.08);
  --shadow-lg: 0 16px 40px rgba(23, 27, 38, 0.14);

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --container: 1180px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10131c;
    --bg-elevated: #171c29;
    --bg-soft: #1d2333;
    --text: #eef0f6;
    --text-muted: #a2aabd;
    --text-faint: #737d94;
    --border: #2a3145;
    --border-strong: #3a4360;
    --primary-soft: #1b2a52;
    --accent-soft: #103b32;
    --warn-soft: #3a2c10;
    --danger-soft: #3a1e1e;
  }
}

/* =============================================================
   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 {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.15; letter-spacing: -0.01em; font-weight: 700; }
ul, ol { padding-left: 1.2em; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .6rem 1rem; background: var(--text); color: var(--bg-elevated);
  border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   3. Utilidades
   ============================================================= */
.container { width: 100%; 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;
}
.section { padding-block: 2.5rem; }
.section--tight { padding-block: 1.25rem; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.center { text-align: center; }
.muted { color: var(--text-muted); }
.small { font-size: 0.875rem; }
.divider { border: 0; border-top: 1px solid var(--border); margin-block: 2rem; }

/* =============================================================
   4. Tipografía
   ============================================================= */
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.35rem, 2.8vw, 1.7rem); margin-bottom: .75rem; }
h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.prose p { margin-bottom: 1rem; color: var(--text-muted); }
.prose h3 { color: var(--text); margin-top: 1.5rem; }
.prose strong { color: var(--text); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--primary); margin-bottom: .6rem;
}
.subtitle { color: var(--text-muted); font-size: 1.05rem; max-width: 60ch; }

/* =============================================================
   5. Header & navegación
   ============================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem; }
.logo { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.15rem; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo svg { width: 28px; height: 28px; flex: none; }
.logo .logo-dot { color: var(--accent); }

.main-nav { display: flex; align-items: center; gap: 1.5rem; }
.main-nav a { color: var(--text-muted); font-weight: 600; font-size: .93rem; }
.main-nav a:hover { color: var(--primary); text-decoration: none; }
.nav-cta {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--primary); color: #fff !important; padding: .55rem 1rem;
  border-radius: 999px; font-weight: 700; font-size: .88rem;
}
.nav-cta:hover { background: var(--primary-dark); text-decoration: none; }
.nav-toggle {
  display: none; width: 40px; height: 40px; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid var(--border);
}
.nav-toggle svg { width: 20px; height: 20px; }

.breadcrumb {
  font-size: .85rem; color: var(--text-faint); display: flex; gap: .4rem; flex-wrap: wrap;
  padding-block: 1rem .25rem;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb .sep { color: var(--border-strong); }

/* =============================================================
   6. Componentes generales
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.3rem; border-radius: 999px; font-weight: 700; font-size: .95rem;
  transition: transform .18s var(--ease-out), background .18s var(--ease-out), box-shadow .18s var(--ease-out);
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-dark); box-shadow: var(--shadow); }
.btn-secondary { background: var(--bg-soft); color: var(--text); border: 1px solid var(--border-strong); }
.btn-secondary:hover { background: var(--border); }
.btn-ghost { color: var(--primary); font-weight: 600; }
.btn-block { width: 100%; }
.btn-lg { padding: 1rem 1.6rem; font-size: 1.05rem; }
.btn[disabled] { opacity: .55; pointer-events: none; }

.card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .78rem; font-weight: 700; padding: .3rem .65rem; border-radius: 999px;
}
.badge-privacy { background: var(--accent-soft); color: var(--accent-dark); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }

/* Formularios */
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.field label { font-weight: 600; font-size: .92rem; }
.field .hint { font-size: .8rem; color: var(--text-faint); }
input[type="text"], input[type="number"], input[type="email"], input[type="date"],
input[type="search"], select, textarea {
  width: 100%; padding: .7rem .85rem; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong); background: var(--bg-elevated); color: var(--text);
  font-family: inherit; font-size: 1rem; transition: border-color .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary); outline: none; box-shadow: 0 0 0 4px var(--primary-soft);
}
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.radio-group, .check-group { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill-option {
  display: inline-flex; align-items: center; gap: .4rem; padding: .55rem .95rem;
  border-radius: 999px; border: 1.5px solid var(--border-strong); cursor: pointer;
  font-size: .88rem; font-weight: 600; background: var(--bg-elevated);
  transition: all .15s var(--ease-out);
}
.pill-option:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }
.pill-option input { position: absolute; opacity: 0; width: 0; height: 0; }
input[type="range"] { width: 100%; accent-color: var(--accent); height: 6px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 1.05em; height: 1.05em; }

/* Resultado destacado */
.result-figure {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 1.5rem; background: var(--accent-soft); border-radius: var(--radius); gap: .25rem;
}
.result-figure .value { font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 800; color: var(--accent-dark); }
.result-figure .label { font-size: .85rem; color: var(--text-muted); font-weight: 600; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; margin-top: 1rem; }
.result-stat { background: var(--bg-soft); border-radius: var(--radius-sm); padding: .9rem 1rem; }
.result-stat .value { font-size: 1.3rem; font-weight: 800; }
.result-stat .label { font-size: .78rem; color: var(--text-muted); }

/* =============================================================
   7. Tool card
   ============================================================= */
.tool-section { padding-block: 1.5rem 1rem; }
.tool-card {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 1.5rem;
}
@media (min-width: 720px) { .tool-card { padding: 2rem; } }

.tool-card [data-view] { display: none; }
.tool-card[data-state="idle"] [data-view="idle"] { display: block; }
.tool-card[data-state="loading"] [data-view="loading"] { display: block; }
.tool-card[data-state="done"] [data-view="done"] { display: block; }
.tool-card[data-state="error"] [data-view="error"] { display: block; }
.tool-card:not([data-state]) [data-view="idle"] { display: block; }

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem;
  text-align: center; padding: 2.2rem 1.2rem; border: 2px dashed var(--border-strong);
  border-radius: var(--radius); cursor: pointer; transition: all .18s var(--ease-out); color: var(--text-muted);
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.dropzone svg { width: 38px; height: 38px; color: var(--accent); }
.dropzone strong { color: var(--text); }
.dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }

.progress-bar { width: 100%; height: 10px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; margin-block: .75rem; }
.progress-bar > span { display: block; height: 100%; background: var(--accent); width: 0%; transition: width .2s var(--ease-out); }

.file-row {
  display: flex; align-items: center; gap: .75rem; padding: .7rem; border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: .5rem;
}
.file-row .name { flex: 1; min-width: 0; font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .meta { font-size: .78rem; color: var(--text-faint); flex: none; }

.privacy-note {
  display: flex; align-items: flex-start; gap: .5rem; margin-top: 1rem; padding: .8rem 1rem;
  background: var(--bg-soft); border-radius: var(--radius-sm); font-size: .85rem; color: var(--text-muted);
}
.privacy-note svg { width: 18px; height: 18px; flex: none; color: var(--accent-dark); margin-top: .1rem; }
.limits-note { font-size: .8rem; color: var(--text-faint); margin-top: .6rem; }

.error-box {
  display: flex; gap: .6rem; padding: 1rem; background: var(--danger-soft); color: var(--danger);
  border-radius: var(--radius-sm); font-size: .9rem;
}

/* Botón de reset / "otro cálculo" */
.reset-link { display: inline-block; margin-top: 1rem; font-weight: 600; font-size: .9rem; }

/* =============================================================
   8. Anuncios (placeholders)
   ============================================================= */
.ad-slot {
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: .3rem;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius-sm);
  background: repeating-linear-gradient(135deg, var(--bg-soft), var(--bg-soft) 10px, var(--bg) 10px, var(--bg) 20px);
  color: var(--text-faint); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  margin-block: 1.5rem;
}
.ad-slot::before { content: "Publicidad"; font-size: .68rem; letter-spacing: .08em; opacity: .8; }
.ad-slot span.ad-label { font-size: 1rem; letter-spacing: .1em; }
.ad-slot--leaderboard { min-height: 90px; width: 100%; }
.ad-slot--incontent { min-height: 250px; width: 100%; max-width: 336px; margin-inline: auto; }
@media (min-width: 720px) { .ad-slot--leaderboard { min-height: 110px; } }

.ad-toast {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 300; max-width: 240px;
  background: var(--bg-elevated); border: 1.5px dashed var(--border-strong); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); padding: .8rem .9rem .9rem;
  transform: translateY(20px); opacity: 0; pointer-events: none;
  transition: transform .35s var(--ease-out), opacity .35s var(--ease-out);
}
.ad-toast.is-visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.ad-toast .ad-toast-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .4rem; }
.ad-toast .ad-toast-head span { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); }
.ad-toast .ad-toast-close { width: 22px; height: 22px; border-radius: 50%; background: var(--bg-soft); font-size: .9rem; line-height: 1; flex: none; }
.ad-toast .ad-toast-body {
  min-height: 70px; display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--border-strong); border-radius: 6px; font-weight: 700; color: var(--text-faint); font-size: .85rem;
}

dialog.ad-popup {
  border: none; border-radius: var(--radius-lg); padding: 0; max-width: 380px; width: min(90vw, 380px);
  box-shadow: var(--shadow-lg);
}
dialog.ad-popup::backdrop { background: rgba(15, 18, 26, 0.55); backdrop-filter: blur(2px); }
.ad-popup-inner { padding: 1.25rem; }
.ad-popup-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.ad-popup-head span { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); }
.ad-popup-close { width: 30px; height: 30px; border-radius: 50%; background: var(--bg-soft); font-size: 1.1rem; }
.ad-popup-body {
  min-height: 200px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: .3rem;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius-sm); color: var(--text-faint);
  background: repeating-linear-gradient(135deg, var(--bg-soft), var(--bg-soft) 10px, var(--bg) 10px, var(--bg) 20px);
  font-weight: 700; margin-bottom: 1rem;
}
.ad-popup-body span.ad-label { font-size: 1.1rem; letter-spacing: .1em; text-transform: uppercase; }

/* =============================================================
   9. Home / categorías
   ============================================================= */
.hero-home {
  padding-block: 3rem 2rem; text-align: center;
}
.hero-home h1 { max-width: 22ch; margin-inline: auto; }
.hero-home .subtitle { margin-inline: auto; margin-top: .75rem; }
.hero-search {
  max-width: 520px; margin: 1.5rem auto 0; display: flex; gap: .5rem; background: var(--bg-elevated);
  border: 1.5px solid var(--border-strong); border-radius: 999px; padding: .4rem .4rem .4rem 1.1rem; box-shadow: var(--shadow-sm);
}
.hero-search input { border: none; flex: 1; padding: .5rem 0; }
.hero-search input:focus { box-shadow: none; }
.hero-search button { border-radius: 999px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: center; margin-top: 1.5rem; color: var(--text-muted); font-size: .85rem; font-weight: 600; }
.trust-row span { display: inline-flex; align-items: center; gap: .35rem; }
.trust-row svg { width: 16px; height: 16px; color: var(--accent); }

.category-block { padding-block: 1.75rem; }
.category-head { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.1rem; }
.category-icon {
  width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  color: #fff; flex: none;
}
.category-icon svg { width: 22px; height: 22px; }
.category-head h2 { margin-bottom: 0; }
.category-head p { color: var(--text-muted); font-size: .9rem; margin: 0; }
.category-head .cat-link { margin-left: auto; font-weight: 700; font-size: .88rem; white-space: nowrap; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.tool-card-mini {
  display: flex; flex-direction: column; gap: .5rem; padding: 1.1rem; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--radius); transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out), border-color .18s var(--ease-out);
}
.tool-card-mini:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); text-decoration: none; }
.tool-card-mini .icon { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: #fff; }
.tool-card-mini .icon svg { width: 18px; height: 18px; }
.tool-card-mini h3 { font-size: .98rem; margin: 0; color: var(--text); }
.tool-card-mini p { font-size: .82rem; color: var(--text-muted); margin: 0; }

/* =============================================================
   10. Cómo funciona / SEO / FAQ / relacionadas
   ============================================================= */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.25rem; }
.step {
  display: flex; flex-direction: column; gap: .5rem; padding: 1.25rem; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.step .step-num {
  width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .95rem;
}
.step h3 { font-size: 1rem; }
.step p { color: var(--text-muted); font-size: .88rem; margin: 0; }

.use-cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.use-case { padding: 1rem 1.1rem; background: var(--bg-soft); border-radius: var(--radius-sm); font-size: .9rem; }
.use-case strong { display: block; margin-bottom: .25rem; color: var(--text); }
.use-case span { color: var(--text-muted); }

.faq-list { display: flex; flex-direction: column; gap: .6rem; }
.faq-item {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .2rem .2rem;
}
.faq-item summary {
  cursor: pointer; list-style: none; padding: .9rem 1rem; font-weight: 700; font-size: .95rem;
  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-faint); flex: none; transition: transform .2s var(--ease-out);
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-answer { padding: 0 1rem 1rem; color: var(--text-muted); font-size: .9rem; }

.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.related-card {
  padding: 1rem 1.1rem; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius);
  font-weight: 700; font-size: .92rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  transition: border-color .18s var(--ease-out), transform .18s var(--ease-out);
}
.related-card:hover { border-color: var(--primary); transform: translateY(-2px); text-decoration: none; }
.related-card svg { width: 16px; height: 16px; color: var(--text-faint); flex: none; }

/* =============================================================
   11. Tablas
   ============================================================= */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 480px; }
thead th {
  text-align: left; padding: .7rem .8rem; background: var(--bg-soft); color: var(--text-muted);
  font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; position: sticky; top: 0;
}
tbody td { padding: .6rem .8rem; border-top: 1px solid var(--border); }
tbody tr:hover { background: var(--bg-soft); }
@media print {
  .site-header, .site-footer, .ad-slot, .ad-toast, .related-grid, .faq-list, .breadcrumb, .steps-grid, .use-cases { display: none !important; }
}

/* =============================================================
   12. Footer
   ============================================================= */
.site-footer { border-top: 1px solid var(--border); padding-block: 2.5rem 3rem; margin-top: 3rem; color: var(--text-muted); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.5rem; margin-bottom: 1.5rem; }
.footer-col h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); margin-bottom: .7rem; }
.footer-col a { display: block; color: var(--text-muted); font-size: .9rem; padding-block: .25rem; }
.footer-col a:hover { color: var(--primary); text-decoration: none; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: .82rem; }
.footer-disclaimer { font-size: .78rem; color: var(--text-faint); max-width: 70ch; margin-top: 1rem; }

/* =============================================================
   13. Quiz
   ============================================================= */
.quiz-progress-bar { width: 100%; height: 8px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; margin-bottom: 1.25rem; }
.quiz-progress-bar > span { display: block; height: 100%; background: var(--primary); width: 0%; transition: width .3s var(--ease-out); }
.quiz-meta { display: flex; justify-content: space-between; font-size: .82rem; color: var(--text-faint); margin-bottom: .5rem; font-weight: 700; }
.quiz-question { font-size: 1.15rem; margin-bottom: 1.1rem; }
.quiz-options { display: flex; flex-direction: column; gap: .6rem; }
.quiz-option {
  text-align: left; padding: .9rem 1.1rem; border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm);
  font-weight: 600; transition: all .15s var(--ease-out); background: var(--bg-elevated);
}
.quiz-option:hover { border-color: var(--primary); background: var(--primary-soft); }
.quiz-option.is-correct { border-color: var(--accent); background: var(--accent-soft); }
.quiz-option.is-wrong { border-color: var(--danger); background: var(--danger-soft); }
.quiz-result { text-align: center; padding: 1rem 0; }
.quiz-result .big-score { font-size: 3rem; font-weight: 800; color: var(--primary); }
.quiz-result .score-label { color: var(--text-muted); font-weight: 600; margin-bottom: 1rem; }
.quiz-share { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.25rem; }

/* =============================================================
   14. Reduced motion — solo lo intrusivo
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* =============================================================
   15. Responsive — breakpoints fijos
   ============================================================= */
@media (max-width: 719px) {
  .main-nav { position: fixed; inset: 64px 0 0 0; background: var(--bg-elevated); flex-direction: column;
    align-items: flex-start; padding: 1.5rem; gap: 1.1rem; transform: translateX(100%); transition: transform .25s var(--ease-out);
    overflow-y: auto; }
  .main-nav.is-open { transform: translateX(0); }
  .nav-toggle { display: flex; }
  .category-head { flex-wrap: wrap; }
  .category-head .cat-link { margin-left: 0; }
}
@media (min-width: 540px) { .container { padding-inline: 1.5rem; } }
@media (min-width: 960px)  { .section { padding-block: 3rem; } }
