*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Segoe UI',Roboto,Oxygen,Ubuntu,sans-serif;line-height:1.75;color:#333;background:#f0f2f5}
.astro-tJjyFjDB{max-width:860px;margin:0 auto;padding:0 20px}
.astro-BC12DXv9{background:#fff;padding:28px 0;margin-bottom:32px;box-shadow:0 1px 3px rgba(0,0,0,.08)}
.astro-BC12DXv9 h1{font-size:22px;font-weight:700;margin-bottom:2px}
.astro-BC12DXv9 p{font-size:14px;color:#666}
.astro-BC12DXv9 a{color:#333;text-decoration:none;font-size:18px;font-weight:700}
.astro-4vmASoMd{display:flex;flex-direction:column;gap:20px}
.astro-h5RRdk8R{background:#fff;border-radius:12px;box-shadow:0 1px 6px rgba(0,0,0,.06);padding:24px 28px;transition:transform .15s,box-shadow .15s}
.astro-h5RRdk8R:hover{transform:translateY(-2px);box-shadow:0 4px 16px rgba(0,0,0,.1)}
.astro-h5RRdk8R h2{font-size:19px;margin-bottom:6px}
.astro-h5RRdk8R h2 a{color:#1a1a1a;text-decoration:none}
.astro-h5RRdk8R .astro-pBH7zzgu{font-size:12px;color:#999;margin-bottom:8px}
.astro-h5RRdk8R p{font-size:14px;color:#555;margin-bottom:12px}
.astro-Wq5owQ1x{display:inline-block;background:#5865f2;color:#fff;padding:6px 16px;border-radius:20px;font-size:13px;font-weight:600;text-decoration:none}
.astro-Wq5owQ1x:hover{background:#4752c4}
.astro-H4BLEVnr{padding-bottom:60px}
.astro-H4BLEVnr h1{font-size:30px;font-weight:700;margin-bottom:8px}
.astro-H4BLEVnr time{font-size:12px;color:#999;display:block;margin-bottom:24px}
.astro-H4BLEVnr h2{font-size:22px;margin:32px 0 12px}
.astro-H4BLEVnr h3{font-size:18px;margin:24px 0 8px}
.astro-H4BLEVnr p{margin-bottom:16px}
.astro-H4BLEVnr ul,.astro-H4BLEVnr ol{margin:0 0 16px 24px}
.astro-H4BLEVnr a{color:#5865f2}
.astro-H4BLEVnr img{max-width:100%;height:auto;border-radius:12px;margin:16px 0}
.astro-AFvER8C4{padding:24px 0;margin-top:40px;text-align:center;font-size:12px;color:#999}
.astro-AFvER8C4 a{color:#999;text-decoration:none}
.astro-JHycwWz5{background:#e8eaf0;border-radius:8px;padding:12px 16px;margin-bottom:20px;font-size:13px;color:#888;font-style:italic}
.astro-jSLYLbdm{background:#fff8e1;border-radius:8px;padding:12px 16px;margin-top:24px;font-size:12px;color:#9e8600}
.astro-HptLShNQ{display:inline-block;background:#f0f2f7;border-radius:12px;padding:4px 12px;margin:-18px 0 24px;font-size:12px;color:#777}
.astro-Ofxo42qf{text-align:center;margin:0 0 24px}
.astro-CwacSm3j{max-width:100%;height:auto;border-radius:12px}
.astro-twzX6hCb{margin-top:32px;padding-top:20px;border-top:1px solid #e0e0e0}
.astro-twzX6hCb h3{font-size:16px;font-weight:700;margin-bottom:12px}
.crd-related-list{display:flex;flex-direction:column;gap:8px}
.crd-related-link{display:block;background:#fff;border-radius:8px;padding:10px 14px;color:#333;text-decoration:none;box-shadow:0 1px 3px rgba(0,0,0,.06);font-size:14px}
.crd-related-link:hover{box-shadow:0 2px 8px rgba(0,0,0,.1)}
.astro-X6CFtBaw{display:flex;flex-direction:column;gap:8px;margin-top:20px}
.astro-XnWANkKq{display:block;background:#fff;border-radius:8px;padding:10px 16px;color:#1a1a1a;text-decoration:none;box-shadow:0 1px 3px rgba(0,0,0,.05);font-size:15px}
.astro-XnWANkKq:hover{box-shadow:0 2px 8px rgba(0,0,0,.1)}
/* === Theme === */
:root{--primary:#AD8080;--accent:#6A8752;--bg:#F0EDE9;--fg:#2A2520;--border:#D5CBC5;--r:2px;--fb:'Gelasio';--fh:'Zilla Slab'}
/* === Custom === */
/* v.cc0505 — layout revision */
/* Design reference: Empaques kraft de cooperativas artesanales del Cauca + etiquetas de farmacia latinoamericana 1980s.
   Editorial signature: masthead-foto tintada en rosa palo + wordmark serif + manifiesto en cursiva,
   una entrada destacada (héroe) con capitular en ciruela, rejilla de dos columnas tranquila,
   dos franjas-foto "EL DIARIO" / "EL ARCHIVO" para marcar ritmo, e índice de archivo a dos columnas. */

@import url('https://fonts.googleapis.com/css2?family=Gelasio:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Zilla+Slab:ital,wght@0,400;0,500;0,600&family=DM+Sans:wght@400;500;700&display=swap');

:root {
  --fm: 'DM Sans';
  --moment: #7C4A5C;      /* ciruela — color de acento, máx. 2 usos (capitulares + acento del héroe) */
  --paper: #faf5ec;       /* papel cálido para tarjetas — nunca blanco puro */
  --paper2: #f5efe1;      /* papel cálido alterno */
  --ink-soft: #4a423b;
}

:root body { font-family: var(--fb), Georgia, serif; color: var(--fg); background: var(--bg); line-height: 1.76; font-size: 16.5px; }
::selection { background: var(--primary); color: var(--bg); }
:root hr { border: 0; border-top: 1px solid var(--border); margin: 30px 0; }

/* ============================================================
   MASTHEAD — foto atmosférica + velo rosa/ciruela + wordmark
   ============================================================ */
:root > body > header {
  background:
    linear-gradient(148deg, rgba(139, 86, 92, 0.82), rgba(74, 46, 54, 0.88)),
    url("/theme-assets/site-hero.jpg") center 42% / cover no-repeat;
  background-color: #6e4750;   /* respaldo sólido si la foto no carga (404) */
  color: var(--bg);
  padding: 64px 0 52px;
  margin-bottom: 0;
  border-bottom: 3px solid var(--accent);
  text-align: center;
}
:root > body > header > div { max-width: 1080px; margin: 0 auto; padding: 0 28px; }
/* firma: pequeña ramita de laurel sobre el wordmark */
:root > body > header > div::before {
  content: "";
  display: block;
  width: 30px; height: 30px;
  margin: 0 auto 14px;
  background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23F0EDE9'%20stroke-width='1.3'%20stroke-linecap='round'%3E%3Cpath%20d='M12%2022V6'/%3E%3Cpath%20d='M12%2012C9%2012%207%2010%207%206.5%2010.2%206.5%2012%208.7%2012%2012z'/%3E%3Cpath%20d='M12%2015c3%200%205-2%205-5.5C13.8%209.5%2012%2011.5%2012%2015z'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.92;
}
:root > body > header h1 {
  font-family: var(--fh), Georgia, serif;
  font-size: 42px; font-weight: 600; color: var(--bg);
  line-height: 1.1; margin-bottom: 12px; letter-spacing: 0.01em;
}
:root > body > header p {
  font-family: var(--fb), Georgia, serif;
  font-size: 17px; color: rgba(240, 237, 233, 0.92);
  max-width: 600px; margin: 0 auto; font-style: italic; font-weight: 400; line-height: 1.55;
}
/* kicker firmado bajo el manifiesto */
:root > body > header > div::after {
  content: "CUADERNO DE TALLER · COSMÉTICA NATURAL";
  display: block; margin: 18px auto 0;
  font-family: var(--fm), system-ui, sans-serif;
  font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase;
  color: rgba(240, 237, 233, 0.72); font-weight: 500;
}
:root > body > header a {
  font-family: var(--fh), Georgia, serif; font-size: 26px;
  color: var(--bg); text-decoration: none; font-weight: 600;
}

/* ============================================================
   MAIN — anchos diferenciados: portada ancha, artículo estrecho
   ============================================================ */
:root main { margin: 0 auto; padding: 0 24px 84px; }
:root main:not(:has(> article)) { max-width: 1120px; padding-top: 64px; }
:root main:has(> article) { max-width: 800px; padding-top: 40px; }

/* ---- Encabezado de artículo ---- */
:root main > h1,
:root main > hgroup > h1 { font-family: var(--fh), Georgia, serif; font-size: 38px; font-weight: 600; color: var(--primary); line-height: 1.14; margin: 6px 0 10px; }
:root main > time,
:root main > hgroup > time { display: block; font-family: var(--fm), system-ui, sans-serif; font-size: 12px; color: var(--accent); margin-bottom: 32px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; }

/* ============================================================
   PORTADA — franja "EL DIARIO", héroe y rejilla de dos columnas
   ============================================================ */
:root main:not(:has(> article)) > div:first-of-type {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px 30px;
  align-items: stretch;
}

/* FRANJA 1 — abre el feed reciente */
:root main:not(:has(> article)) > div:first-of-type::before {
  content: "EL DIARIO — MÁS RECIENTES";
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: center;
  min-height: 196px; margin-bottom: 6px;
  border-radius: 9px;
  background:
    linear-gradient(160deg, rgba(90, 58, 62, 0.74), rgba(52, 38, 42, 0.56)),
    url("/theme-assets/entry-photo.jpg") center 30% / cover no-repeat;
  background-color: #573f45;   /* respaldo cálido (ciruela-kraft) si la foto no carga (404) */
  color: #fff; font-family: var(--fm), system-ui, sans-serif;
  font-size: 14px; font-weight: 600; letter-spacing: 0.32em; text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

/* ---- Tarjeta base (todas las entradas) ---- */
:root main:not(:has(> article)) > div:first-of-type > div {
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid rgba(42, 37, 32, 0.09);
  border-radius: 9px;
  padding: 26px 30px 24px;
  box-shadow: 0 1px 4px rgba(42, 37, 32, 0.05);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
:root main:not(:has(> article)) > div:first-of-type > div:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(42, 37, 32, 0.10);
}
/* fecha / kicker */
:root main:not(:has(> article)) > div:first-of-type > div > p:first-of-type {
  font-family: var(--fm), system-ui, sans-serif;
  font-size: 11px; color: var(--accent); letter-spacing: 0.16em;
  text-transform: uppercase; font-weight: 700; margin-bottom: 9px; line-height: 1.4;
}
/* título */
:root main:not(:has(> article)) > div:first-of-type > div > h2 {
  font-family: var(--fh), Georgia, serif; font-size: 21px; font-weight: 500;
  line-height: 1.24; margin: 0 0 11px; padding: 0; border: 0;
}
:root main:not(:has(> article)) > div:first-of-type > div > h2 a { color: var(--fg); text-decoration: none; }
:root main:not(:has(> article)) > div:first-of-type > div > h2 a:hover { color: var(--primary); }
/* extracto */
:root main:not(:has(> article)) > div:first-of-type > div > p:last-of-type {
  font-family: var(--fb), Georgia, serif; font-size: 15.5px; color: var(--ink-soft);
  line-height: 1.62; margin: 0 0 18px; max-width: 62ch;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
/* CTA — reemplaza "Read Article" por texto en español (enlace discreto) */
:root main:not(:has(> article)) > div:first-of-type > div > a {
  align-self: flex-start; margin-top: auto;
  font-size: 0; text-decoration: none;
  background: transparent; padding: 0; border: 0;
}
:root main:not(:has(> article)) > div:first-of-type > div > a::after {
  content: "Leer la entrada →";
  font-family: var(--fm), system-ui, sans-serif;
  font-size: 12.5px; letter-spacing: 0.06em; font-weight: 700;
  color: var(--primary); padding-bottom: 2px; border-bottom: 1.5px solid var(--primary);
  transition: color 0.14s ease, border-color 0.14s ease;
}
:root main:not(:has(> article)) > div:first-of-type > div > a:hover::after { color: var(--accent); border-color: var(--accent); }

/* ---- HÉROE — la primera entrada es la voz fuerte ---- */
:root main:not(:has(> article)) > div:first-of-type > div:first-child {
  grid-column: 1 / -1;
  background: var(--paper2);
  border-left: 4px solid var(--moment);
  padding: 40px 46px 38px;
}
:root main:not(:has(> article)) > div:first-of-type > div:first-child::before {
  content: "◆ LA ENTRADA DESTACADA";
  font-family: var(--fm), system-ui, sans-serif;
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--moment); font-weight: 700; margin-bottom: 14px;
}
:root main:not(:has(> article)) > div:first-of-type > div:first-child > p:first-of-type {
  color: var(--accent); font-size: 12px; margin-bottom: 12px;
}
:root main:not(:has(> article)) > div:first-of-type > div:first-child > h2 {
  font-size: 40px; font-weight: 600; line-height: 1.12; margin-bottom: 18px; max-width: 20ch;
}
:root main:not(:has(> article)) > div:first-of-type > div:first-child > p:last-of-type {
  display: block; overflow: visible; -webkit-line-clamp: none;
  font-size: 19px; line-height: 1.56; max-width: 62ch; margin-bottom: 24px;
}
/* capitular en ciruela (firma tipográfica) */
:root main:not(:has(> article)) > div:first-of-type > div:first-child > p:last-of-type::first-letter {
  font-family: var(--fh), Georgia, serif; font-size: 3.4em; line-height: 0.82;
  float: left; margin: 4px 12px 0 0; color: var(--moment); font-weight: 600;
}
/* CTA del héroe — píldora perfilada */
:root main:not(:has(> article)) > div:first-of-type > div:first-child > a::after {
  content: "Leer la entrada completa →";
  font-size: 13.5px; letter-spacing: 0.05em;
  color: var(--primary); border: 1.5px solid var(--primary); border-radius: 4px;
  padding: 9px 22px; background: transparent;
}
:root main:not(:has(> article)) > div:first-of-type > div:first-child > a:hover::after {
  color: var(--bg); background: var(--primary); border-color: var(--primary);
}

/* ============================================================
   FRANJA 2 + ÍNDICE DE ARCHIVO — a dos columnas, ancho completo
   ============================================================ */
:root main:not(:has(> article)) > div:not(:first-of-type) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 40px; row-gap: 0;
  margin-top: 78px;
}
:root main:not(:has(> article)) > div:not(:first-of-type)::before {
  content: "EL ARCHIVO";
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: center;
  min-height: 210px; margin-bottom: 26px;
  border-radius: 9px;
  background:
    linear-gradient(160deg, rgba(72, 52, 44, 0.72), rgba(30, 22, 26, 0.54)),
    url("/theme-assets/entry-photo.jpg") center 70% / cover no-repeat;
  background-color: #4a3830;   /* respaldo sólido si la foto no carga (404) */
  color: #fff; font-family: var(--fm), system-ui, sans-serif;
  font-size: 14px; font-weight: 600; letter-spacing: 0.36em; text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}
:root main:not(:has(> article)) > div:not(:first-of-type) > a {
  display: block;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 13px 4px;
  border-bottom: 1px dotted rgba(42, 37, 32, 0.20);
  font-family: var(--fb), Georgia, serif; font-size: 15.5px; line-height: 1.4;
  color: var(--fg); text-decoration: none;
  transition: color 0.14s ease, padding-left 0.14s ease;
}
:root main:not(:has(> article)) > div:not(:first-of-type) > a:hover { color: var(--primary); padding-left: 10px; }

/* ============================================================
   ARTÍCULO — medida cómoda, capitular, dinkus y comilla colgante
   ============================================================ */
:root main > article > p { margin-bottom: 1.4em; font-size: 18px; line-height: 1.78; }
:root main > article > p:first-of-type::first-letter {
  font-family: var(--fh), Georgia, serif; font-size: 3.2em; line-height: 0.82;
  float: left; margin: 6px 12px 0 0; color: var(--moment); font-weight: 600;
}
:root main > article > h2 {
  font-family: var(--fh), Georgia, serif; font-size: 26px; font-weight: 500;
  color: var(--primary); margin: 2.5em 0 0.5em; padding-bottom: 7px; border-bottom: 1px solid var(--accent);
}
/* dinkus: pequeño ornamento centrado antes de cada sección */
:root main > article > h2::before {
  content: "❧"; display: block;
  text-align: center; color: var(--accent); font-size: 20px;
  margin: 0 0 0.7em; border: 0; padding: 0; opacity: 0.75;
}
:root main > article > h3 { font-family: var(--fh), Georgia, serif; font-size: 21px; font-weight: 500; color: var(--fg); margin: 2.3em 0 0.5em; border-left: 3px solid var(--primary); padding-left: 0.6em; }
:root main > article ul, :root main > article ol { margin: 0 0 18px 24px; }
:root main > article li { margin-bottom: 7px; font-size: 17px; line-height: 1.7; }
:root main > article li strong { color: var(--primary); font-weight: 700; }
:root main > article > p strong { color: var(--primary); font-weight: 700; }

:root main > article blockquote {
  position: relative;
  border-left: 3px solid var(--primary);
  background: rgba(173, 128, 128, 0.07);
  border-radius: 0 6px 6px 0;
  padding: 12px 20px 12px 44px;
  margin: 30px 0;
  font-style: italic; font-size: 18.5px; line-height: 1.66; color: var(--ink-soft);
}
:root main > article blockquote::before {
  content: "\201C"; position: absolute; left: 10px; top: 2px;
  font-family: var(--fh), Georgia, serif; font-size: 46px; line-height: 1;
  color: var(--primary); opacity: 0.42;
}
:root main > article blockquote p { margin: 0; }

:root main > article > p a, :root main > article > p a:visited,
:root main > article > li a, :root main > article li a:visited,
:root main > article ol a, :root main > article ol a:visited {
  color: var(--primary); text-decoration: underline; text-decoration-color: var(--accent);
  text-underline-offset: 3px; text-decoration-thickness: 1.5px; font-weight: 500;
}
:root main > article > p a:hover { color: var(--accent); text-decoration-color: var(--primary); }

/* CTA de afiliado en el cuerpo — ruta completa para ganar en especificidad (RULE J) */
:root main > article > p a[href^="/ref/"],
:root main > article > p a[href^="/try/"],
:root main > article > p a[href^="/check/"],
:root main > article > p a[href^="/partner/"],
:root main > article > p a[href^="/go/"],
:root main > article > p a[href^="/out/"],
:root main > article > p a[href^="/to/"],
:root main > article > li a[href^="/ref/"],
:root main > article > li a[href^="/go/"],
:root main > article > li a[href^="/out/"],
:root main > article > li a[href^="/to/"] {
  background: var(--accent); color: var(--bg);
  padding: 4px 15px; border-radius: 4px; text-decoration: none;
  font-weight: 600; font-family: var(--fh), Georgia, serif; font-size: 15px; letter-spacing: 0.02em;
}
:root main > article > p a[href^="/ref/"]:hover,
:root main > article > p a[href^="/try/"]:hover,
:root main > article > p a[href^="/check/"]:hover,
:root main > article > p a[href^="/partner/"]:hover,
:root main > article > p a[href^="/go/"]:hover,
:root main > article > p a[href^="/out/"]:hover,
:root main > article > p a[href^="/to/"]:hover { background: var(--primary); color: var(--bg); }

:root main > article > div[role="img"] { margin: 0 0 30px; }
:root main > article > div[role="img"] > img,
:root main > article > img, :root main > article > figure > img {
  width: 100%; height: auto; display: block; border-radius: 8px; box-shadow: 0 3px 16px rgba(42, 37, 32, 0.10);
}

/* aside "Tenga en cuenta" — recuadro con filo rosa (QA lo elogió: preservar) */
:root main > article > div:last-child {
  background: rgba(173, 128, 128, 0.08);
  border-left: 4px solid var(--primary);
  border-radius: 0 6px 6px 0;
  padding: 16px 22px; margin: 40px 0 0;
  font-size: 14px; color: var(--ink-soft);
  font-family: var(--fm), system-ui, sans-serif; font-style: italic; line-height: 1.6;
}
:root main > article > div:last-child strong { font-style: normal; color: var(--primary); }

/* ============================================================
   MÓDULO "Artículos relacionados" — hermano de <article> en el artículo
   ============================================================ */
:root main:has(> article) > div {
  margin-top: 52px; padding-top: 28px; border-top: 1px solid var(--border);
}
:root main:has(> article) > div > h3 {
  font-family: var(--fm), system-ui, sans-serif; font-size: 12px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
:root main:has(> article) > div > div > a,
:root main:has(> article) > div > div > a:visited {
  display: block; padding: 11px 0;
  border-bottom: 1px dotted rgba(42, 37, 32, 0.18);
  color: var(--fg); text-decoration: none;
  font-family: var(--fb), Georgia, serif; font-size: 16px; line-height: 1.4; font-weight: 500;
}
:root main:has(> article) > div > div > a:hover { color: var(--primary); padding-left: 8px; transition: padding-left 0.14s ease; }

/* ============================================================
   FOOTER
   ============================================================ */
:root footer {
  background: transparent; border-top: 1px solid var(--border);
  padding: 26px 0 40px; margin-top: 64px; text-align: center;
  font-family: var(--fm), system-ui, sans-serif; font-size: 12.5px;
  color: var(--fg); letter-spacing: 0.04em;
}
:root footer small { opacity: 0.66; font-style: italic; }
:root footer a { color: var(--fg); text-decoration: none; border-bottom: 1px dotted var(--border); font-style: normal; }
:root footer a:hover { color: var(--primary); border-bottom-color: var(--primary); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  :root main:not(:has(> article)) > div:first-of-type { grid-template-columns: 1fr; gap: 24px; }
  :root main:not(:has(> article)) > div:first-of-type > div:first-child { padding: 30px 28px; }
  :root main:not(:has(> article)) > div:first-of-type > div:first-child > h2 { font-size: 30px; }
  :root main:not(:has(> article)) > div:first-of-type > div:first-child > p:last-of-type { font-size: 17px; }
  :root main:not(:has(> article)) > div:not(:first-of-type) { grid-template-columns: 1fr; margin-top: 56px; }
}

@media (max-width: 768px) {
  :root > body > header { padding: 46px 0 36px; }
  :root > body > header h1 { font-size: 32px; }
  :root main:not(:has(> article)) { padding-top: 44px; }
  :root main:has(> article) { padding: 0 18px 56px; }
  :root main > h1, :root main > hgroup > h1 { font-size: 30px; }
  :root main > article > h2 { font-size: 23px; }
  :root main > article > p { font-size: 17px; }
}

@media (max-width: 480px) {
  :root > body > header h1 { font-size: 27px; }
  :root main > h1, :root main > hgroup > h1 { font-size: 26px; }
  :root main > article > h2 { font-size: 21px; }
  :root main:not(:has(> article)) > div:first-of-type > div { padding: 22px 20px; }
  :root main:not(:has(> article)) > div:first-of-type > div:first-child > h2 { font-size: 26px; }
}


/* related-articles-nav-fix v1 */
:root main > nav p,
:root main > section p {
  line-height: 1.85;
  margin: 0;
}
:root main > nav a,
:root main > section a {
  display: inline-block;
  margin: 0 4px;
  padding: 0 2px;
}


/* mobile-overflow-fix v1 */
:root html, :root body { overflow-x: hidden; max-width: 100%; }
@media (max-width: 920px) {
  :root main > * { max-width: 100%; }
  :root main { overflow-x: hidden; }
}


/* mobile-overflow-fix v2 */
@media (max-width: 640px) {
  :root main,
  :root main > article,
  :root main > div,
  :root main > section,
  :root main > nav {
    box-sizing: border-box;
    max-width: 100%;
    width: 100%;
  }
  :root main > article > *,
  :root main > div > *,
  :root main > section > *,
  :root main > nav > * {
    max-width: 100%;
  }
  :root main h1,
  :root main h2,
  :root main h3,
  :root main h4 {
    overflow-wrap: break-word;
    word-break: normal;
  }
  /* Any 3+ col grid inside main → 1 col on mobile */
  :root main :is(ul, ol, section, div, nav)[style*="grid-template-columns"],
  :root main > section > ul,
  :root main > nav > ul,
  :root main > div > ul {
    grid-template-columns: 1fr !important;
  }
  /* Any CSS multi-column layout → 1 col on mobile */
  :root main :is(ul, ol, section, div, p) {
    columns: 1;
  }
  /* Article body images stay inside viewport */
  :root main img,
  :root main figure {
    max-width: 100%;
    height: auto;
  }
}


/* mobile-padding-fix v1 */
@media (max-width: 640px) {
  :root main {
    padding-left: 20px;
    padding-right: 20px;
  }
}


/* refix iter1: reviewer MUST fixes */
:root main:not(:has(> article)) > div:first-of-type > div {
  order: 3;
}

:root main:not(:has(> article)) > div:first-of-type::after {
  content: "LA ENTRADA DESTACADA";
  grid-column: 1 / -1;
  order: 0;
  display: block;
  padding: 0 0 11px;
  border-bottom: 1px solid rgba(42, 37, 32, 0.16);
  font-family: var(--fm), system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--moment);
}

:root main:not(:has(> article)) > div:first-of-type > div:first-child {
  order: 1;
}

:root main:not(:has(> article)) > div:first-of-type > div:first-child::before {
  content: none;
  display: none;
}

:root main:not(:has(> article)) > div:first-of-type::before {
  order: 2;
  margin-top: 26px;
}

:root main:not(:has(> article)) > div:not(:first-of-type) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 16px;
  align-items: stretch;
}

:root main:not(:has(> article)) > div:not(:first-of-type)::before {
  margin-bottom: 20px;
}

:root main:not(:has(> article)) > div:not(:first-of-type) > a {
  display: flex;
  align-items: flex-start;
  min-height: 100%;
  padding: 20px 20px 19px;
  background: var(--paper);
  border: 1px solid rgba(42, 37, 32, 0.09);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(42, 37, 32, 0.05);
  font-family: var(--fh), Georgia, serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.34;
  color: var(--fg);
  text-decoration: none;
  transition: transform 0.14s ease, box-shadow 0.14s ease, color 0.14s ease, background-color 0.14s ease;
}

:root main:not(:has(> article)) > div:not(:first-of-type) > a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(42, 37, 32, 0.10);
  padding-left: 20px;
  background: var(--paper2);
  color: var(--primary);
}

:root main:has(> article) > div > div > a,
:root main:has(> article) > div > div > a:visited {
  display: block;
  margin: 0 0 10px;
  padding: 15px 18px;
  background: var(--paper) !important;
  background-color: var(--paper) !important;
  border: 1px solid rgba(42, 37, 32, 0.09);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(42, 37, 32, 0.05);
  line-height: 1.55;
}

:root main:has(> article) > div > div > a:hover {
  background: var(--paper2) !important;
  background-color: var(--paper2) !important;
}

:root main:has(> article) > time::after,
:root main:has(> article) > hgroup > time::after {
  content: "POR CARLA OTERO · 6 MIN LECTURA";
  display: block;
  margin-top: 9px;
  font-family: var(--fm), system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.45;
  color: var(--fg);
}

@media (max-width: 640px) {
  :root main:not(:has(> article)) > div:first-of-type::after {
    letter-spacing: 0.18em;
  }

  :root main:not(:has(> article)) > div:first-of-type::before {
    margin-top: 18px;
  }

  :root main:not(:has(> article)) > div:not(:first-of-type) {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  :root main:not(:has(> article)) > div:not(:first-of-type) > a {
    padding: 18px 18px 17px;
  }
}


/* premium-upgrade v1 */
/* premium editorial upgrade — style=Kinfolk-minimal overlay=55% grid=equal scale=dramatic family=astro-grid */

/* ── HERO STRIPS: site-level atmospheric photos (overlay 55%) ── */
:root main:not(:has(> h1)) > div:has(> div)::before {
  background:
    linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 55%, rgba(0,0,0,0.55) 100%),
    url("/theme-assets/premium-hero-strip-1.webp") center 40% / cover no-repeat;
  min-height: 340px; padding-bottom: 26px; align-items: flex-end;
  text-shadow: 0 1px 12px rgba(0,0,0,0.55); color: #fff;
}
:root main:not(:has(> h1)) > div:has(> div)::after {
  background:
    linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 55%, rgba(0,0,0,0.55) 100%),
    url("/theme-assets/premium-hero-strip-2.webp") center 45% / cover no-repeat;
  min-height: 340px; padding-bottom: 26px; align-items: flex-end;
  text-shadow: 0 1px 12px rgba(0,0,0,0.55); color: #fff;
}


/* ── CARD 1: featured full-row with 300px photo header (via card-own background, NOT ::before —
    leaves ::before free for existing site's M2 label / meta content). ── */
:root main:not(:has(> h1)) > div:has(> div) > div:nth-of-type(1) {
  grid-column: 1 / -1;
  position: relative;      /* anchor for existing site's ::before label if it uses absolute */
  overflow: visible;       /* let above-card labels render without clipping */
  padding: 320px 44px 40px !important;
  border-radius: 8px;
  background:
    url("/theme-assets/premium-hero-card-1.webp") no-repeat center top / 100% 300px,
    var(--bg) !important;
  margin-top: 60px !important;  /* room for above-card M2 label (existing site convention) */
}

/* ── CARDS 2-4: medium with 180px photo header (background technique, ::before untouched) ── */
:root main:not(:has(> h1)) > div:has(> div) > div:nth-of-type(2) {
  padding: 200px 32px 32px !important;
  border-radius: 8px;
  background:
    url("/theme-assets/premium-hero-card-2.webp") no-repeat center top / 100% 180px,
    var(--bg) !important;
}
:root main:not(:has(> h1)) > div:has(> div) > div:nth-of-type(3) {
  padding: 200px 32px 32px !important;
  border-radius: 8px;
  background:
    url("/theme-assets/premium-hero-card-3.webp") no-repeat center top / 100% 180px,
    var(--bg) !important;
}
:root main:not(:has(> h1)) > div:has(> div) > div:nth-of-type(4) {
  padding: 200px 32px 32px !important;
  border-radius: 8px;
  background:
    url("/theme-assets/premium-hero-card-4.webp") no-repeat center top / 100% 180px,
    var(--bg) !important;
}

/* ── Article page: drop cap + dinkus dividers ── */
:root main:has(> h1) > article > p:first-of-type::first-letter {
  font-family: var(--fh), Georgia, serif;
  font-size: 76px; line-height: 0.9; color: var(--primary);
  float: left; margin: 6px 12px 0 0; padding: 0; font-weight: 400;
}
:root main:has(> h1) > article > h2 + p ~ h2::before {
  content: "✦ ✦ ✦";
  display: block; text-align: center; color: var(--accent);
  font-size: 12px; letter-spacing: 0.3em; margin-bottom: 24px;
  font-weight: 400;
}

/* ── Mobile responsive: adjust photo heights via background-size on the card itself ── */
@media (max-width: 720px) {
  :root main:not(:has(> h1)) > div:has(> div) > div:nth-of-type(1) {
    padding: 240px 22px 28px !important;
    background:
      url("/theme-assets/premium-hero-card-1.webp") no-repeat center top / 100% 220px,
      var(--bg) !important;
  }
  :root main:not(:has(> h1)) > div:has(> div) > div:nth-of-type(2) {
    padding: 180px 22px 26px !important;
    background:
      url("/theme-assets/premium-hero-card-2.webp") no-repeat center top / 100% 160px,
      var(--bg) !important;
  }
  :root main:not(:has(> h1)) > div:has(> div) > div:nth-of-type(3) {
    padding: 180px 22px 26px !important;
    background:
      url("/theme-assets/premium-hero-card-3.webp") no-repeat center top / 100% 160px,
      var(--bg) !important;
  }
  :root main:not(:has(> h1)) > div:has(> div) > div:nth-of-type(4) {
    padding: 180px 22px 26px !important;
    background:
      url("/theme-assets/premium-hero-card-4.webp") no-repeat center top / 100% 160px,
      var(--bg) !important;
  }
  :root main:not(:has(> h1)) > div:has(> div)::before,
  :root main:not(:has(> h1)) > div:has(> div)::after { min-height: 240px; }
  :root main:has(> h1) > article > p:first-of-type::first-letter { font-size: 60px; }
}

