/* ============================================================
   CHD CONSTRUCCIONES - BLOG (pages/blog.php y templates/articulo.php)
   Se carga después de chd-base.css y usa sus tokens (--h-*).

   - Portada (.bl-*): encabezado con temas, artículo destacado,
     artículos agrupados por etapa y acceso al orientador.
   - Artículo (.ar-*): encabezado, índice fijo y compartir a la
     izquierda (escritorio), texto a ancho de lectura, «En resumen»,
     «Siguiente paso» y artículos relacionados.
   ============================================================ */

:root {
  --bl-warn-bg: #FBF3DB;
  --bl-warn-fg: #7A5200;
  --bl-plate:   #FFFFFF;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bl-warn-bg: #2A2410;
    --bl-warn-fg: #E8C77A;
    --bl-plate:   #F3F4F1;
  }
}
:root[data-theme="dark"] {
  --bl-warn-bg: #2A2410;
  --bl-warn-fg: #E8C77A;
  --bl-plate:   #F3F4F1;
}

.page-blog main,
.page-articulo main { padding-top: var(--h-header-h); }


/* ══════════════════════════════════════════
   PORTADA · ENCABEZADO
══════════════════════════════════════════ */
.bl-intro {
  padding-top: clamp(48px, 6vw, 88px);
  padding-bottom: clamp(40px, 5vw, 64px);
}
.bl-intro__eyebrow {
  font-size: 14px;
  font-weight: 500;
  color: var(--h-accent-text);
  margin-bottom: 16px;
}
.bl-intro__title {
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--h-heading);
  max-width: 15ch;
  text-wrap: balance;
}
.bl-intro__row {
  margin-top: clamp(20px, 2.4vw, 32px);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 48px;
}
.bl-intro__row .ch-lead { max-width: 54ch; }
.bl-intro__meta {
  font-size: 14px;
  color: var(--h-muted);
  font-variant-numeric: tabular-nums;
}
.bl-temas {
  margin-top: clamp(28px, 3.4vw, 40px);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bl-temas a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--h-line);
  border-radius: var(--h-r-control);
  background: var(--h-surface);
  color: var(--h-text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background-color 0.3s;
}
.bl-temas a span { color: var(--h-muted); font-variant-numeric: tabular-nums; font-weight: 400; }
.bl-temas a:hover { border-color: var(--h-line-strong); color: var(--h-heading); }
.bl-temas a:active { transform: scale(0.98); }

.bl-empty { padding-bottom: var(--h-space-b); color: var(--h-muted); }

/* ══════════════════════════════════════════
   PORTADA · DESTACADO
══════════════════════════════════════════ */
.bl-feat-wrap { padding-bottom: clamp(24px, 3vw, 40px); }
.bl-feat {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  border: 1px solid var(--h-line);
  border-radius: var(--h-r-media);
  background: var(--h-surface);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.25s, box-shadow 0.3s var(--h-ease-out), background-color 0.3s;
}
.bl-feat:hover {
  border-color: var(--h-line-strong);
  box-shadow: 0 18px 40px -24px rgba(var(--h-shadow), 0.22);
}
.bl-feat__media {
  position: relative;
  display: block;
  min-height: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.bl-feat__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--h-ease-out);
}
.bl-feat:hover .bl-feat__media img { transform: scale(1.03); }
.bl-feat__media--plano img { object-fit: contain; padding: 6%; }

.bl-feat__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(24px, 3.4vw, 48px);
}
.bl-feat__label {
  font-size: 14px;
  font-weight: 500;
  color: var(--h-accent-text);
}
.bl-feat__title {
  font-size: clamp(1.75rem, 2.8vw, 2.5rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--h-heading);
  text-wrap: balance;
}
.bl-feat__text { font-size: 16px; line-height: 1.6; color: var(--h-muted); max-width: 46ch; }
.bl-feat__foot {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: 14px;
  color: var(--h-muted);
}
.bl-feat__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  color: var(--h-heading);
}
.bl-feat__cta i { font-size: 13px; transition: transform 0.3s var(--h-ease-out); }
.bl-feat:hover .bl-feat__cta i { transform: translateX(3px); }

/* ══════════════════════════════════════════
   PORTADA · GRUPOS POR ETAPA
══════════════════════════════════════════ */
.bl-group {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px 40px;
  padding-top: clamp(48px, 6vw, 88px);
  scroll-margin-top: calc(var(--h-header-h) + 8px);
}
.bl-group__head { grid-column: 1 / 5; }
.bl-group__head h2 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--h-heading);
}
.bl-group__head p {
  margin-top: 12px;
  max-width: 34ch;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--h-muted);
}
.bl-list {
  grid-column: 5 / 13;
  list-style: none;
  border-top: 1px solid var(--h-line);
}
.bl-list > li { border-bottom: 1px solid var(--h-line); }
.bl-item {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 22px 0;
  color: inherit;
  text-decoration: none;
}
.bl-item__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: var(--h-tint);
}
.bl-item__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--h-ease-out);
}
.bl-item__media--plano img { object-fit: contain; padding: 6%; }
.bl-item:hover .bl-item__media img { transform: scale(1.04); }
.bl-item__body { display: grid; gap: 8px; min-width: 0; }
.bl-item__title {
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--h-heading);
  text-wrap: balance;
}
.bl-item:hover .bl-item__title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.bl-item__text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--h-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bl-item__meta { font-size: 13px; color: var(--h-muted); font-variant-numeric: tabular-nums; }
.bl-item__arrow {
  font-size: 14px;
  color: var(--h-muted);
  transition: transform 0.3s var(--h-ease-out), color 0.2s;
}
.bl-item:hover .bl-item__arrow { transform: translateX(4px); color: var(--h-heading); }

.bl-flag {
  justify-self: start;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bl-warn-bg);
  color: var(--bl-warn-fg);
  font-size: 12px;
  font-weight: 600;
}

/* ══════════════════════════════════════════
   PORTADA · ORIENTADOR
══════════════════════════════════════════ */
.bl-tool-wrap { padding-block: clamp(64px, 8vw, 112px) 0; }
.bl-tool {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
  padding: clamp(28px, 4vw, 48px);
  border-radius: var(--h-r-media);
  background: var(--h-tint);
  transition: background-color 0.3s;
}
.bl-tool > div { max-width: 60ch; }
.bl-tool__eyebrow { font-size: 14px; font-weight: 500; color: var(--h-accent-text); }
.bl-tool h2 {
  margin-top: 8px;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--h-heading);
}
.bl-tool p:last-child { margin-top: 12px; font-size: 16px; line-height: 1.6; color: var(--h-text); }

/* ══════════════════════════════════════════
   ARTÍCULO · ENCABEZADO
══════════════════════════════════════════ */
.ar-head {
  padding-top: clamp(40px, 5vw, 72px);
  padding-bottom: clamp(32px, 4vw, 56px);
}
.ar-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: var(--h-muted);
  margin-bottom: 20px;
}
.ar-crumbs a { color: var(--h-muted); text-decoration: none; transition: color 0.2s; }
.ar-crumbs a:hover { color: var(--h-heading); text-decoration: underline; text-underline-offset: 3px; }
.ar-draft {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 8px 12px;
  border-radius: var(--h-r-control);
  background: var(--bl-warn-bg);
  color: var(--bl-warn-fg);
  font-size: 14px;
  font-weight: 500;
}
.ar-title {
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.04em;
  color: var(--h-heading);
  max-width: 22ch;
  text-wrap: balance;
}
.ar-lead {
  margin-top: clamp(16px, 2vw, 24px);
  max-width: 60ch;
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.55;
  color: var(--h-text);
  text-wrap: pretty;
}
.ar-meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--h-line);
  font-size: 14px;
  color: var(--h-heading);
  font-variant-numeric: tabular-nums;
}
.ar-meta span { color: var(--h-muted); margin-right: 4px; }

/* ══════════════════════════════════════════
   ARTÍCULO · DISPOSICIÓN
══════════════════════════════════════════ */
.ar-layout {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 40px;
  align-items: start;
  padding-bottom: var(--h-space-b);
}
.ar-aside {
  grid-column: 1 / 4;
  position: sticky;
  top: calc(var(--h-header-h) + 32px);
  max-height: calc(100vh - var(--h-header-h) - 64px);
  overflow-y: auto;
  font-size: 14px;
}
.ar-main { grid-column: 4 / 12; min-width: 0; }

/* ── Índice ── */
.ar-toc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--h-line);
  font-size: 15px;
  font-weight: 600;
  color: var(--h-heading);
  list-style: none;
  cursor: pointer;
}
.ar-toc summary::-webkit-details-marker { display: none; }
.ar-toc summary i { font-size: 12px; color: var(--h-muted); transition: transform 0.25s var(--h-ease-out); }
.ar-toc[open] summary i { transform: rotate(180deg); }
.ar-toc ol {
  list-style: none;
  margin-top: 12px;
  display: grid;
  gap: 2px;
  border-left: 1px solid var(--h-line);
}
.ar-toc a {
  display: block;
  margin-left: -1px;
  padding: 6px 0 6px 14px;
  border-left: 2px solid transparent;
  color: var(--h-muted);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.2s, border-color 0.2s;
}
.ar-toc a:hover { color: var(--h-heading); }
.ar-toc a.is-active { color: var(--h-heading); border-left-color: var(--h-accent); font-weight: 500; }

/* ── Compartir ── */
.ar-share { margin-top: 32px; }
.ar-share__title {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--h-line);
  font-size: 15px;
  font-weight: 600;
  color: var(--h-heading);
}
.ar-share ul { list-style: none; margin-top: 8px; display: grid; gap: 2px; }
.ar-share a,
.ar-share button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--h-text);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
}
.ar-share i { width: 16px; text-align: center; color: var(--h-muted); }
.ar-share a:hover,
.ar-share button:hover { color: var(--h-heading); }
.ar-share button.is-done i { color: var(--h-accent-text); }

/* ══════════════════════════════════════════
   ARTÍCULO · PORTADA
══════════════════════════════════════════ */
.ar-hero { margin: 0 0 clamp(32px, 4vw, 48px); }
.ar-hero__grid { display: grid; gap: 12px; }
.ar-hero--doble .ar-hero__grid { grid-template-columns: 1fr 1fr; }
.ar-hero__media {
  border-radius: var(--h-r-media);
  overflow: hidden;
  background: var(--h-tint);
}
.ar-hero__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.ar-hero__media--plano {
  border: 1px solid var(--h-line);
  padding: clamp(16px, 3vw, 32px);
}
.ar-hero__media--plano img { aspect-ratio: auto; object-fit: contain; max-height: 440px; }
.ar-hero--doble .ar-hero__media img { aspect-ratio: 4 / 3; height: 100%; }
.ar-hero--doble .ar-hero__media--plano img { aspect-ratio: auto; }
.ar-hero--doble .ar-hero__media--plano { display: grid; place-items: center; }
.ar-hero figcaption { margin-top: 12px; font-size: 13.5px; line-height: 1.5; color: var(--h-muted); }

/* ══════════════════════════════════════════
   ARTÍCULO · EN RESUMEN
══════════════════════════════════════════ */
.ar-resumen {
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--h-line);
  border-radius: var(--h-r-media);
  background: var(--h-surface);
  transition: background-color 0.3s;
}
.ar-resumen h2 { font-size: 1.0625rem; font-weight: 600; color: var(--h-heading); }
.ar-resumen ul { list-style: none; margin-top: 14px; display: grid; gap: 12px; }
.ar-resumen li {
  position: relative;
  padding-left: 22px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--h-text);
}
.ar-resumen li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--h-accent);
}

/* ══════════════════════════════════════════
   ARTÍCULO · TEXTO
══════════════════════════════════════════ */
.ar-prose {
  margin-top: clamp(32px, 4vw, 48px);
  max-width: 70ch;
  font-size: 17px;
  line-height: 1.75;
  color: var(--h-text);
}
.ar-prose > :first-child { margin-top: 0; }
.ar-prose p,
.ar-prose ul,
.ar-prose ol { margin-top: 1.1em; }
.ar-prose h2 {
  margin-top: 2.2em;
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--h-heading);
  scroll-margin-top: calc(var(--h-header-h) + 24px);
  text-wrap: balance;
}
.ar-prose h3 {
  margin-top: 1.8em;
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--h-heading);
}
.ar-prose h2 + p,
.ar-prose h2 + ul,
.ar-prose h2 + ol,
.ar-prose h3 + p,
.ar-prose h3 + ul { margin-top: 0.6em; }
.ar-prose ul { padding-left: 1.2em; }
.ar-prose ul li::marker { color: var(--h-accent); }
.ar-prose li + li { margin-top: 0.45em; }
.ar-prose strong { font-weight: 600; color: var(--h-heading); }
.ar-prose a {
  color: var(--h-heading);
  text-decoration: underline;
  text-decoration-color: var(--h-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.ar-prose a:hover { text-decoration-color: var(--h-heading); }

/* Pasos numerados */
.ar-prose ol.ar-pasos {
  list-style: none;
  counter-reset: paso;
  padding: 0;
  border-top: 1px solid var(--h-line);
}
.ar-pasos > li {
  counter-increment: paso;
  position: relative;
  margin: 0;
  padding: 16px 0 16px 48px;
  border-bottom: 1px solid var(--h-line);
}
.ar-pasos > li::before {
  content: counter(paso);
  position: absolute;
  left: 0;
  top: 16px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--h-line-strong);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  color: var(--h-accent-text);
  font-variant-numeric: tabular-nums;
}

/* Tablas */
.ar-tabla {
  margin-top: 1.4em;
  border: 1px solid var(--h-line);
  border-radius: var(--h-r-media);
  overflow-x: auto;
  background: var(--h-surface);
  transition: background-color 0.3s;
}
.ar-tabla table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.ar-tabla table:has(th:nth-child(3)) { min-width: 40rem; }
.ar-tabla th,
.ar-tabla td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--h-line);
}
.ar-tabla thead th {
  background: var(--h-tint);
  font-size: 14px;
  font-weight: 600;
  color: var(--h-heading);
}
.ar-tabla tbody th { font-weight: 600; color: var(--h-heading); }
.ar-tabla tbody tr:last-child > * { border-bottom: 0; }

/* Dos columnas */
.ar-dos {
  margin-top: 1.4em;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.ar-dos > div {
  padding: 22px 24px;
  border: 1px solid var(--h-line);
  border-radius: var(--h-r-media);
  background: var(--h-surface);
  transition: background-color 0.3s;
}
.ar-prose .ar-dos h3 { margin-top: 0; }
.ar-dos ul { font-size: 16px; }

/* Galería */
.ar-galeria {
  margin-top: 2em;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.ar-galeria img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  filter: var(--h-photo-filter);
}

/* Nota destacada */
.ar-prose .ar-nota {
  margin-top: 1.4em;
  padding: 2px 0 2px 18px;
  border-left: 3px solid var(--h-accent);
  font-size: 16px;
  line-height: 1.65;
}

/* ══════════════════════════════════════════
   ARTÍCULO · CIERRE
══════════════════════════════════════════ */
.ar-aviso {
  display: flex;
  gap: 12px;
  max-width: 70ch;
  margin-top: 40px;
  padding: 16px 20px;
  border-radius: var(--h-r-media);
  background: var(--h-tint);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--h-text);
  transition: background-color 0.3s;
}
.ar-aviso i { margin-top: 3px; color: var(--h-accent-text); }

.ar-fuentes { margin-top: 40px; max-width: 70ch; }
.ar-fuentes h2 { font-size: 1.0625rem; font-weight: 600; color: var(--h-heading); }
.ar-fuentes ul { list-style: none; margin-top: 10px; border-top: 1px solid var(--h-line); }
.ar-fuentes li { border-bottom: 1px solid var(--h-line); }
.ar-fuentes a {
  display: block;
  padding: 10px 0;
  font-size: 15px;
  color: var(--h-text);
  text-decoration: none;
  transition: color 0.2s;
}
.ar-fuentes a:hover { color: var(--h-heading); text-decoration: underline; text-underline-offset: 3px; }
.ar-fuentes i { margin-left: 4px; font-size: 11px; color: var(--h-muted); }

.ar-next {
  margin-top: clamp(48px, 6vw, 72px);
  padding: clamp(28px, 4vw, 44px);
  border-radius: var(--h-r-media);
  background: var(--h-tint);
  transition: background-color 0.3s;
}
.ar-next__eyebrow { font-size: 14px; font-weight: 500; color: var(--h-accent-text); }
.ar-next h2 {
  margin-top: 8px;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--h-heading);
  text-wrap: balance;
}
.ar-next > p:not(.ar-next__eyebrow) { margin-top: 12px; max-width: 52ch; font-size: 16px; line-height: 1.6; }
.ar-next__actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

/* ══════════════════════════════════════════
   ARTÍCULO · SIGA LEYENDO
══════════════════════════════════════════ */
.ar-related {
  background: var(--h-tint);
  padding-block: clamp(64px, 8vw, 112px);
  transition: background-color 0.3s;
}
.ar-related__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.bl-cards {
  list-style: none;
  margin-top: clamp(28px, 3.4vw, 40px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 24px;
}
.bl-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}
.bl-card__media {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  margin-bottom: 6px;
  border-radius: var(--h-r-media);
  overflow: hidden;
  background: var(--h-surface);
}
.bl-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--h-ease-out);
}
.bl-card__media--plano img { object-fit: contain; padding: 6%; }
.bl-card:hover .bl-card__media img { transform: scale(1.04); }
.bl-card__tema { font-size: 13px; font-weight: 500; color: var(--h-accent-text); }
.bl-card__title {
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--h-heading);
  text-wrap: balance;
}
.bl-card:hover .bl-card__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.bl-card__meta { font-size: 13px; color: var(--h-muted); }

/* Diagramas sobre fondo blanco (después de los fondos de cada bloque) */
.bl-feat__media.bl-feat__media--plano,
.bl-item__media.bl-item__media--plano,
.bl-card__media.bl-card__media--plano,
.ar-hero__media.ar-hero__media--plano { background: var(--bl-plate); }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (min-width: 1001px) {
  /* En escritorio el índice siempre está abierto */
  .ar-toc summary { cursor: default; pointer-events: none; }
  .ar-toc summary i { display: none; }
}

@media (max-width: 1000px) {
  .bl-feat { grid-template-columns: 1fr; }
  .bl-feat__media { aspect-ratio: 16 / 10; min-height: 0; }

  .bl-group__head,
  .bl-list { grid-column: 1 / -1; }
  .bl-group__head p { max-width: 56ch; }

  .ar-layout { gap: 0; }
  .ar-aside,
  .ar-main { grid-column: 1 / -1; }
  .ar-aside {
    position: static;
    max-height: none;
    overflow: visible;
    margin-bottom: 32px;
    display: grid;
    gap: 16px;
  }
  .ar-toc {
    padding: 14px 18px;
    border: 1px solid var(--h-line);
    border-radius: var(--h-r-media);
    background: var(--h-surface);
  }
  .ar-toc summary { padding-bottom: 0; border-bottom: 0; }
  .ar-toc[open] summary { padding-bottom: 12px; border-bottom: 1px solid var(--h-line); }

  .ar-share { margin-top: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
  .ar-share__title { padding: 0; border: 0; font-size: 14px; }
  .ar-share ul { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }

  .ar-prose { max-width: none; }
  .bl-cards { grid-template-columns: 1fr 1fr; }
  .bl-cards > li:nth-child(3) { display: none; }
}

@media (max-width: 640px) {
  .bl-temas { gap: 6px; }
  .bl-temas a { padding: 8px 11px; font-size: 13.5px; gap: 8px; }
  .bl-item { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: start; padding: 18px 0; }
  .bl-item__arrow { display: none; }
  .bl-item__text { -webkit-line-clamp: 3; font-size: 14.5px; }

  .bl-tool .ch-btn { width: 100%; justify-content: center; }

  .ar-hero--doble .ar-hero__grid { grid-template-columns: 1fr; }
  .ar-prose { font-size: 16.5px; }
  .ar-dos { grid-template-columns: 1fr; }
  .ar-galeria { grid-template-columns: 1fr 1fr; }
  .ar-galeria img:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .ar-next .ch-btn { width: 100%; justify-content: center; }

  .bl-cards { grid-template-columns: 1fr; }
  .bl-cards > li:nth-child(3) { display: block; }
}

@media print {
  .ar-aside, .ar-next, .ar-related, .ch-cta { display: none !important; }
  .ar-layout { display: block; }
}
