/* ==========================================================================
   Guía de Portátiles — hoja de estilos única
   Enfoque mobile-first, sin dependencias externas. Secciones:
   1. Tokens y reset        5. Comparador y radar
   2. Cabecera y navegación 6. Guía, FAQ y pie
   3. Portada               7. Glosario emergente
   4. Filtros y tarjetas    8. Páginas legales
   ========================================================================== */

/* 1. Tokens y reset ------------------------------------------------------- */
:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #eef2fa;
  --ink: #101828;
  --ink-soft: #475467;
  --muted: #667085;
  --line: #e1e6f0;
  --brand: #1d4ed8;
  --brand-dark: #163bb0;
  --brand-soft: #e8efff;
  --accent: #0f766e;
  --accent-soft: #e6f5f2;
  --danger: #b42318;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-md: 0 10px 28px -12px rgba(16, 24, 40, .22);
  --wrap: 1140px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

img, svg { max-width: 100%; }

h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 .5em;
  letter-spacing: -.015em;
  text-wrap: balance;
}

p { margin: 0 0 1em; }

a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }

:focus-visible {
  outline: 3px solid #7aa2ff;
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}

.wrap-narrow { max-width: 820px; }

.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: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 12px; color: #fff; }

/* 2. Cabecera ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  /* Fondo opaco: evita que el texto se transparente al hacer scroll en móvil */
  background: #fff;
  border-bottom: 1px solid var(--line);
}

/* Que los enlaces internos no oculten los títulos bajo la cabecera fija.
   app.js actualiza --header-h con la altura real de la cabecera. */
section[id],
#contenido {
  scroll-margin-top: calc(var(--header-h, 124px) + 12px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
  padding-block: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.brand strong { color: var(--brand); }
.brand-icon { width: 28px; height: 28px; color: var(--brand); }

.site-nav {
  order: 3;
  width: 100%;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  flex: 0 0 auto;
  padding: 8px 10px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: 8px;
}
.site-nav a:hover { background: var(--brand-soft); color: var(--brand-dark); }

.header-cta {
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  white-space: nowrap;
}
.header-cta:hover { background: var(--brand-dark); color: #fff; }

/* 3. Portada -------------------------------------------------------------- */
.hero {
  background:
    radial-gradient(900px 380px at 15% -10%, #dfe9ff 0%, transparent 70%),
    radial-gradient(700px 320px at 90% 0%, #e2f6f2 0%, transparent 65%),
    #fff;
  border-bottom: 1px solid var(--line);
  padding: clamp(32px, 6vw, 64px) 0 clamp(28px, 5vw, 52px);
}

.hero-inner { max-width: 820px; }

.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(1.85rem, 5.2vw, 3.15rem);
  margin-bottom: 16px;
}

.hero-lead {
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  color: var(--ink-soft);
  max-width: 62ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s, color .18s, border-color .18s, transform .18s;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }

.btn-ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: #b9c6e4; color: var(--brand-dark); background: #fff; }

.btn-text {
  background: transparent;
  color: var(--ink-soft);
  border-color: transparent;
  text-decoration: underline;
  padding: 10px 8px;
  border-radius: 8px;
}
.btn-text:hover { color: var(--ink); }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: .9rem;
}
.hero-facts strong { color: var(--ink); font-size: 1.05rem; }

/* 4. Secciones, filtros y tarjetas ---------------------------------------- */
.section { padding: clamp(36px, 6vw, 68px) 0; }
.section-alt { background: #fff; border-block: 1px solid var(--line); }

.section-head {
  max-width: 740px;
  margin-bottom: clamp(20px, 4vw, 32px);
}
.section-head h2 {
  font-size: clamp(1.45rem, 3.6vw, 2.1rem);
}
.section-head p { color: var(--ink-soft); margin-bottom: 0; }

.affiliate-note {
  background: var(--accent-soft);
  border: 1px solid #bfe3dc;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: .88rem;
  color: #0f3f3a;
}
.affiliate-note p { margin: 0; }
.affiliate-note .affiliate-note-small {
  margin-top: 6px;
  color: #33605b;
  font-size: .82rem;
}

.filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}

.field { display: flex; flex-direction: column; gap: 5px; }
.field label {
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font: inherit;
  font-size: .93rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #ccd5e6;
  border-radius: 10px;
  appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
.field input:focus, .field select:focus { border-color: var(--brand); }

.results-count {
  font-size: .88rem;
  color: var(--muted);
  margin: 0 0 18px;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.loading,
.empty-state {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .2s, border-color .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-md); border-color: #c9d5ec; }
.card.is-compared { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft), var(--shadow-md); }

.card-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 132px;
  padding: 18px;
  background: linear-gradient(135deg, #eef3ff 0%, #e7f6f3 100%);
  border-bottom: 1px solid var(--line);
}
.card-media svg { width: min(190px, 70%); height: auto; color: #2f4a7a; }
.card-media [hidden] { display: none; }
.card-media img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 112px;
  object-fit: contain;  mix-blend-mode: multiply;
}



.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.card-badge.is-nuevo { background: var(--brand-soft); border-color: #c5d6ff; color: var(--brand-dark); }
.card-badge.is-reacondicionado { background: #fff4e5; border-color: #f5d7ae; color: #8a4b00; }
.card-badge.is-usado { background: #f3f4f6; border-color: #dfe3ea; color: #475467; }

.compare-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
  box-shadow: var(--shadow-sm);
}
.compare-toggle:hover { border-color: #b9c6e4; }
.compare-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--brand);
  cursor: pointer;
}
.compare-toggle:has(input:checked) {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px 16px 18px;
}

.card-brand {
  margin: 0 0 2px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
}

.card-title {
  font-size: 1.05rem;
  margin: 0 0 12px;
}

.specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  margin: 0 0 16px;
  padding: 0;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.specs > div { min-width: 0; }
.specs dt {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 2px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--muted);
}
.specs dd {
  margin: 0;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid #c3cede;
  border-radius: 50%;
  background: #fff;
  color: var(--brand);
  font: inherit;
  font-size: .7rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.help-btn:hover,
.help-btn[aria-expanded="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.card-foot .cta {
  flex: 1 1 auto;
  justify-content: center;
}

.price-block { min-width: 0; }
.price {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.price-note {
  display: block;
  margin-top: 3px;
  font-size: .68rem;
  color: var(--muted);
  line-height: 1.3;
}

.cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 16px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: .86rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.cta:hover { background: var(--brand-dark); color: #fff; }
.cta svg { width: 13px; height: 13px; }

.affiliate-mini {
  margin: 12px 0 0;
  font-size: .68rem;
  line-height: 1.45;
  color: var(--muted);
}

/* 5. Comparador y radar --------------------------------------------------- */
.compare-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}
/* Evita que el texto largo del desplegable ensanche la columna del grid */
.compare-layout > * { min-width: 0; }

.chart-panel,
.glossary-panel,
.table-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
}

.compare-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 6px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.compare-picker label {
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--muted);
}
.compare-picker-row {
  display: flex;
  align-items: stretch;
  min-width: 0;
  gap: 8px;
}
.compare-picker select {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  padding: 10px 34px 10px 12px;
  font: inherit;
  font-size: .93rem;
  color: var(--ink);
  background-color: #fff;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  border: 1px solid #ccd5e6;
  border-radius: 10px;
  appearance: none;
}
.compare-picker select:focus { border-color: var(--brand); }
.compare-picker select:disabled { background-color: var(--surface-2); color: var(--muted); }
.compare-picker .btn { flex: 0 0 auto; padding: 10px 16px; }
.compare-picker .btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.compare-picker-hint { margin: 0; font-size: .76rem; color: var(--muted); }

@media (max-width: 399px) {
  .compare-picker-row { flex-direction: column; }
  .compare-picker .btn { width: 100%; }
}

.chart-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.chart-toolbar h3 { margin: 0; font-size: 1.05rem; }
.chart-hint { margin: 0; font-size: .8rem; color: var(--muted); }

.chart-wrap {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}
#radar { display: block; width: 100%; height: auto; overflow: visible; }

.chart-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: max-content;
  max-width: 80%;
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
  font-size: .82rem;
  color: var(--muted);
  text-align: center;
}

.radar-grid { fill: none; stroke: #dbe3f1; stroke-width: 1; }
.radar-grid-outer { stroke: #c2cee2; }
.radar-axis { stroke: #dbe3f1; stroke-width: 1; }
.radar-axis-label {
  font-size: 11.5px;
  font-weight: 700;
  fill: #344054;
}
.radar-axis-value {
  font-size: 9.5px;
  fill: #8a93a4;
}
.radar-shape {
  fill-opacity: .13;
  stroke-width: 2.2;
  stroke-linejoin: round;
  transition: fill-opacity .2s;
}
.radar-shape.is-active { fill-opacity: .24; }
.radar-dot { stroke: #fff; stroke-width: 1.4; }

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 14px 0 4px;
  padding: 0;
  list-style: none;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px 5px 10px;
  background: var(--surface-2);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink);
}
.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.legend-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(16, 24, 40, .08);
  color: var(--ink-soft);
  font: inherit;
  font-size: .8rem;
  line-height: 1;
  cursor: pointer;
}
.legend-remove:hover { background: var(--danger); color: #fff; }

.chart-note { margin: 8px 0 0; font-size: .72rem; color: var(--muted); }

.glossary-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.glossary-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-size: .85rem;
}
.glossary-list strong { display: block; font-size: .88rem; }
.glossary-list span { display: block; color: var(--ink-soft); font-size: .8rem; line-height: 1.45; }

.table-panel { margin-top: 20px; }
.table-panel h3 { font-size: 1.05rem; }
.table-hint { display: none; margin: -4px 0 10px; font-size: .78rem; color: var(--muted); }

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
  min-width: 520px;
}
.compare-table th,
.compare-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.compare-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--ink-soft);
}
.compare-table thead th:not(:first-child) { min-width: 140px; white-space: normal; }
.compare-table tbody th {
  position: sticky;
  left: 0;
  background: var(--surface);
  font-weight: 600;
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.compare-table td { font-weight: 600; }
.compare-table .th-inner { display: flex; align-items: center; gap: 7px; }
.compare-table .th-swatch { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }

/* 6. Guía, FAQ y pie ------------------------------------------------------ */
.guide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
.guide-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.guide-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  margin-bottom: 8px;
}
.guide-card p { margin: 0; font-size: .9rem; color: var(--ink-soft); }

.inline-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid #c3cede;
  border-radius: 50%;
  font-size: .7rem;
  font-weight: 800;
  color: var(--brand);
  vertical-align: 1px;
}

.prose {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.prose h3 { font-size: 1.05rem; margin-top: 0; }
.prose h3:not(:first-child) { margin-top: 20px; }
.prose p { color: var(--ink-soft); font-size: .93rem; }
.prose p:last-child { margin-bottom: 0; }

details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 16px;
  margin-bottom: 10px;
}
details[open] { border-color: #c9d5ec; box-shadow: var(--shadow-sm); }
summary {
  cursor: pointer;
  padding: 15px 0;
  font-weight: 700;
  font-size: .95rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
}
details[open] summary::after { content: "−"; }
details p { color: var(--ink-soft); font-size: .9rem; padding-bottom: 14px; margin: 0; }

.site-footer {
  background: #0e1626;
  color: #c8d2e4;
  padding: clamp(30px, 5vw, 48px) 0 24px;
  font-size: .88rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.footer-brand {
  margin: 0 0 6px;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
}
.footer-text { max-width: 42ch; color: #9fb0c9; margin: 0; }

.footer-heading {
  font-size: .74rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8fa3c0;
  margin: 0 0 8px;
}
.footer-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
.footer-nav a { color: #d8e2f2; text-decoration: none; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }

.footer-legal {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid #253247;
  font-size: .78rem;
  color: #9fb0c9;
}
.footer-legal p { margin: 0 0 6px; }
.affiliate-disclosure { color: #e6edf8; }
.copyright { color: #7f92ad; }

.noscript {
  position: fixed;
  inset: auto 0 0 0;
  margin: 0;
  padding: 12px;
  background: #fff4e5;
  color: #7a3e00;
  text-align: center;
  border-top: 1px solid #f5d7ae;
}

/* 7. Glosario emergente --------------------------------------------------- */
.popover {
  position: fixed;
  z-index: 80;
  width: min(320px, calc(100vw - 32px));
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 18px 40px -12px rgba(16, 24, 40, .35);
}
.popover h2 {
  margin: 0 26px 6px 0;
  font-size: .98rem;
}
.popover p { margin: 0 0 8px; font-size: .85rem; color: var(--ink-soft); line-height: 1.5; }
.popover .popover-foot {
  margin: 8px 0 0;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}
.popover-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.popover-close:hover { background: var(--surface-2); color: var(--ink); }

/* 8. Páginas legales ------------------------------------------------------ */
.legal-page { background: var(--surface); }
.legal-page .wrap { max-width: 800px; padding-block: clamp(28px, 5vw, 52px); }
.legal-page h1 { font-size: clamp(1.6rem, 4.5vw, 2.3rem); }
.legal-page h2 { font-size: 1.15rem; margin-top: 28px; }
.legal-page p, .legal-page li { color: var(--ink-soft); font-size: .94rem; }
.legal-page ul { padding-left: 20px; }
.legal-page .back-link {
  display: inline-block;
  margin-bottom: 18px;
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
}
.legal-meta { font-size: .8rem; color: var(--muted); }

/* 9. Adaptación a pantallas mayores y preferencias ------------------------ */
@media (min-width: 560px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .field-search { grid-column: 1 / -1; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

@media (min-width: 760px) {
  .site-header { background: #fff; }
  .header-inner { flex-wrap: nowrap; min-height: 68px; }
  .site-nav {
    order: 0;
    width: auto;
    border-top: 0;
    padding-top: 0;
    margin-left: auto;
    gap: 2px;
  }
  .site-nav a { padding: 8px 12px; font-size: .92rem; }
  .site-nav a:hover { background: var(--brand-soft); }
  .header-cta { margin-left: 6px; }
  .filters { grid-template-columns: 1.5fr .9fr .9fr .9fr auto; align-items: end; }
  .field-search { grid-column: auto; }
  .card-media { min-height: 150px; }
}

@media (min-width: 1000px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .compare-layout { grid-template-columns: minmax(0, 1.75fr) minmax(260px, 1fr); }
  .chart-panel { padding: 22px 24px; }
  .glossary-panel { padding: 22px; }
  .guide-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 400px) {
  .header-inner { gap: 10px; padding-block: 8px; min-height: 56px; }
  .brand { font-size: .92rem; gap: 7px; }
  .brand-icon { width: 24px; height: 24px; }
  .header-cta { padding: 8px 12px; font-size: .8rem; }
  .site-nav a { padding: 6px 8px; font-size: .84rem; }
}

@media (max-width: 559px) {
  .table-hint { display: block; }
  .compare-table { font-size: .78rem; min-width: 480px; }
  .compare-table th, .compare-table td { padding: 8px 10px; }
  .compare-table tbody th { font-size: .7rem; }
  .table-panel { padding: 14px; }
  .popover {
    left: 16px !important;
    right: 16px !important;
    bottom: 16px !important;
    top: auto !important;
    width: auto;
  }
  .card-foot { flex-wrap: wrap; }
  .cta { width: 100%; justify-content: center; }
  .price-block { width: 100%; }
}

/* Pantallas muy estrechas (320 px): una sola columna de especificaciones */
@media (max-width: 359px) {
  .specs { grid-template-columns: 1fr; }
  .card-body { padding: 14px 14px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
