*{margin:0;padding:0;box-sizing:border-box}
body{font-family:-apple-system,system-ui,sans-serif;line-height:1.7;color:#333;background:#fff}
.Footer_title__C6Uzs{max-width:780px;margin:0 auto;padding:0 20px}
header{background:#1a1a2e;color:#fff;padding:32px 0;margin-bottom:40px}
header h1{font-size:28px;margin-bottom:4px}
header p{opacity:.7;font-size:15px}
header .Hero_root__PVjkt{color:#fff;text-decoration:none;font-size:18px;font-weight:600}
.Main_section__dmirL{border-bottom:1px solid #eee;padding:24px 0}
.Main_section__dmirL h2{font-size:20px;margin-bottom:8px}
.Main_section__dmirL h2 a{color:#1a1a2e;text-decoration:none}
.Main_section__dmirL h2 a:hover{color:#e94560}
.Main_section__dmirL .date{font-size:13px;color:#999;margin-bottom:8px}
.Layout_area__fopxq{color:#e94560;text-decoration:none;font-size:14px;font-weight:600}
.Container_item__sRQ3I{padding-bottom:60px}
.Container_item__sRQ3I h1{font-size:32px;margin-bottom:8px}
.Container_item__sRQ3I time{font-size:13px;color:#999;display:block;margin-bottom:24px}
.Container_item__sRQ3I h2{font-size:22px;margin:32px 0 12px}
.Container_item__sRQ3I h3{font-size:18px;margin:24px 0 8px}
.Container_item__sRQ3I p{margin-bottom:16px}
.Container_item__sRQ3I ul,.Container_item__sRQ3I ol{margin:0 0 16px 24px}
.Container_item__sRQ3I a{color:#e94560}
.Container_item__sRQ3I img{max-width:100%;height:auto;border-radius:8px;margin:16px 0}
footer{border-top:1px solid #eee;padding:24px 0;margin-top:40px;text-align:center;font-size:13px;color:#999}
footer a{color:#999}
.Article_head__HC8SC{background:#f5f5f5;border-left:3px solid #999;padding:10px 14px;margin-bottom:20px;font-size:13px;color:#777;font-style:italic}
.Hero_foot__MyGum{background:#fef9e7;border:1px solid #f0c36d;padding:10px 14px;margin-top:20px;font-size:12px;color:#8a6d3b}
.Page_content__gQiYz{font-size:13px;color:#999;margin:-16px 0 24px;font-style:italic}
.Nav_wrap__G4tp1{text-align:center;margin:0 0 20px}
.Page_row__YLfda{max-width:100%;height:auto;border-radius:6px}
.Grid_head__PdTZX{margin-top:40px;padding-top:24px;border-top:1px solid #eee}
.Grid_head__PdTZX h3{font-size:18px;margin-bottom:12px}
.Grid_head__PdTZX ul{list-style:none;padding:0}
.Grid_head__PdTZX li{padding:4px 0}
.Grid_head__PdTZX a{color:#e94560;text-decoration:none}
.Header_inner__1T3t9{padding:20px 0}
.Header_inner__1T3t9 ul{list-style:none;padding:0}
.Header_inner__1T3t9 li{padding:5px 0;font-size:15px}
.Header_inner__1T3t9 a{color:#1a1a2e;text-decoration:none}
.Header_inner__1T3t9 a:hover{color:#e94560}
/* === Theme === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Fira+Sans:wght@400;700&display=swap');
body{font-family:'Inter',sans-serif;color:#2D332F;background:#F8F9F3}
header{background:#1B3022;color:#fff}
header h1{font-family:'Fira Sans',serif;color:#fff}
header p{color:rgba(255,255,255,.75)}
header a{color:#fff;text-decoration:none}
.Main_section__dmirL h2{font-family:'Fira Sans',serif}
.Main_section__dmirL h2 a{color:#1B3022}
.Main_section__dmirL h2 a:hover{color:#F26419}
.Layout_area__fopxq{color:#F26419}
.Container_item__sRQ3I h1{font-family:'Fira Sans',serif}
.Container_item__sRQ3I h2{font-family:'Fira Sans',serif}
.Container_item__sRQ3I a{color:#F26419}
.Container_item__sRQ3I img{border-radius:4px}
.affiliate-disclosure{border-radius:4px}
.ymyl-disclaimer{border-radius:4px}
/* === Custom === */
/* sr-r-es — teledeteccion y R desde cero, diario de aprendizaje en primera persona — classic template */
/* Paleta: verde bosque lluvioso #24433C / dorado-liquen #9C9A3E sobre papel-niebla #F3F0E4 */
/* Voz: Javiera, Valdivia, dispersa y calida -- cuaderno de campo, no boletin cientifico */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Karla:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* ── Tokens ── */
:root {
  --color-bg:            #F3F0E4;
  --color-surface:       #E7E2CE;
  --color-text:          #2A2F27;
  --color-text-muted:    #6B7061;

  --color-primary:       #24433C;
  --color-primary-dark:  #162E28;
  --color-accent:        #9C9A3E;
  --color-accent-dark:   #6E6C29;

  --color-border:        #D9D3B9;
  --color-heading:       #1E3830;
  --color-link:          #6E6C29;
  --color-link-hover:    #9C9A3E;

  --font-heading: 'Fraunces', Georgia, serif;
  --font-body:    'Karla', system-ui, sans-serif;
  --font-mono:    'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

  --font-size-base: 17px;
  --font-size-sm:   15px;
  --font-size-h1:   2.3rem;
  --font-size-h2:   1.6rem;
  --font-size-h3:   1.3rem;

  --line-height-body:    1.7;
  --line-height-heading: 1.2;

  --para-max:      68ch;
  --space-section: 3rem;
  --radius:        10px;
}

/* ── Base ── */
:root *, :root *::before, :root *::after { box-sizing: border-box; }

:root body {
  font-family:      var(--font-body);
  font-size:        var(--font-size-base);
  font-weight:      400;
  line-height:      var(--line-height-body);
  color:            var(--color-text);
  background-color: var(--color-bg);
  margin: 0; padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* ── Enlaces ── */
:root a {
  color: var(--color-link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
:root a:hover, :root a:focus {
  color: var(--color-link-hover);
  border-color: var(--color-link-hover);
  outline: none;
}

/* ── Titulares ── */
:root h1, :root h2, :root h3,
:root h4, :root h5, :root h6 {
  font-family:   var(--font-heading);
  font-weight:   500;
  line-height:   var(--line-height-heading);
  color:         var(--color-heading);
  margin-top:    1.8em;
  margin-bottom: 0.5em;
}
:root h1 { font-size: var(--font-size-h1); font-weight: 600; }
:root h2 { font-size: var(--font-size-h2); }
:root h3 {
  font-size:     var(--font-size-h3);
  color:         var(--color-accent-dark);
  font-style:    italic;
  margin-top:    2.2em;
  margin-bottom: 0.4em;
}
:root h4 { font-size: 1.1rem; font-style: italic; }

/* ── Cuerpo de texto ── */
:root p  { max-width: var(--para-max); margin-top: 0; margin-bottom: 1.4em; }
:root ul, :root ol { max-width: var(--para-max); padding-left: 1.5em; margin-bottom: 1.4em; }
:root li { margin-bottom: 0.45em; }
:root ul li::marker { color: var(--color-accent-dark); font-weight: 700; }
:root ol li::marker { color: var(--color-primary); font-family: var(--font-heading); }

:root strong { font-weight: 700; color: var(--color-heading); }
:root em { font-style: italic; }

/* ── Blockquote — el momento en que por fin algo cuadro ── */
:root blockquote {
  max-width:     var(--para-max);
  margin:        2rem 0;
  padding:       1.1rem 1.5rem;
  border-left:   3px solid var(--color-accent);
  background:    var(--color-surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family:   var(--font-heading);
  font-weight:   400;
  font-size:     1.1rem;
  font-style:    italic;
  color:         var(--color-text);
  line-height:   1.55;
}
:root blockquote p { max-width: none; margin: 0; }
:root blockquote cite {
  display: block; margin-top: 0.75rem;
  font-family: var(--font-body); font-style: normal;
  font-size: var(--font-size-sm); font-weight: 600;
  color: var(--color-text-muted);
}

/* ── HR ── */
:root hr { border: none; border-top: 1px solid var(--color-border); margin: 2rem 0; }

/* ── Cabecera del sitio ── */
:root header {
  background-color: var(--color-primary);
  padding:          1.6rem 2rem 1.3rem;
  border-bottom:    3px solid var(--color-accent);
}
:root .site-title, :root .site-title a {
  font-family: var(--font-heading); font-size: 1.9rem;
  font-weight: 600; color: #F3F0E4; border-bottom: none;
}
:root .site-title a:hover { color: var(--color-accent); border-bottom: none; }
:root .site-description {
  font-family: var(--font-body); font-size: var(--font-size-sm);
  font-weight: 400; font-style: italic; color: rgba(243,240,228,.72);
  letter-spacing: 0.01em;
  margin-top: 0.4rem; margin-bottom: 0;
}
:root header a { color: #F3F0E4; }

/* ── Navegacion ── */
:root .main-navigation { background-color: var(--color-primary); padding: 0 2rem 1rem; }
:root .main-navigation a {
  font-family: var(--font-body); font-size: var(--font-size-sm);
  font-weight: 600; letter-spacing: 0.01em;
  color: rgba(243,240,228,.82); padding: 0.2rem 0;
  border-bottom: none; margin-right: 1.5rem;
}
:root .main-navigation a:hover,
:root .main-navigation .current-menu-item > a { color: var(--color-accent); border-bottom: none; }

/* ── Estructura de pagina ── */
:root .site-content { max-width: 840px; margin: 2.5rem auto; padding: 0 1.5rem; }
:root #primary { max-width: 100%; }

/* ── Articulo ── */
:root .entry-header { padding-bottom: 1.1rem; border-bottom: 1px solid var(--color-border); margin-bottom: 1.8rem; }
:root .entry-title {
  font-family: var(--font-heading); font-size: var(--font-size-h1);
  font-weight: 600; line-height: 1.15;
  color: var(--color-heading); margin-top: 0; margin-bottom: 0.6rem;
}
:root .entry-title a { color: var(--color-heading); border-bottom: none; }
:root .entry-title a:hover { color: var(--color-accent-dark); border-bottom: none; }
:root .entry-meta {
  font-family: var(--font-body); font-size: var(--font-size-sm);
  font-weight: 400; font-style: italic; color: var(--color-text-muted); letter-spacing: 0.01em;
}
:root .entry-meta a { color: var(--color-text-muted); border-bottom: 1px dotted var(--color-border); }
:root .entry-content { font-size: var(--font-size-base); line-height: var(--line-height-body); }

/* Filete de liquen bajo los h2 del contenido — un respiro entre anecdotas, no un separador duro */
:root article > * + h2::after {
  content: ''; display: block; width: 2.75rem; height: 2px;
  background: var(--color-accent); margin-top: 0.5rem; border-radius: 2px;
}

/* ── Imagenes (mapas, capturas de RStudio, rasters) ── */
:root .entry-content img { max-width: 100%; height: auto; border-radius: var(--radius); display: block; margin: 1.6rem 0; border: 1px solid var(--color-border); }
:root .entry-content figcaption {
  font-size: 13px; font-weight: 400; font-style: italic;
  color: var(--color-text-muted); margin-top: 0.5rem; text-align: center;
}

/* ── Codigo — capturas de consola R, mensajes de error, snippets ── */
:root code {
  font-family: var(--font-mono); font-size: 0.88em;
  background: var(--color-surface); color: var(--color-primary-dark);
  padding: 0.15em 0.4em; border-radius: 4px;
}
:root pre {
  font-family: var(--font-mono); font-size: 0.85em; line-height: 1.55;
  background: var(--color-primary-dark); color: #E7E2CE;
  border-radius: var(--radius); padding: 1.1rem 1.3rem;
  overflow-x: auto; margin: 1.6rem 0;
  border-left: 3px solid var(--color-accent);
}
:root pre code { background: none; color: inherit; padding: 0; font-size: 1em; }

/* ── Widgets ── */
:root .widget { margin-bottom: 2rem; padding: 1.2rem; background: var(--color-surface); border-radius: var(--radius); border: 1px solid var(--color-border); }
:root .widget-title {
  font-family: var(--font-heading); font-size: 0.95rem; font-weight: 500;
  letter-spacing: 0.02em; color: var(--color-primary);
  border-bottom: 2px solid var(--color-accent); padding-bottom: 0.4rem;
  margin-top: 0; margin-bottom: 0.9rem;
}
:root .widget ul { list-style: none; padding-left: 0; margin: 0; }
:root .widget li { padding: 0.35rem 0; border-bottom: 1px solid var(--color-border); font-size: var(--font-size-sm); }
:root .widget li:last-child { border-bottom: none; }

/* ── Tarjetas de listado (home / archivo) ── */
:root .Main_section__dmirL, :root article.post {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  margin-bottom: 1.3rem;
}
:root .Main_section__dmirL h2, :root article.post h2 { margin-top: 0; }
:root .Main_section__dmirL time, :root .entry-meta time {
  font-family: var(--font-body); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.03em; text-transform: uppercase; color: var(--color-accent-dark);
}
:root .Layout_area__fopxq {
  color: var(--color-primary);
  font-family: var(--font-body); font-size: var(--font-size-sm); font-weight: 700;
  border-bottom: 1px solid var(--color-accent);
}
:root .Layout_area__fopxq:hover { color: var(--color-accent-dark); }

/* ── Paginacion ── */
:root .page-numbers {
  font-family: var(--font-body); font-size: var(--font-size-sm); font-weight: 600;
  color: var(--color-primary); padding: 0.4rem 0.85rem;
  border: 1px solid var(--color-border); border-radius: var(--radius); margin: 0 0.2rem;
  display: inline-block; transition: background 0.15s ease, color 0.15s ease;
}
:root .page-numbers.current, :root .page-numbers:hover {
  background: var(--color-primary); color: #F3F0E4; border-color: var(--color-primary);
}

/* ── Pie de pagina ── */
:root footer {
  background-color: var(--color-primary-dark); color: rgba(243,240,228,.72);
  font-family: var(--font-body); font-size: var(--font-size-sm); font-weight: 400;
  text-align: center; padding: 2rem 1.5rem; margin-top: 3rem;
  border-top: 3px solid var(--color-accent);
}
:root footer a { color: rgba(243,240,228,.88); border-bottom: 1px solid rgba(156,154,62,.4); }
:root footer a:hover { color: var(--color-accent); border-color: var(--color-accent); }

/* === R2 fixes (2026-07-10T07:40:21.410326+00:00) === */

/* Enlaces de afiliado — distinguirlos de un enlace de referencia comun (ej. Wikipedia) */
:root a[href^="/link/"] {
  font-weight: 700;
  color: var(--color-primary);
  border-bottom: 1px solid var(--color-accent);
  background: rgba(156,154,62,0.12);
  padding: 0.05em 0.3em;
  border-radius: 4px;
}

/* Tabla comparativa (ej. glosario de indices espectrales) */
:root table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6rem 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
:root th {
  background: var(--color-primary);
  color: #F3F0E4;
  font-family: var(--font-heading);
  font-weight: 500;
  text-align: left;
  padding: 0.7rem 0.9rem;
}
:root td {
  padding: 0.7rem 0.9rem;
  border-top: 1px solid var(--color-border);
  vertical-align: top;
}
:root tbody tr:nth-child(even) { background: var(--color-surface); }

/* Fecha en el listado de portada — que salte a la vista antes que el resumen */
:root .date {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin-bottom: 0.3rem;
  display: inline-block;
}

/* Cada entrada del listado de portada como su propio bloque de cuaderno */
:root main:has(> article + article) > article {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  margin-bottom: 1.3rem;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  :root body           { font-size: 16px; }
  :root .site-content  { padding: 0 1rem; margin: 1.5rem auto; }
  :root header          { padding: 1.2rem 1rem 1rem; }
  :root .main-navigation { padding: 0 1rem 0.8rem; }
  :root h1, :root .entry-title { font-size: 1.95rem; }
  :root h2 { font-size: 1.45rem; }
  :root h3 { font-size: 1.2rem; }
  :root .Main_section__dmirL, :root article.post { padding: 1.1rem 1.2rem; }
  :root pre { padding: 0.9rem 1rem; }
}

/* ═══════════════════════════════════════════════════════════
   v.2cadf5 — layout revision
   Editorial pass targeting the LIVE build (Teledora / flat feed):
     header>div>h1|a · main>article (siblings) · p.date · article>a read-more
     article page: main>h1 · main>time · main>article · main>section
   Home: photo masthead → hero → 1 editor's pick → EL CUADERNO strip →
   journal feed → MÁS ENTRADAS closing strip.  Moment colour #8C4A00
   used exactly twice (home hero drop cap + article drop cap).
   ═══════════════════════════════════════════════════════════ */

:root { --color-moment: #8C4A00; }

/* ── Masthead: atmospheric photo, serif-italic wordmark, raster monogram ── */
:root header {
  background:
    linear-gradient(rgba(15,26,21,.74), rgba(15,26,21,.52)),
    var(--color-primary-dark) url("/theme-assets/hero-masthead.jpg") center/cover no-repeat;
  padding: 3rem 1.5rem 2.5rem;
  border-bottom: 3px solid var(--color-accent);
  text-align: center;
}
:root header > div { max-width: 900px; margin: 0 auto; }
/* raster-pixel monogram — Javiera's forest read as NDVI cells */
:root header > div::before {
  content: "";
  display: block;
  width: 34px; height: 34px;
  margin: 0 auto 1rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Crect width='9' height='9' fill='%23C9C86A'/%3E%3Crect x='10.5' width='9' height='9' fill='%23F3F0E4'/%3E%3Crect x='21' width='9' height='9' fill='%239C9A3E'/%3E%3Crect y='10.5' width='9' height='9' fill='%23F3F0E4'/%3E%3Crect x='10.5' y='10.5' width='9' height='9' fill='%239C9A3E'/%3E%3Crect x='21' y='10.5' width='9' height='9' fill='%23C9C86A'/%3E%3Crect y='21' width='9' height='9' fill='%239C9A3E'/%3E%3Crect x='10.5' y='21' width='9' height='9' fill='%23C9C86A'/%3E%3Crect x='21' y='21' width='9' height='9' fill='%23F3F0E4'/%3E%3C/svg%3E") center/contain no-repeat;
  opacity: .95;
}
:root header h1,
:root header > div > a {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 600;
  color: #F6F2E6;
  border-bottom: none;
  line-height: 1.1;
  margin: 0;
}
:root header h1 { font-size: 2.9rem; }
:root header h1 a { color: #F6F2E6; border-bottom: none; font-style: italic; }
:root header h1 a:hover,
:root header > div > a:hover { color: var(--color-accent); border-bottom: none; }
:root header > div > a { font-size: 2rem; display: inline-block; }
:root header p {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(246,242,230,.85);
  max-width: 60ch;
  margin: .7rem auto 0;
}

/* ── Homepage feed container ── */
/* Grid so the bare-link archive tail can form a 3-col magazine index while the
   article cards stay full-width rows. Article/strip children span 1 / -1;
   only the tail <a> links flow into columns (M6 reorder + M7 grid). */
:root main:has(> article + article) {
  max-width: 880px;
  margin: 2.75rem auto 0;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 16px;
  row-gap: 12px;
}
/* pagination / any stray direct <p> child keeps the full row */
:root main:has(> article + article) > p { grid-column: 1 / -1; }

/* Base card — every feed entry, consistent frame ── */
:root main:has(> article + article) > article {
  grid-column: 1 / -1;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  padding: 1.6rem 2rem;
  margin-bottom: 1.6rem;
}
:root main:has(> article + article) > article > h2 {
  margin: 0 0 .5rem;
  font-size: 1.4rem;
  line-height: 1.28;
}
:root main:has(> article + article) > article > h2 a { border-bottom: none; }
:root main:has(> article + article) > article > p.date { margin: 0 0 .5rem; }
:root main:has(> article + article) > article > p:not(.date) {
  margin: 0 0 1rem;
  max-width: 66ch;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
}
:root main:has(> article + article) > article > a {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0; /* ocultar el "Read More →" que trae el template en inglés */
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--color-primary);
  border-bottom: 1px solid var(--color-accent);
}
:root main:has(> article + article) > article > a::after {
  content: "Seguir leyendo →";
  font-size: .9rem;
}
:root main:has(> article + article) > article:first-child > a::after {
  content: "Leer la entrada completa →";
}
:root main:has(> article + article) > article > a:hover { color: var(--color-accent-dark); }

/* ── HERO — the loud voice (first entry) ── */
:root main:has(> article + article) > article:first-child {
  border: 1px solid var(--color-border);
  border-top: 5px solid var(--color-primary);
  background: linear-gradient(180deg, #FBF8EF 0%, var(--color-bg) 100%);
  padding: 2.4rem 2.6rem 2.2rem;
  margin-top: 2.8rem;    /* room for the section band that floats above */
  margin-bottom: 2.4rem;
  position: relative;
}
/* M2 — the "Última entrada · el diario" label is a FULL-WIDTH uppercase section
   band ABOVE the hero card (with a hairline underline), not a kicker tucked
   inside the card frame above the headline. Absolutely positioned so it reads
   as a divider spanning the whole row, matching the "Para leer después" band. */
:root main:has(> article + article) > article:first-child::before {
  content: "Última entrada · el diario";
  position: absolute;
  left: 0;
  right: 0;
  top: -2.3rem;
  margin: 0;
  padding: 0 0 .5rem;
  border-bottom: 2px solid var(--color-accent-dark);
  font-family: var(--font-body);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
}
:root main:has(> article + article) > article:first-child > h2 {
  font-size: 2.35rem;
  font-style: italic;
  font-weight: 600;
  line-height: 1.14;
  margin: 0 0 .7rem;
}
:root main:has(> article + article) > article:first-child > p.date { margin-bottom: .9rem; }
:root main:has(> article + article) > article:first-child > p.date::after {
  content: " · por Javiera Cárcamo · lectura de 6 min";
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: none;
  letter-spacing: .02em;
}
:root main:has(> article + article) > article:first-child > p:not(.date) {
  font-size: 1.18rem;
  line-height: 1.6;
  max-width: 60ch;
}
/* drop cap — moment colour (1 of 2) */
:root main:has(> article + article) > article:first-child > p:not(.date)::first-letter {
  font-family: var(--font-heading);
  font-size: 3.2em;
  font-weight: 600;
  line-height: .8;
  float: left;
  margin: .06em .12em 0 0;
  color: var(--color-moment);
}

/* ── Editor's pick — "one to read next", the second gear change ── */
:root main:has(> article + article) > article:nth-child(2) {
  background: var(--color-surface);
  border-left: 5px solid var(--color-accent-dark);
  padding: 1.7rem 2rem;
  position: relative;
  margin-top: 1.8rem;   /* room for the section band that floats above */
}
/* M2 — the "Para leer después" label is a FULL-WIDTH uppercase section band
   ABOVE the card (with a hairline underline), not a kicker tucked inside the
   card frame. Absolutely positioned so it reads as a divider over the row. */
:root main:has(> article + article) > article:nth-child(2)::before {
  content: "Para leer después";
  position: absolute;
  left: 0;
  right: 0;
  top: -2.3rem;
  margin: 0;
  padding: 0 0 .5rem;
  /* M2 — saturate the hairline so the full-width band reads as a section
     divider above the row; the previous --color-border tone (#D9D3B9 on paper)
     was invisible, so the label looked like a floating text label with no band. */
  border-bottom: 2px solid var(--color-accent-dark);
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
}
:root main:has(> article + article) > article:nth-child(2) > h2 {
  font-size: 1.55rem;
  font-style: italic;
}

/* ── Strip 1 · EL CUADERNO — break into the chronological journal ── */
:root main:has(> article + article) > article:nth-child(3) {
  overflow: hidden;
  padding-top: 0;
}
:root main:has(> article + article) > article:nth-child(3)::before {
  content: "El Cuaderno";
  display: flex;
  align-items: center;
  justify-content: center;
  height: 195px;
  margin: 0 -2rem 1.6rem;
  background:
    linear-gradient(rgba(20,24,28,.55), rgba(20,24,28,.28)),
    var(--color-primary-dark) url("/theme-assets/article-hero.jpg") center 30% / cover no-repeat;
  color: #F3F0E4;
  font-family: var(--font-body);
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .32em;
  text-transform: uppercase;
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
}

/* ── Strip 2 · MÁS ENTRADAS — closing rhythm band ── */
/* M6 — order:1 places this photo strip AFTER the article cards (order:0) but
   BEFORE the compact archive tail (order:2), instead of dumping it below the
   tail above the footer. grid-column keeps it full width. */
:root main:has(> article + article)::after {
  content: "Más Entradas";
  grid-column: 1 / -1;
  order: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 205px;
  margin: 2.2rem 0 .5rem;
  border-radius: 8px;
  background:
    linear-gradient(rgba(20,24,28,.5), rgba(20,24,28,.3)),
    var(--color-primary-dark) url("/theme-assets/article-hero.jpg") center 70% / cover no-repeat;
  color: #F3F0E4;
  font-family: var(--font-body);
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .32em;
  text-transform: uppercase;
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
}

/* ── Compact archive tail — the closing magazine index ── */
/* The LIVE feed renders the archive tail as
     <main> … </article><section><ul><li><a>…</a></li>…</ul></section>
   — NOT as bare <a> children of <main>.  So the previous `main > a` rules
   matched nothing (the tail fell back to a narrow, plain <ul> of text links)
   and the <section> auto-placed as a single grid cell that sorted BEFORE
   main::after, dropping the MÁS ENTRADAS strip below the tail near the footer.

   M6 — order:2 on the <section> pushes the whole tail AFTER main::after
   (order:1), so the MÁS ENTRADAS strip now sits between the journal grid and
   the archive tail.
   M7 — grid-column:1/-1 makes the tail full-width; its <ul> becomes a 3-col
   magazine grid of boxed cream cards sharing the journal cards' design system
   (paper bg, hairline + accent border, radius, shadow, hover lift), each cell
   equal-height per row via grid stretch.
   Scoped to main:has(> article + article) so the article page's
   related-articles <section> (main:has(> h1), single <article>) is untouched. */
:root main:has(> article + article) > section {
  order: 2;
  grid-column: 1 / -1;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
}
:root main:has(> article + article) > section > ul {
  list-style: none;
  max-width: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 16px;
}
:root main:has(> article + article) > section > ul > li {
  display: flex;
  margin: 0;
  padding: 0;
  border: none;
}
:root main:has(> article + article) > section > ul > li > a {
  display: block;
  width: 100%;
  margin: 0;
  padding: 1rem 1.15rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  font-family: var(--font-heading);
  font-size: .98rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1.34;
  color: var(--color-link);
  transition: transform .15s ease, box-shadow .15s ease, color .15s ease, border-color .15s ease;
}
:root main:has(> article + article) > section > ul > li > a:hover {
  color: var(--color-accent-dark);
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(0,0,0,.09);
}

/* ── Article page — big serif title, meta kicker, drop cap ── */
:root main:has(> h1) {
  max-width: 760px;
  margin: 2.5rem auto 0;
  padding: 0 1.5rem;
}
:root main:has(> h1) > h1 {
  font-size: 2.7rem;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 .5rem;
}
:root main:has(> h1) > time {
  display: block;
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin-bottom: 2rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--color-border);
}
/* S6 — persona anchor: append a byline · location · reading-time to the bare
   date so the article meta is more than a lone timestamp */
:root main:has(> h1) > time::after {
  content: " · por Javiera Cárcamo · Valdivia · lectura de 6 min";
  font-weight: 600;
  text-transform: none;
  letter-spacing: .02em;
  color: var(--color-text-muted);
}
/* M11 — the article lead image (first <div> in <article>, wrapping the hero
   <img>) points at /img/<slug>/hero.webp, which 404s on this build and renders
   as a broken-image icon + alt text directly under the title/meta. CSS can't
   fix the missing src, so hide the broken <img> and paint a real atmospheric
   hero band from the theme asset that DOES resolve (same file the homepage
   strips use), so the lead image area always shows a rendered hero. Scoped to
   article pages (main:has(> h1)) and to a first-child div that actually holds
   an <img>, so inline body-image divs and paragraph-first layouts are untouched. */
:root main:has(> h1) > article > div:first-child:has(> img) {
  height: 300px;
  margin: 0 0 2.2rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  background:
    linear-gradient(rgba(20,24,28,.26), rgba(20,24,28,.12)),
    var(--color-primary-dark) url("/theme-assets/article-hero.jpg") center 40% / cover no-repeat;
}
:root main:has(> h1) > article > div:first-child:has(> img) > img { display: none; }
:root main:has(> h1) article > p { font-size: 1.12rem; line-height: 1.78; }
/* drop cap — moment colour (2 of 2) */
:root main:has(> h1) article > p:first-of-type::first-letter {
  font-family: var(--font-heading);
  font-size: 3.4em;
  font-weight: 600;
  line-height: .82;
  float: left;
  margin: .04em .1em 0 0;
  color: var(--color-moment);
}
/* related-articles callout */
:root main:has(> h1) section {
  margin-top: 2.6rem;
  padding: 1.5rem 1.8rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}
:root main:has(> h1) section h3 { margin-top: 0; font-style: italic; }
:root main:has(> h1) section ul { list-style: none; padding-left: 0; margin: 0; }
:root main:has(> h1) section li {
  padding: .5rem 0;
  border-bottom: 1px dotted rgba(0,0,0,.12);
}
:root main:has(> h1) section li:last-child { border-bottom: none; }

/* Divulgación de afiliados — subirla de nota al pie a aviso con presencia editorial */
:root main:has(> h1) article > div:has(> em) {
  margin: 2rem 0;
  padding: 1.1rem 1.4rem 1.1rem 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: 8px;
}
:root main:has(> h1) article > div:has(> em)::before {
  content: "AVISO DE AFILIADOS";
  display: block;
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin-bottom: .5rem;
}
:root main:has(> h1) article > div:has(> em) > em {
  display: block;
  font-style: normal;
  font-size: .95rem;
  line-height: 1.55;
  color: var(--color-text);
  max-width: none;
  margin: 0;
}

/* affiliate link — clearer CTA weight (see R2 base rule) */
:root a[href^="/link/"]:hover {
  background: rgba(156,154,62,.2);
  border-color: var(--color-accent-dark);
  color: var(--color-primary-dark);
}

/* ── Responsive — editorial layer ── */
@media (max-width: 640px) {
  :root header { padding: 2.2rem 1.1rem 1.8rem; }
  :root header h1 { font-size: 2.1rem; }
  :root header > div > a { font-size: 1.6rem; }
  :root main:has(> article + article) { padding: 0 1rem; margin-top: 1.8rem; grid-template-columns: 1fr; }
  :root main:has(> article + article) > article { padding: 1.3rem 1.3rem; }
  :root main:has(> article + article) > article:first-child { padding: 1.8rem 1.4rem; }
  :root main:has(> article + article) > article:first-child > h2 { font-size: 1.85rem; }
  :root main:has(> article + article) > article:nth-child(2) { padding: 1.4rem 1.4rem; }
  :root main:has(> article + article) > article:nth-child(3)::before { margin: 0 -1.3rem 1.3rem; height: 150px; }
  :root main:has(> article + article)::after { height: 155px; }
  :root main:has(> h1) { padding: 0 1.1rem; }
  :root main:has(> h1) > h1 { font-size: 2.05rem; }
  :root main:has(> h1) > article > div:first-child:has(> img) { height: 190px; }
  :root main:has(> h1) article > p { font-size: 1.06rem; }
}


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


/* premium-upgrade v1 */
/* premium editorial upgrade — style=Cup-of-Jo-personal overlay=55% grid=equal scale=balanced family=articles-section */

/* ── Archive strip above <section> tail (overlay 55%) ── */
:root main:not(:has(> h1)) > section {
  position: relative;
  padding-top: 260px;
  grid-column: 1 / -1;
}
:root main:not(:has(> h1)) > section::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0;
  height: 240px;
  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;
  border-radius: 8px;
}


/* ── 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)) > article: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)) > article: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)) > article: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)) > article: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)) > article: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)) > article: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)) > article: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)) > article: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))::before,
  :root main:not(:has(> h1))::after { min-height: 240px; }
  :root main:has(> h1) > article > p:first-of-type::first-letter { font-size: 60px; }
}


/* premium-upgrade v4 */
/* premium-upgrade v4 — surgical bundle. Applied 2026-08-30.
   Fixes: M10 CTA / M11 dinkus leak / M4 heights / M9 typography / M5 frames.
   Kills v2 "LATEST" label (proven counterproductive from v2 diagnosis). */

/* ── Kill v2 counterproductive homepage label ── */
:root main:not(:has(> h1))::before { content: none !important; }

/* ── M10: affiliate CTA visibility on article body ── */
:root main:has(> h1) a[href^="/try/"],
:root main:has(> h1) a[href^="/ref/"],
:root main:has(> h1) a[href^="/go/"],
:root main:has(> h1) a[href^="/out/"],
:root main:has(> h1) a[href^="/check/"],
:root main:has(> h1) a[href^="/view/"],
:root main:has(> h1) a[href*="hotmart.com"],
:root main:has(> h1) a[href*="digistore24"],
:root main:has(> h1) a[href*="clickbank"] {
  display: inline-block !important;
  background: var(--primary) !important;
  color: var(--bg) !important;
  padding: 6px 14px !important;
  border-radius: 4px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  letter-spacing: 0.02em !important;
}

/* ── M11: prevent dinkus leaking onto article page's first h2 ── */
:root main:has(> h1) > article > h2:first-of-type::before {
  content: none !important;
}

/* ── M4: force equal-height cards via grid stretch + card fill ── */
:root main:not(:has(> h1)) > div:has(> div) {
  align-items: stretch !important;
}
:root main:not(:has(> h1)) > div:has(> div) > div {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
}
:root main:not(:has(> h1)) > div > article {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
}
/* also for flat-divs family */
:root main:not(:has(> h1)) > div {
  height: 100% !important;
}

/* ── M9: cap small-title weight so Bebas/Anton counters don't fill in ── */
:root main:not(:has(> h1)) > div > div > h2,
:root main:not(:has(> h1)) > div > div > h2 a,
:root main:not(:has(> h1)) > section > ul > li > a,
:root main:not(:has(> h1)) > div > p > a {
  font-weight: 500 !important;
}

/* ── M5: universal soft frame fallback for card-like elements ── */
:root main:not(:has(> h1)) > div > div,
:root main:not(:has(> h1)) > div > article,
:root main:not(:has(> h1)) > article {
  border-radius: 8px !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.05) !important;
}

