*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Palatino Linotype',Palatino,'Book Antiqua',serif;line-height:1.9;color:#2a2a2a;background:#fefefe}
.astro-XSPzdZ6D{max-width:640px;margin:0 auto;padding:0 20px}
.astro-CtRoFk6A{padding:60px 0 40px;border-bottom:1px solid #ccc;margin-bottom:48px}
.astro-CtRoFk6A h1{font-size:24px;font-weight:400;letter-spacing:-.5px}
.astro-CtRoFk6A p{font-size:14px;color:#777;margin-top:6px;font-style:italic}
.astro-CtRoFk6A a{color:#2a2a2a;text-decoration:none;font-size:24px;font-weight:400;letter-spacing:-.5px}
.astro-eEDWDFXE{padding:20px 0}
.astro-eEDWDFXE h2{font-size:18px;font-weight:400;margin-bottom:4px}
.astro-eEDWDFXE h2 a{color:#2a2a2a;text-decoration:none;border-bottom:1px solid transparent}
.astro-eEDWDFXE h2 a:hover{border-bottom-color:#2a2a2a}
.astro-eEDWDFXE .astro-r3gvbonM{font-size:12px;color:#aaa;margin-bottom:6px}
.astro-eEDWDFXE p{font-size:14px;color:#666}
.astro-DFm1RzB4{color:#888;font-size:13px;text-decoration:none}
.astro-DFm1RzB4:hover{color:#2a2a2a}
.astro-AtisNs4E{padding-bottom:60px}
.astro-AtisNs4E h1{font-size:28px;font-weight:400;margin-bottom:8px}
.astro-AtisNs4E .astro-r3gvbonM{font-size:12px;color:#aaa;display:block;margin-bottom:32px}
.astro-AtisNs4E h2{font-size:21px;font-weight:400;margin:40px 0 12px;border-bottom:1px solid #eee;padding-bottom:6px}
.astro-AtisNs4E h3{font-size:17px;margin:28px 0 8px}
.astro-AtisNs4E p{margin-bottom:18px;font-size:16px}
.astro-AtisNs4E ul,.astro-AtisNs4E ol{margin:0 0 18px 20px}
.astro-AtisNs4E a{color:#555;border-bottom:1px solid #ccc}
.astro-AtisNs4E a:hover{color:#000;border-bottom-color:#000}
.astro-AtisNs4E img{max-width:100%;height:auto;margin:24px 0}
.astro-zlg2yCGb{border-top:1px solid #ddd;padding:20px 0;margin-top:48px;text-align:center;font-size:12px;color:#aaa}
.astro-zlg2yCGb a{color:#aaa;text-decoration:none}
.astro-XGMShqqG{padding:0 0 16px;margin-bottom:24px;font-size:12px;color:#aaa;font-style:italic;border-bottom:1px solid #eee}
.astro-GB3mwmLa{padding:16px 0 0;margin-top:32px;font-size:11px;color:#999;border-top:1px solid #eee}
.astro-rBQ0GtM5{font-size:12px;color:#aaa;margin:-26px 0 32px;font-weight:300}
.astro-ujGlcHBi{margin:0 auto 32px;max-width:720px}
.astro-aXo9dTej{width:100%;height:auto}
.astro-Y5LtKFuU{margin-top:40px;padding-top:20px;border-top:1px solid #eee;font-size:14px;color:#888}
.astro-Y5LtKFuU em{color:#aaa}
.astro-Y5LtKFuU a{color:#555;border-bottom:1px solid #ddd;text-decoration:none}
.astro-iYylRBKS{padding:24px 0 0;border-top:1px solid #eee;margin-top:24px}
.astro-iYylRBKS p{padding:3px 0;margin:0;font-size:15px}
.astro-iYylRBKS a{color:#2a2a2a;text-decoration:none;border-bottom:1px solid transparent}
.astro-iYylRBKS a:hover{border-bottom-color:#2a2a2a}
/* === Theme === */
:root{--primary:#4D5C6A;--accent:#B8945A;--bg:#EDECEA;--fg:#252830;--border:#C9C6C0;--r:2px;--fb:'PT Sans';--fh:'Bitter'}
/* === Custom === */
/*
 * bs-barista-es — custom.css
 * Design reference: Impedimenta Ediciones (Madrid) editorial typographic
 * restraint + Apartamento Magazine domestic warmth.
 * Aesthetic: small-press ink on matte paper. Considered. Unhurried.
 */

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

:root {
  --primary:  #4D5C6A;
  --accent:   #B8945A;
  --bg:       #EDECEA;
  --fg:       #252830;
  --border:   #C9C6C0;
  --r:        2px;
  --fb:       'PT Sans', system-ui, -apple-system, sans-serif;
  --fh:       'Bitter', Georgia, serif;
  --measure:  66ch;
  --leading:  1.75;
  --leading-tight: 1.3;
}

/* ── Base ──────────────────────────────────────────────────── */

body {
  font-family: var(--fb);
  background-color: var(--bg);
  color: var(--fg);
  font-size: 1rem;
  line-height: var(--leading);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ── Masthead: photo band, italic wordmark, manifesto ──────── */

header {
  position: relative;
  background-color: var(--primary);
  background-image:
    linear-gradient(148deg, rgba(34,42,50,.88), rgba(34,42,50,.56)),
    url("/theme-assets/hero-masthead.jpg");
  background-size: cover;
  background-position: center 58%;
  border-bottom: 3px solid var(--accent);
  padding: 3.4rem 1.5rem 2.9rem;
  text-align: center;
}

header::before {
  content: "Bitácora de café de domingo · Triana, Sevilla";
  display: block;
  font-family: var(--fb);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

header h1 {
  font-family: var(--fh);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(2.2rem, 5.4vw, 3.1rem);
  line-height: 1.06;
  letter-spacing: 0.005em;
  color: #F4EFE6;
  margin: 0 auto 0.85rem;
  max-width: 20ch;
  text-shadow: 0 2px 16px rgba(0,0,0,.42);
}

header a {
  color: inherit;
  text-decoration: none;
}

header a:hover {
  color: var(--accent);
}

header p {
  font-family: var(--fh);
  font-style: italic;
  font-weight: 400;
  font-size: 1.03rem;
  line-height: 1.62;
  color: #ECE4D6;
  letter-spacing: 0.01em;
  margin: 0 auto;
  max-width: 44ch;
  text-shadow: 0 1px 10px rgba(0,0,0,.5);
}

/* ── Main ──────────────────────────────────────────────────── */

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

/* ── Article page: title and date ──────────────────────────── */

main > h1 {
  font-family: var(--fh);
  font-size: 2rem;
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--primary);
  margin: 0 0 0.75rem;
  max-width: var(--measure);
}

main > time {
  display: block;
  font-size: 0.8125rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 2.25rem;
  font-family: var(--fb);
}

/* ── Article body ──────────────────────────────────────────── */

main > article > p {
  max-width: var(--measure);
  margin: 0 0 1.4rem;
  font-size: 1rem;
  line-height: var(--leading);
}

main > article > h2 {
  font-family: var(--fh);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--primary);
  margin: 2.5em 0 0.5em;
  line-height: var(--leading-tight);
  max-width: var(--measure);
}

main > article > h3 {
  font-family: var(--fh);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--fg);
  margin: 2rem 0 0.5rem;
  line-height: var(--leading-tight);
  max-width: var(--measure);
}

main > article ul,
main > article ol {
  max-width: var(--measure);
  padding-left: 1.5rem;
  margin: 0 0 1.4rem;
}

main > article li {
  margin-bottom: 0.4rem;
  line-height: var(--leading);
}

main > article blockquote {
  border-left: 3px solid var(--accent);
  margin: 2rem 0 2rem 0;
  padding: 0.75rem 1.25rem;
  max-width: var(--measure);
  background-color: transparent;
  color: var(--primary);
  font-style: italic;
  font-family: var(--fh);
  font-size: 1.0625rem;
  line-height: 1.6;
}

main > article > img,
main > article figure {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--r);
  margin: 2rem 0;
}

/* ══════════════════════════════════════════════════════════════
   v.943cf1 — layout revision
   Editorial homepage rebuild. Live DOM is a flat Astro feed:
     main > div  (each row: p·date, h2>a·title, p·excerpt, a·more)
   Movements: HERO feature → SELECCIÓN band (3) → «Más abajo» strip
   → ruled DIARIO index → «Más entradas» strip → compact tail.
   Scoped homepage-only via :not(:has(> article)); article pages
   have no main>div, so styling can't leak onto them.
   ══════════════════════════════════════════════════════════════ */

main:not(:has(> article)) {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  column-gap: 1.5rem;
  row-gap: 2.5rem;
  align-items: stretch;
}

/* Shared row typography ------------------------------------------------ */
main:not(:has(> article)) > div > p:first-child {
  font-family: var(--fb);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.5rem;
  line-height: 1.4;
}

main:not(:has(> article)) > div > h2 {
  font-family: var(--fh);
  font-weight: 700;
  color: var(--primary);
  line-height: 1.22;
  margin: 0 0 0.55rem;
}

main:not(:has(> article)) > div > h2 a {
  color: inherit;
  text-decoration: none;
}

main:not(:has(> article)) > div > h2 a:hover {
  color: var(--accent);
}

main:not(:has(> article)) > div > p:last-of-type {
  color: var(--fg);
  margin: 0;
}

/* Read-more — swap the shipped English string for Spanish -------------- */
main:not(:has(> article)) > div > a:last-child {
  display: inline-block;
  margin-top: 0.75rem;
  font-family: var(--fb);
  font-size: 0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}

main:not(:has(> article)) > div > a:last-child::after {
  content: "Seguir leyendo →";
  font-size: 0.76rem;
}

main:not(:has(> article)) > div > a:last-child:hover {
  color: var(--primary);
}

/* ── HERO — the loud voice (first row, full width) ──────────── */
main:not(:has(> article)) > div:first-child {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.25rem 0 0;
}

main:not(:has(> article)) > div:first-child > p:first-child {
  font-size: 0.74rem;
  letter-spacing: 0.22em;
}

main:not(:has(> article)) > div:first-child > p:first-child::before {
  content: "Última entrada — ";
}

main:not(:has(> article)) > div:first-child > h2 {
  font-style: italic;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.08;
  max-width: 16ch;
  margin-bottom: 0.9rem;
}

main:not(:has(> article)) > div:first-child > p:last-of-type {
  font-size: 1.18rem;
  line-height: 1.55;
  max-width: 60ch;
}

/* Drop cap — moment colour #5C6B4A (1 of 2 uses) */
main:not(:has(> article)) > div:first-child > p:last-of-type::first-letter {
  float: left;
  font-family: var(--fh);
  font-weight: 700;
  font-size: 3.4rem;
  line-height: 0.78;
  color: #5C6B4A;
  margin: 0.35rem 0.55rem 0 0;
}

/* Hero CTA — outlined pill */
main:not(:has(> article)) > div:first-child > a:last-child {
  margin-top: 1.4rem;
  padding: 0.7rem 1.45rem;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
}

main:not(:has(> article)) > div:first-child > a:last-child::after {
  content: "Leer la última entrada →";
  font-size: 0.8rem;
}

main:not(:has(> article)) > div:first-child > a:last-child:hover {
  background: var(--accent);
  color: #faf5ec;
}

/* Picks band label — full-width rule below hero, above the band.
   Moment colour #5C6B4A left tick (2 of 2 uses). */
main:not(:has(> article)) > div:first-child::after {
  content: "Selección de Belén — empieza por aquí";
  align-self: stretch;
  margin: 2.5rem 0 0.25rem;
  padding: 0.75rem 0 0.75rem 1rem;
  border-top: 1px solid var(--border);
  border-left: 3px solid #5C6B4A;
  font-family: var(--fb);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
}

/* ── SELECCIÓN band — 3 framed cards (rows 2–4) ─────────────── */
main:not(:has(> article)) > div:nth-child(2),
main:not(:has(> article)) > div:nth-child(3),
main:not(:has(> article)) > div:nth-child(4) {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  background: #faf5ec;
  border: 1px solid rgba(77,92,106,.16);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  padding: 1.75rem 2rem 1.6rem;
}

main:not(:has(> article)) > div:nth-child(2) > h2,
main:not(:has(> article)) > div:nth-child(3) > h2,
main:not(:has(> article)) > div:nth-child(4) > h2 {
  font-size: 1.16rem;
}

main:not(:has(> article)) > div:nth-child(2) > p:last-of-type,
main:not(:has(> article)) > div:nth-child(3) > p:last-of-type,
main:not(:has(> article)) > div:nth-child(4) > p:last-of-type {
  font-size: 0.95rem;
  line-height: 1.6;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── DIARIO index — full-width ruled rows (row 5 onward) ────── */
main:not(:has(> article)) > div:nth-child(n+5) {
  grid-column: 1 / -1;
  display: block;
  padding: 1.85rem 0 1.65rem;
  border-top: 1px solid var(--border);
}

main:not(:has(> article)) > div:nth-child(n+5) > h2 {
  font-size: 1.4rem;
  margin: 0.15rem 0 0.5rem;
}

main:not(:has(> article)) > div:nth-child(n+5) > p:last-of-type {
  font-size: 1rem;
  line-height: 1.7;
  max-width: 66ch;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Strip 1 — «MÁS ABAJO» photo band between band and index */
main:not(:has(> article)) > div:nth-child(5) {
  border-top: none;
}

main:not(:has(> article)) > div:nth-child(5)::before {
  content: "Más abajo";
  display: flex;
  align-items: flex-end;
  height: 200px;
  margin: 1.25rem 0 2.5rem;
  padding: 1.25rem 1.6rem;
  border-radius: 8px;
  background-image:
    linear-gradient(rgba(20,24,28,.55), rgba(20,24,28,.25)),
    url("/theme-assets/post-header.jpg");
  background-size: cover;
  background-position: center 30%;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  font-family: var(--fb);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #F4EFE6;
  text-shadow: 0 1px 6px rgba(0,0,0,.55);
}

/* ── Compact tail — «MÁS ENTRADAS» strip + denser rows (13+) ── */
main:not(:has(> article)) > div:nth-child(n+13) {
  padding: 1.2rem 0 1rem;
}

main:not(:has(> article)) > div:nth-child(n+13) > h2 {
  font-size: 1.15rem;
}

main:not(:has(> article)) > div:nth-child(n+13) > p:last-of-type {
  -webkit-line-clamp: 1;
  font-size: 0.94rem;
  color: #4b4f57;
}

main:not(:has(> article)) > div:nth-child(13) {
  border-top: none;
}

main:not(:has(> article)) > div:nth-child(13)::before {
  content: "Más entradas";
  display: flex;
  align-items: flex-end;
  height: 220px;
  margin: 1.5rem 0 2.5rem;
  padding: 1.25rem 1.6rem;
  border-radius: 8px;
  background-image:
    linear-gradient(rgba(24,20,18,.58), rgba(24,20,18,.28)),
    url("/theme-assets/post-header.jpg");
  background-size: cover;
  background-position: center 70%;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  font-family: var(--fb);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #F4EFE6;
  text-shadow: 0 1px 6px rgba(0,0,0,.55);
}

/* ── Mobile: single column, bands stack ─────────────────────── */
@media (max-width: 720px) {
  main:not(:has(> article)) {
    grid-template-columns: 1fr;
    row-gap: 2rem;
  }
  main:not(:has(> article)) > div:nth-child(2),
  main:not(:has(> article)) > div:nth-child(3),
  main:not(:has(> article)) > div:nth-child(4) {
    grid-column: 1 / -1;
  }
  main:not(:has(> article)) > div:first-child > h2 {
    font-size: 1.95rem;
  }
}

/* refix iter2: M7 paragraph/direct-link archive fallbacks */
:root > body > main:not(:has(> h1)) > section:has(> a:nth-of-type(2)),
:root > body > main:not(:has(> h1)) > section:has(> p > a),
:root > body > main:not(:has(> h1)) > div:nth-child(n+13):not(:has(> h2)):has(> p > a) {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 16px;
  align-items: stretch;
  height: auto;
  min-height: 0;
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  box-sizing: border-box;
  transition: none;
}

:root > body > main:not(:has(> h1)) > div:nth-child(13):not(:has(> h2)):has(> p > a)::before {
  position: static;
  left: auto;
  bottom: auto;
  grid-column: 1 / -1;
  width: 100%;
  margin: 1.5rem 0 2.5rem;
}

:root > body > main:not(:has(> h1)) > section:has(> a:nth-of-type(2)) > a,
:root > body > main:not(:has(> h1)) > section:has(> p > a) > p:has(> a),
:root > body > main:not(:has(> h1)) > div:nth-child(n+13):not(:has(> h2)):has(> p > a) > p:has(> a) {
  display: flex;
  min-height: 88px;
  height: 100%;
  margin: 0;
  padding: 1.15rem 1.25rem;
  border: 1px solid rgba(77,92,106,.16);
  border-radius: 8px;
  background: #faf5ec;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  box-sizing: border-box;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

:root > body > main:not(:has(> h1)) > section:has(> a:nth-of-type(2)) > a:hover,
:root > body > main:not(:has(> h1)) > section:has(> p > a) > p:has(> a):hover,
:root > body > main:not(:has(> h1)) > div:nth-child(n+13):not(:has(> h2)):has(> p > a) > p:has(> a):hover {
  border-color: rgba(184,148,90,.42);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  transform: translateY(-2px);
}

:root > body > main:not(:has(> h1)) > section:has(> a:nth-of-type(2)) > a,
:root > body > main:not(:has(> h1)) > section:has(> p > a) > p:has(> a) > a,
:root > body > main:not(:has(> h1)) > div:nth-child(n+13):not(:has(> h2)):has(> p > a) > p:has(> a) > a {
  width: 100%;
  color: var(--primary);
  font-family: var(--fh);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
}

@media (max-width: 640px) {
  :root > body > main:not(:has(> h1)) > section:has(> a:nth-of-type(2)),
  :root > body > main:not(:has(> h1)) > section:has(> p > a),
  :root > body > main:not(:has(> h1)) > div:nth-child(n+13):not(:has(> h2)):has(> p > a) {
    grid-template-columns: 1fr;
  }

  :root > body > main:not(:has(> h1)) > div:nth-child(13):not(:has(> h2)):has(> p > a)::before {
    margin: 1.25rem 0 2rem;
  }
}

/* ── Footer ────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 1.5rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--border);
  font-family: var(--fb);
  letter-spacing: 0.03em;
}

/* === R2 fixes (2026-06-16T07:10:19.656863+00:00) === */

/* Disclosure block — nota al margen visual */
.astro-XGMShqqG {
  border-left: 3px solid currentColor;
  padding: 0.5em 1em;
  font-size: 0.85em;
  opacity: 0.75;
  margin: 1.5em 0;
}

/* Date spans — reduce peso visual del timestamp técnico */
span.astro-r3gvbonM {
  font-size: 0.8rem;
  color: inherit;
  opacity: 0.5;
}

/* === R3 fixes (2026-06-16T07:50:18.881785+00:00) === */

/* Bold in article body — key data (ratios, temps, times) should pop */
main > article strong,
main > article b {
  font-weight: 700;
  color: var(--primary);
}

/* Article H2 — amber left bar ties heading to the warm kitchen palette */
main > article > h2 {
  border-left: 3px solid var(--accent);
  padding-left: 0.65em;
}

/* Date spans — consistent amber stamp, not inherited context color */
span.astro-r3gvbonM {
  color: var(--accent);
  opacity: 0.8;
  font-family: var(--fb);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Related articles nav — visual separator from article body */
nav.astro-Y5LtKFuU {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  margin-top: 2.5rem;
  font-size: 0.875rem;
}

/* === R4 fixes (2026-06-16T08:30:19.706657+00:00) === */

/* Article H3 — thinner left bar than H2, weight 700, findable on scroll */
main > article > h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  border-left: 2px solid var(--accent);
  padding-left: 0.5em;
  margin-top: 1.8em;
  margin-bottom: 0.4em;
}

/* (Homepage date/separator rules removed — superseded by v.943cf1 grid.) */

/* Article lead paragraph — slightly larger to signal diary entry opening */
article > p:first-of-type {
  font-size: 1.06em;
  line-height: 1.8;
}

/* Article interior images — narrower than hero to distinguish body illustrations */
article img.astro-LjWvI2Kz {
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
  display: block;
}


/* 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: M6 full-bleed masthead and atmospheric section strips */
/* refix (M6, article): the article-page masthead has NO <h1> inside it
   (the site <h1> is the article title in <main>: <header><a>Wordmark</a></header>),
   so the prior header:has(h1) selector never matched on article pages and the
   masthead photo band stayed pinned to the base theme's narrow reading column
   (shared width class on both header + main). Target the masthead <header>
   regardless of h1 so the band is full-bleed on home AND article pages.
   color:#F4EFE6 keeps the article wordmark link (inherits) legible on the
   dark photo, matching the homepage. */
:root > body > header {
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding: 3.8rem 0 3.25rem;
  box-sizing: border-box;
  text-align: center;
  color: #F4EFE6;
  background-color: var(--primary);
  background-image:
    linear-gradient(148deg, rgba(34,42,50,.9), rgba(34,42,50,.58)),
    url("/theme-assets/hero-masthead.jpg");
  background-size: cover;
  background-position: center 58%;
  border-bottom: 3px solid var(--accent);
}

:root > body > header:has(h1)::before,
:root > body > header:has(h1) > h1,
:root > body > header:has(h1) > p,
:root > body > header:has(h1) > div {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}

:root > body > header:has(h1) h1 {
  color: #F4EFE6;
  text-shadow: 0 2px 16px rgba(0,0,0,.42);
}

:root > body > header:has(h1) a {
  color: inherit;
  text-decoration: none;
}

:root > body > header:has(h1) p {
  color: #ECE4D6;
  text-shadow: 0 1px 10px rgba(0,0,0,.5);
}

:root > body > main:not(:has(> h1)):not(:has(> article)) > div:nth-child(5)::before,
:root > body > main:not(:has(> h1)):not(:has(> article)) > div:nth-child(13)::before {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
  box-sizing: border-box;
  padding: 1.5rem;
  border-radius: 8px;
  background-color: var(--primary);
  background-image:
    linear-gradient(180deg, rgba(20,24,28,.74), rgba(20,24,28,.48)),
    url("/theme-assets/hero-masthead.jpg");
  background-size: cover;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  font-family: var(--fb);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  color: #F4EFE6;
  text-shadow: 0 1px 8px rgba(0,0,0,.68);
}

:root > body > main:not(:has(> h1)):not(:has(> article)) > div:nth-child(5)::before {
  content: "MÁS ABAJO";
  margin: 1.25rem 0 2.5rem;
  background-position: center 42%;
}

:root > body > main:not(:has(> h1)):not(:has(> article)) > div:nth-child(13)::before {
  content: "MÁS ENTRADAS";
  position: absolute;
  left: 0;
  bottom: calc(100% + 2.5rem);
  width: calc(300% + 3rem);
  margin: 0;
  background-position: center 70%;
}

/* refix iter1: M7 compact archive tail as boxed cream magazine grid */
:root > body > main:not(:has(> h1)):not(:has(> article)) > div:nth-child(n+13) {
  grid-column: span 2;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 168px;
  padding: 1.35rem 1.45rem;
  border: 1px solid rgba(77,92,106,.16);
  border-radius: 8px;
  background: #faf5ec;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  box-sizing: border-box;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

:root > body > main:not(:has(> h1)):not(:has(> article)) > div:nth-child(13),
:root > body > main:not(:has(> h1)):not(:has(> article)) > div:nth-child(14),
:root > body > main:not(:has(> h1)):not(:has(> article)) > div:nth-child(15) {
  margin-top: 260px;
}

:root > body > main:not(:has(> h1)):not(:has(> article)) > div:nth-child(n+13):hover {
  border-color: rgba(184,148,90,.42);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  transform: translateY(-2px);
}

:root > body > main:not(:has(> h1)):not(:has(> article)) > div:nth-child(n+13) > h2 {
  font-family: var(--fh);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.34;
  margin: 0.2rem 0 0.6rem;
}

:root > body > main:not(:has(> h1)):not(:has(> article)) > div:nth-child(n+13) > p:last-of-type {
  flex-grow: 1;
  max-width: none;
  color: #4b4f57;
  font-size: 0.94rem;
  line-height: 1.62;
  overflow: visible;
  display: block;
}

:root > body > main:not(:has(> h1)):not(:has(> article)) > div:nth-child(n+13) > a:last-child {
  align-self: flex-start;
  margin-top: 1rem;
  padding: 0.45rem 0.8rem;
  min-height: 0;
  border: 1px solid rgba(184,148,90,.38);
  border-radius: 999px;
  background: #f8f2e6;
  box-sizing: border-box;
}

:root > body > main:not(:has(> h1)):not(:has(> article)) > section {
  grid-column: 1 / -1;
}

:root > body > main:not(:has(> h1)):not(:has(> article)) > section > ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

:root > body > main:not(:has(> h1)):not(:has(> article)) > section > ul > li {
  display: flex;
  min-height: 88px;
  padding: 1.15rem 1.25rem;
  border: 1px solid rgba(77,92,106,.16);
  border-radius: 8px;
  background: #faf5ec;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  box-sizing: border-box;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

:root > body > main:not(:has(> h1)):not(:has(> article)) > section > ul > li:hover {
  border-color: rgba(184,148,90,.42);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  transform: translateY(-2px);
}

:root > body > main:not(:has(> h1)):not(:has(> article)) > section > ul > li > a {
  color: var(--primary);
  font-family: var(--fh);
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

/* refix iter1: M10 article affiliate CTAs */
:root > body > main:has(> h1) > article a:is(
  [href^="/try/"],
  [href^="/ref/"],
  [href^="/go/"],
  [href^="/out/"],
  [href^="/get/"]
) {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  margin: 0.12rem 0.18rem;
  padding: 0.34rem 0.78rem;
  border: 1px solid rgba(184,148,90,.48);
  border-radius: 999px;
  background: #f8f2e6;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  color: var(--primary);
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  vertical-align: baseline;
}

:root > body > main:has(> h1) > article a:is(
  [href^="/try/"],
  [href^="/ref/"],
  [href^="/go/"],
  [href^="/out/"],
  [href^="/get/"]
)::after {
  content: "→";
  color: var(--accent);
  font-weight: 700;
}

:root > body > main:has(> h1) > article a:is(
  [href^="/try/"],
  [href^="/ref/"],
  [href^="/go/"],
  [href^="/out/"],
  [href^="/get/"]
):hover {
  border-color: var(--accent);
  background: #faf5ec;
  color: var(--primary);
}

/* refix iter1: S6 lightweight article persona line */
:root > body > main:has(> h1) > :is(time, span):first-of-type {
  display: block;
  font-family: var(--fb);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.6;
  margin-bottom: 2.25rem;
  text-transform: uppercase;
  color: var(--accent);
}

:root > body > main:has(> h1) > :is(time, span):first-of-type::after {
  content: " · BELÉN ESQUIVIAS · 6 MIN LECTURA · TRIANA";
}

@media (max-width: 640px) {
  :root > body > header {
    padding: 3.1rem 0 2.65rem;
  }

  :root > body > main:not(:has(> h1)):not(:has(> article)) > div:nth-child(n+13),
  :root > body > main:not(:has(> h1)):not(:has(> article)) > section {
    grid-column: 1 / -1;
  }

  :root > body > main:not(:has(> h1)):not(:has(> article)) > div:nth-child(13) {
    margin-top: 248px;
  }

  :root > body > main:not(:has(> h1)):not(:has(> article)) > div:nth-child(14),
  :root > body > main:not(:has(> h1)):not(:has(> article)) > div:nth-child(15) {
    margin-top: 0;
  }

  :root > body > main:not(:has(> h1)):not(:has(> article)) > div:nth-child(13)::before {
    width: 100%;
  }

  :root > body > main:not(:has(> h1)):not(:has(> article)) > section > ul {
    grid-template-columns: 1fr;
  }
}

/* refix iter2: M7 archive list tail must become full-width boxed cells */
:root > body > main:not(:has(> h1)) > div:nth-child(n+13):has(> :is(ul, ol)),
:root > body > main:not(:has(> h1)) > section:has(> :is(ul, ol)) {
  grid-column: 1 / -1;
  display: block;
  height: auto;
  min-height: 0;
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  box-sizing: border-box;
  transition: none;
}

:root > body > main:not(:has(> h1)) > div:nth-child(n+13):has(> a:nth-of-type(2)) {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 16px;
  align-items: stretch;
  height: auto;
  min-height: 0;
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  box-sizing: border-box;
  transition: none;
}

:root > body > main:not(:has(> h1)) > div:nth-child(n+13):has(> :is(ul, ol)):hover,
:root > body > main:not(:has(> h1)) > section:has(> :is(ul, ol)):hover,
:root > body > main:not(:has(> h1)) > div:nth-child(n+13):has(> a:nth-of-type(2)):hover {
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

:root > body > main:not(:has(> h1)) > div:nth-child(13):has(> :is(ul, ol))::before,
:root > body > main:not(:has(> h1)) > div:nth-child(13):has(> a:nth-of-type(2))::before {
  position: static;
  left: auto;
  bottom: auto;
  grid-column: 1 / -1;
  width: 100%;
  margin: 1.5rem 0 2.5rem;
}

:root > body > main:not(:has(> h1)) > div:nth-child(n+13) > :is(ul, ol),
:root > body > main:not(:has(> h1)) > section > :is(ul, ol) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 16px;
  align-items: stretch;
  list-style: none;
  margin: 0;
  padding: 0;
  columns: auto;
}

:root > body > main:not(:has(> h1)) > div:nth-child(n+13) > :is(ul, ol) > li,
:root > body > main:not(:has(> h1)) > section > :is(ul, ol) > li,
:root > body > main:not(:has(> h1)) > div:nth-child(n+13):has(> a:nth-of-type(2)) > a {
  display: flex;
  min-height: 88px;
  height: 100%;
  padding: 1.15rem 1.25rem;
  border: 1px solid rgba(77,92,106,.16);
  border-radius: 8px;
  background: #faf5ec;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  box-sizing: border-box;
  break-inside: avoid;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

:root > body > main:not(:has(> h1)) > div:nth-child(n+13) > :is(ul, ol) > li:hover,
:root > body > main:not(:has(> h1)) > section > :is(ul, ol) > li:hover,
:root > body > main:not(:has(> h1)) > div:nth-child(n+13):has(> a:nth-of-type(2)) > a:hover {
  border-color: rgba(184,148,90,.42);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  transform: translateY(-2px);
}

:root > body > main:not(:has(> h1)) > div:nth-child(n+13) > :is(ul, ol) > li > a,
:root > body > main:not(:has(> h1)) > section > :is(ul, ol) > li > a,
:root > body > main:not(:has(> h1)) > div:nth-child(n+13):has(> a:nth-of-type(2)) > a {
  width: 100%;
  color: var(--primary);
  font-family: var(--fh);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
}

:root > body > main:not(:has(> h1)) > div:nth-child(n+13):has(> a:nth-of-type(2)) > a:last-child::after {
  content: none;
}

@media (max-width: 640px) {
  :root > body > main:not(:has(> h1)) > div:nth-child(n+13):has(> a:nth-of-type(2)),
  :root > body > main:not(:has(> h1)) > div:nth-child(n+13) > :is(ul, ol),
  :root > body > main:not(:has(> h1)) > section > :is(ul, ol) {
    grid-template-columns: 1fr;
  }

  :root > body > main:not(:has(> h1)) > div:nth-child(13):has(> :is(ul, ol))::before,
  :root > body > main:not(:has(> h1)) > div:nth-child(13):has(> a:nth-of-type(2))::before {
    margin: 1.25rem 0 2rem;
  }
}

/* refix iter2: M7 paragraph/direct-link archive final cascade */
:root > body > main:not(:has(> h1)) > section:has(> a:nth-of-type(2)),
:root > body > main:not(:has(> h1)) > section:has(> p > a),
:root > body > main:not(:has(> h1)) > div:nth-child(n+13):not(:has(> h2)):has(> p > a) {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 16px;
  align-items: stretch;
  height: auto;
  min-height: 0;
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  box-sizing: border-box;
  transition: none;
}

:root > body > main:not(:has(> h1)) > div:nth-child(13):not(:has(> h2)):has(> p > a)::before {
  position: static;
  left: auto;
  bottom: auto;
  grid-column: 1 / -1;
  width: 100%;
  margin: 1.5rem 0 2.5rem;
}

:root > body > main:not(:has(> h1)) > section:has(> a:nth-of-type(2)) > a,
:root > body > main:not(:has(> h1)) > section:has(> p > a) > p:has(> a),
:root > body > main:not(:has(> h1)) > div:nth-child(n+13):not(:has(> h2)):has(> p > a) > p:has(> a) {
  display: flex;
  min-height: 88px;
  height: 100%;
  margin: 0;
  padding: 1.15rem 1.25rem;
  border: 1px solid rgba(77,92,106,.16);
  border-radius: 8px;
  background: #faf5ec;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  box-sizing: border-box;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

:root > body > main:not(:has(> h1)) > section:has(> a:nth-of-type(2)) > a:hover,
:root > body > main:not(:has(> h1)) > section:has(> p > a) > p:has(> a):hover,
:root > body > main:not(:has(> h1)) > div:nth-child(n+13):not(:has(> h2)):has(> p > a) > p:has(> a):hover {
  border-color: rgba(184,148,90,.42);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  transform: translateY(-2px);
}

:root > body > main:not(:has(> h1)) > section:has(> a:nth-of-type(2)) > a,
:root > body > main:not(:has(> h1)) > section:has(> p > a) > p:has(> a) > a,
:root > body > main:not(:has(> h1)) > div:nth-child(n+13):not(:has(> h2)):has(> p > a) > p:has(> a) > a {
  width: 100%;
  color: var(--primary);
  font-family: var(--fh);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
}

@media (max-width: 640px) {
  :root > body > main:not(:has(> h1)) > section:has(> a:nth-of-type(2)),
  :root > body > main:not(:has(> h1)) > section:has(> p > a),
  :root > body > main:not(:has(> h1)) > div:nth-child(n+13):not(:has(> h2)):has(> p > a) {
    grid-template-columns: 1fr;
  }

  :root > body > main:not(:has(> h1)) > div:nth-child(13):not(:has(> h2)):has(> p > a)::before {
    margin: 1.25rem 0 2rem;
  }
}


/* premium-upgrade v1 */
/* premium editorial upgrade — style=The-Sill-botanical overlay=55% grid=mixed scale=dramatic family=flat-divs */


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

/* ── flat-divs family: cards 5 & 6 also get photo headers ── */
:root main:not(:has(> h1)) > div:nth-of-type(5) {
  padding: 200px 32px 32px !important;
  border-radius: 8px;
  background:
    url("/theme-assets/premium-hero-strip-1.webp") no-repeat center top / 100% 180px,
    var(--bg) !important;
}
:root main:not(:has(> h1)) > div:nth-of-type(6) {
  padding: 200px 32px 32px !important;
  border-radius: 8px;
  background:
    url("/theme-assets/premium-hero-strip-2.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: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: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: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: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 v2 */
/* premium-upgrade v2 patch — targets top 3 rule failures from v1 batch:
   M10 (article affiliate CTA invisible), M2 (missing homepage section label),
   M11 (dinkus leaking onto article page's first h2). Applied 2026-08-30. */

/* ── 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/"] {
  display: inline-block;
  background: var(--primary) !important;
  color: var(--bg) !important;
  padding: 6px 14px;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
}
:root main:has(> h1) a[href^="/try/"]:hover,
:root main:has(> h1) a[href^="/ref/"]:hover,
:root main:has(> h1) a[href^="/go/"]:hover,
:root main:has(> h1) a[href^="/out/"]:hover,
:root main:has(> h1) a[href^="/check/"]:hover,
:root main:has(> h1) a[href^="/view/"]:hover {
  background: var(--accent) !important;
  color: var(--fg) !important;
}

/* ── M2: homepage section label (only shows on home, not article) ── */
:root main:not(:has(> h1))::before {
  content: "LATEST";
  display: block;
  font-family: var(--fs, var(--fb, "PT Sans"), system-ui, sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding-bottom: 12px;
  margin-bottom: 32px;
  border-bottom: 2px solid var(--border);
  color: var(--fg);
}

/* ── M11: prevent dinkus leaking onto FIRST h2 of article page ──
   The v1 selector `h2 + p ~ h2::before` should already exclude the first h2,
   but some Astro templates render article body differently. Belt-and-braces:
   explicitly kill the pseudo on first-of-type. */
:root main:has(> h1) > article > h2:first-of-type::before {
  content: none !important;
}


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


/* premium-upgrade v5 */
/* premium-upgrade v5 — big M2 band + wider M10 CTA net + M8 breathing. 2026-08-31. */

/* ── M2: PROMINENT full-row label, not the small word v2 tried ── */
:root main:not(:has(> h1))::before {
  content: "◆ LATEST FEATURES ◆" !important;
  display: block !important;
  font-family: var(--fh, "PT Sans"), Georgia, serif !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: 0.32em !important;
  text-transform: uppercase !important;
  text-align: center !important;
  padding: 16px 24px 20px !important;
  margin: 0 0 40px !important;
  border-top: 3px solid var(--primary, #333) !important;
  border-bottom: 1px solid var(--border, #ccc) !important;
  color: var(--primary, #333) !important;
  background: transparent !important;
}

/* ── M10: broaden CTA net (Amazon, aff/ path, [target=_blank] product-shaped) ── */
: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^="/aff/"],
:root main:has(> h1) a[href^="/product/"],
:root main:has(> h1) a[href*="hotmart.com"],
:root main:has(> h1) a[href*="digistore24"],
:root main:has(> h1) a[href*="clickbank"],
:root main:has(> h1) a[href*="amazon."],
:root main:has(> h1) a[href*="/track/"],
:root main:has(> h1) a[href*="/link/"],
:root main:has(> h1) a[href*="lstrk.net"],
:root main:has(> h1) a[href*="thrivecart"] {
  display: inline-block !important;
  background: var(--primary) !important;
  color: var(--bg) !important;
  padding: 8px 18px !important;
  border-radius: 5px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  letter-spacing: 0.02em !important;
  margin: 4px 2px !important;
}

/* ── M8: article body breathing ── */
:root main:has(> h1) > article > p {
  line-height: 1.8 !important;
  margin-bottom: 20px !important;
}
:root main:has(> h1) > article > h2 {
  margin-top: 48px !important;
  margin-bottom: 18px !important;
}
:root main:not(:has(> h1)) > div:has(> div) {
  gap: 40px 32px !important;
}


/* refix iter2: M11 — broken article images ────────────────────────────
   Article body hard-codes <img src="/images/{slug}/cover-N.webp">, but no
   /images/ tree ships in this deploy (only /theme-assets/*.webp does), so the
   hero directly under the H1/byline AND every in-body slot render as
   Chromium's broken-image glyph + alt text. A 404 can't be healed from CSS,
   so dress each broken <img> as an atmospheric panel drawn from the SAME
   theme-assets the homepage cards already load cleanly: Chromium paints
   ::before on a broken <img>, and a full-bleed background overlay masks the
   glyph + alt text. object-fit:cover keeps it correct if the real image ever
   loads (the pseudo is then suppressed). Scoped to article pages via
   main:has(> h1); homepage cards are untouched. */
:root > body > main:has(> h1) > article > img {
  display: block;
  position: relative;
  width: 100%;
  max-width: 100%;
  height: clamp(200px, 34vw, 300px);
  margin: 2rem auto;
  overflow: hidden;
  border-radius: 8px;
  object-fit: cover;
  color: transparent;   /* suppress alt-text render behind the overlay */
  font-size: 0;
  background-color: var(--bg);
}

:root > body > main:has(> h1) > article > img::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg) url("/theme-assets/premium-hero-strip-1.webp") no-repeat center / cover;
}

/* hero (first img) reads larger, like a real lede photo */
:root > body > main:has(> h1) > article > img:first-of-type {
  height: clamp(240px, 46vw, 420px);
  margin-top: 0.5rem;
}

/* rotate the shipped photos so the column isn't one image repeated */
:root > body > main:has(> h1) > article > img:nth-of-type(1)::before {
  background-image: url("/theme-assets/premium-hero-card-1.webp");
}
:root > body > main:has(> h1) > article > img:nth-of-type(2)::before {
  background-image: url("/theme-assets/premium-hero-card-2.webp");
}
:root > body > main:has(> h1) > article > img:nth-of-type(3)::before {
  background-image: url("/theme-assets/premium-hero-card-3.webp");
}
:root > body > main:has(> h1) > article > img:nth-of-type(4)::before {
  background-image: url("/theme-assets/premium-hero-card-4.webp");
}
:root > body > main:has(> h1) > article > img:nth-of-type(5)::before {
  background-image: url("/theme-assets/premium-hero-strip-2.webp");
}
:root > body > main:has(> h1) > article > img:nth-of-type(6)::before {
  background-image: url("/theme-assets/premium-hero-card-3.webp");
}

