*{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}
.css-7pi0g7z{max-width:640px;margin:0 auto;padding:0 20px}
.css-74mwpd6{padding:60px 0 40px;border-bottom:1px solid #ccc;margin-bottom:48px}
.css-74mwpd6 h1{font-size:24px;font-weight:400;letter-spacing:-.5px}
.css-74mwpd6 p{font-size:14px;color:#777;margin-top:6px;font-style:italic}
.css-74mwpd6 a{color:#2a2a2a;text-decoration:none;font-size:24px;font-weight:400;letter-spacing:-.5px}
.css-nf099hj{padding:20px 0}
.css-nf099hj h2{font-size:18px;font-weight:400;margin-bottom:4px}
.css-nf099hj h2 a{color:#2a2a2a;text-decoration:none;border-bottom:1px solid transparent}
.css-nf099hj h2 a:hover{border-bottom-color:#2a2a2a}
.css-nf099hj .css-atucfck{font-size:12px;color:#aaa;margin-bottom:6px}
.css-nf099hj p{font-size:14px;color:#666}
.css-skyly6q{color:#888;font-size:13px;text-decoration:none}
.css-skyly6q:hover{color:#2a2a2a}
.css-ui0he42{padding-bottom:60px}
.css-ui0he42 h1{font-size:28px;font-weight:400;margin-bottom:8px}
.css-ui0he42 .css-atucfck{font-size:12px;color:#aaa;display:block;margin-bottom:32px}
.css-ui0he42 h2{font-size:21px;font-weight:400;margin:40px 0 12px;border-bottom:1px solid #eee;padding-bottom:6px}
.css-ui0he42 h3{font-size:17px;margin:28px 0 8px}
.css-ui0he42 p{margin-bottom:18px;font-size:16px}
.css-ui0he42 ul,.css-ui0he42 ol{margin:0 0 18px 20px}
.css-ui0he42 a{color:#555;border-bottom:1px solid #ccc}
.css-ui0he42 a:hover{color:#000;border-bottom-color:#000}
.css-ui0he42 img{max-width:100%;height:auto;margin:24px 0}
.css-7puvnmy{border-top:1px solid #ddd;padding:20px 0;margin-top:48px;text-align:center;font-size:12px;color:#aaa}
.css-7puvnmy a{color:#aaa;text-decoration:none}
.css-g0vm1ny{padding:0 0 16px;margin-bottom:24px;font-size:12px;color:#aaa;font-style:italic;border-bottom:1px solid #eee}
.css-vw1l6y0{padding:16px 0 0;margin-top:32px;font-size:11px;color:#999;border-top:1px solid #eee}
.css-6q38d19{font-size:12px;color:#aaa;margin:-26px 0 32px;font-weight:300}
.css-2eiedf8{margin:0 auto 32px;max-width:720px}
.css-auvrq96{width:100%;height:auto}
.css-z772g4k{margin-top:40px;padding-top:20px;border-top:1px solid #eee;font-size:14px;color:#888}
.css-z772g4k em{color:#aaa}
.css-z772g4k a{color:#555;border-bottom:1px solid #ddd;text-decoration:none}
.css-mirkuia{padding:24px 0 0;border-top:1px solid #eee;margin-top:24px}
.css-mirkuia p{padding:3px 0;margin:0;font-size:15px}
.css-mirkuia a{color:#2a2a2a;text-decoration:none;border-bottom:1px solid transparent}
.css-mirkuia a:hover{border-bottom-color:#2a2a2a}
/* === Theme === */
:root{--primary:#2C4A6E;--accent:#C08A2E;--bg:#F2EEE4;--fg:#2A2420;--border:#DCD3C0;--r:6px;--fb:'Karla';--fh:'Rokkitt';--lh:1.7;--sp:8px}
/* === Custom === */
/* v.b57cf5 — layout revision */
/* Design reference: botes de vidrio azul cobalto de botica casera + mancha de mostaza-curcuma
   en la encimera. Editorial pass: masthead-foto, hero card, "La autora recomienda", dos tiras
   EL CUADERNO / ENTRADAS ANTERIORES, rejilla del cuaderno, índice a dos columnas.
   Selectores estructurales (element + :has + nth-of-type) — sin nombres de clase obfuscados. */

@import url('https://fonts.googleapis.com/css2?family=Rokkitt:wght@400;500;600;700&family=Karla:wght@400;500;600;700&display=swap');

:root {
  --primary: #2C4A6E;
  --accent: #C08A2E;
  --moment: #5C6B4A;
  --bg: #F2EEE4;
  --paper: #faf5ec;
  --paper2: #f3ecdd;
  --fg: #2A2420;
  --border: #DCD3C0;
  --r: 8px;
  --fb: 'Karla';
  --fh: 'Rokkitt';
}

:root body {
  font-family: var(--fb), system-ui, -apple-system, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.7;
  font-size: 17px;
}
::selection { background: var(--accent); color: var(--bg); }
:root hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }

/* ══════════ MASTHEAD ══════════ */
:root > body > header {
  background:
    linear-gradient(rgba(26, 38, 54, 0.86), rgba(24, 34, 48, 0.93)),
    url("/theme-assets/hero-bg.jpg") center / cover no-repeat,
    linear-gradient(150deg, #22384f 0%, #2c4a6e 58%, #34506f 100%);
  color: var(--bg);
  padding: 60px 24px 44px;
  /* M6: escape the base-theme narrow column so the masthead photo is full-bleed */
  max-width: none;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 64px;
  border-bottom: 3px solid var(--accent);
  text-align: center;
}
/* Signature monogram: serum droplet */
:root > body > header::before {
  content: "";
  display: block;
  width: 38px;
  height: 38px;
  margin: 0 auto 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C12 2 5 10 5 15.5A7 7 0 0 0 19 15.5C19 10 12 2 12 2Z' fill='none' stroke='%23C08A2E' stroke-width='1.4'/%3E%3Cpath d='M9.4 15.6a2.6 2.6 0 0 0 2.6 2.5' fill='none' stroke='%23C08A2E' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
:root > body > header h1,
:root > body > header > a {
  display: block;
  font-family: var(--fh), Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--bg);
  text-decoration: none;
  max-width: 760px;
  margin: 0 auto 4px;
}
:root > body > header p {
  font-family: var(--fb), sans-serif;
  font-style: italic;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(242, 238, 228, 0.88);
  max-width: 520px;
  margin: 14px auto 0;
  padding-top: 13px;
  border-top: 1px solid var(--moment); /* moment colour · manifesto rule (1 of 2) */
}

/* ══════════ SHARED MAIN ══════════ */
:root main { max-width: 720px; margin: 0 auto; padding: 0 24px 70px; }

/* ══════════ HOMEPAGE ══════════ */
:root main:not(:has(> article)) {
  max-width: 1120px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 40px;
  row-gap: 44px;
  align-items: stretch;
  padding: 0 32px 96px;
}

/* — base card (all feed entries) — */
:root main:not(:has(> article)) > div:has(> h2) {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid rgba(44, 74, 110, 0.10);
  border-radius: 9px;
  box-shadow: 0 1px 4px rgba(42, 36, 32, 0.05);
  padding: 26px 34px 30px;
}
:root main:not(:has(> article)) > div:has(> h2) > p:first-of-type {
  font-family: var(--fb), sans-serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.4;
  margin: 0 0 10px;
}
:root main:not(:has(> article)) > div:has(> h2) > h2 {
  font-family: var(--fh), Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.24;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
}
:root main:not(:has(> article)) > div:has(> h2) > h2 a {
  color: var(--primary);
  text-decoration: none;
}
:root main:not(:has(> article)) > div:has(> h2) > h2 a:hover { color: var(--accent); }
:root main:not(:has(> article)) > div:has(> h2) > p:last-of-type {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--fg);
  max-width: 64ch;
  margin: 0 0 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
:root main:not(:has(> article)) > div:has(> h2) > a {
  margin-top: auto;
  align-self: flex-start;
  font-family: var(--fb), sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 2px;
}
:root main:not(:has(> article)) > div:has(> h2) > a:hover { color: var(--accent); }
:root main:not(:has(> article)) > div:has(> h2) > a::after { content: " \2192"; }

/* — HERO (first entry, full width) — */
:root main:not(:has(> article)) > div:nth-of-type(1) {
  grid-column: 1 / -1;
  position: relative;
  margin-top: 72px; /* M2: reserve room for the section band + hairline above the card */
  background: linear-gradient(160deg, #faf5ec, #f3ead4);
  border: 1px solid rgba(192, 138, 46, 0.30);
  border-radius: 11px;
  padding: 44px 56px 46px;
}
/* M2: label lifts out of the card frame into a full-width band above the row */
:root main:not(:has(> article)) > div:nth-of-type(1)::before {
  content: "\00DALTIMO EN EL TALLER";
  position: absolute;
  left: 0;
  right: 0;
  top: -46px;
  font-family: var(--fb), sans-serif;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--primary);
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--primary); /* M2: visible row-spanning hairline underline */
}
:root main:not(:has(> article)) > div:nth-of-type(1) > p:first-of-type {
  color: var(--accent);
  margin-bottom: 12px;
}
:root main:not(:has(> article)) > div:nth-of-type(1) > h2 {
  font-size: 44px;
  line-height: 1.12;
  font-weight: 700;
  margin: 0 0 20px;
}
:root main:not(:has(> article)) > div:nth-of-type(1) > p:last-of-type {
  display: block;
  overflow: visible;
  -webkit-line-clamp: none;
  font-size: 20px;
  line-height: 1.5;
  max-width: 60ch;
  margin: 0 0 24px;
}
:root main:not(:has(> article)) > div:nth-of-type(1) > p:last-of-type::first-letter {
  float: left;
  font-family: var(--fh), Georgia, serif;
  font-weight: 700;
  font-size: 58px;
  line-height: 0.82;
  color: var(--moment); /* moment colour · drop cap (2 of 2) */
  margin: 6px 12px 0 0;
}
:root main:not(:has(> article)) > div:nth-of-type(1) > a {
  align-self: flex-start;
  margin-top: 4px;
  padding: 11px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #F2EEE4;
  font-size: 12.5px;
  letter-spacing: 0.14em;
}
:root main:not(:has(> article)) > div:nth-of-type(1) > a:hover {
  background: var(--accent);
  color: #F2EEE4;
}

/* — EDITOR'S PICK (second entry, full width) + EL CUADERNO strip — */
:root main:not(:has(> article)) > div:nth-of-type(2) {
  grid-column: 1 / -1;
  position: relative;
  margin-top: 72px; /* M2: reserve room for the section band + hairline above the card */
  background: #f8f2e6;
  border: 1px solid rgba(44, 74, 110, 0.12);
  border-left: 4px solid var(--accent);
  border-radius: 9px;
  padding: 30px 36px 34px;
}
/* M2: label lifts out of the card frame into a full-width band above the row */
:root main:not(:has(> article)) > div:nth-of-type(2)::before {
  content: "LA AUTORA RECOMIENDA";
  position: absolute;
  left: 0;
  right: 0;
  top: -46px;
  font-family: var(--fb), sans-serif;
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--accent); /* M2: visible row-spanning hairline underline */
}
:root main:not(:has(> article)) > div:nth-of-type(2) > h2 { font-size: 26px; }
:root main:not(:has(> article)) > div:nth-of-type(2)::after {
  content: "EL CUADERNO";
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  margin: 34px -36px -34px;
  border-radius: 0 0 9px 9px;
  background:
    linear-gradient(rgba(20, 24, 28, 0.58), rgba(20, 24, 28, 0.30)),
    url("/theme-assets/story-cover.jpg") center 30% / cover no-repeat,
    linear-gradient(135deg, #2C4A6E, #5C6B4A);
  color: #F5EFE1;
  font-family: var(--fb), sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* — COMPACT TAIL (title-only index) + ENTRADAS ANTERIORES strip — */
/* M7: boxed cream-card magazine index — same design system as the journal cards */
:root main:not(:has(> article)) > div:not(:has(> h2)) {
  grid-column: 1 / -1;
  margin-top: 44px;
  padding: 34px 40px 40px;
  background: var(--paper2);
  border: 1px solid rgba(44, 74, 110, 0.10);
  border-radius: 9px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 16px;
  align-items: stretch;
}
:root main:not(:has(> article)) > div:not(:has(> h2))::before {
  content: "ENTRADAS ANTERIORES";
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 190px;
  margin: -34px -40px 28px;
  border-radius: 9px 9px 0 0;
  background:
    linear-gradient(rgba(20, 24, 28, 0.58), rgba(20, 24, 28, 0.30)),
    url("/theme-assets/story-cover.jpg") center 70% / cover no-repeat,
    linear-gradient(135deg, #5C6B4A, #2C4A6E);
  color: #F5EFE1;
  font-family: var(--fb), sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
:root main:not(:has(> article)) > div:not(:has(> h2)) > p {
  margin: 0;
  padding: 18px 20px;
  background: var(--paper);
  border: 1px solid rgba(44, 74, 110, 0.10);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(42, 36, 32, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
:root main:not(:has(> article)) > div:not(:has(> h2)) > p:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(42, 36, 32, 0.10);
}
:root main:not(:has(> article)) > div:not(:has(> h2)) > p > a {
  font-family: var(--fh), Georgia, serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--primary);
  text-decoration: none;
}
:root main:not(:has(> article)) > div:not(:has(> h2)) > p > a:hover { color: var(--accent); }

/* ══════════ ARTICLE PAGE ══════════ */
:root main:has(> article) > h1 {
  font-family: var(--fh), Georgia, serif;
  font-size: 40px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.14;
  margin: 14px 0 10px;
}
:root main:has(> article) > span {
  display: block;
  font-family: var(--fb), sans-serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 32px;
}
/* S6: persona byline anchor prepended to the date meta line */
:root main:has(> article) > span::before {
  content: "POR PAULINA CUESTA \00B7 ";
  color: var(--primary);
}

:root main > h1,
:root main > hgroup > h1 {
  font-family: var(--fh), Georgia, serif;
  font-size: 32px;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.22;
  margin: 8px 0 6px;
}

:root main h2 {
  font-family: var(--fh), Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--primary);
  margin: 2.4em 0 0.6em;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
/* Article H2: dinkus divider, no hairline */
:root main:has(> article) > article > h2 {
  border-bottom: 0;
  padding-bottom: 0;
  margin: 1.9em 0 0.5em;
}
:root main:has(> article) > article > h2::before {
  content: "\273F \273F \273F";
  display: block;
  text-align: center;
  color: var(--accent);
  font-size: 15px;
  letter-spacing: 0.5em;
  font-weight: 400;
  margin: 0 0 22px;
}
:root main h3 {
  font-family: var(--fh), Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--fg);
  margin: 2em 0 0.5em;
  border-left: 3px solid var(--accent);
  padding-left: 0.65em;
}

:root main p {
  margin: 0 0 1.4em;
  font-size: 17px;
  line-height: 1.75;
  max-width: 68ch;
}
:root main:has(> article) > article > p:first-of-type::first-letter {
  float: left;
  font-family: var(--fh), Georgia, serif;
  font-weight: 700;
  font-size: 60px;
  line-height: 0.78;
  color: var(--moment); /* moment colour · drop cap (same decision as homepage) */
  margin: 6px 12px 0 0;
}

:root main ul,
:root main ol { margin: 0 0 20px 24px; max-width: 68ch; }
:root main li { margin-bottom: 8px; font-size: 17px; line-height: 1.65; }
:root main li strong,
:root main p strong { color: var(--primary); font-weight: 700; }

:root main blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 0 12px 22px;
  margin: 28px 0;
  font-style: italic;
  color: var(--fg);
  background: rgba(44, 74, 110, 0.05);
  border-radius: 0 var(--r) var(--r) 0;
}

/* Body links */
:root main p a,
:root main li a {
  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 p a:hover,
:root main li a:hover { color: var(--accent); text-decoration-color: var(--primary); }

/* M10: affiliate CTA pill. Matches the redirect namespace anywhere in the
   article body (not only /check/ nested in <p>/<li>), so every affiliate link
   renders as a button. Beats the body-link rule on specificity (:root + main
   + :has + attr = higher than :root main p a). */
:root main:has(> article) a[href^="/check/"],
:root main:has(> article) a[href^="/go/"],
:root main:has(> article) a[href^="/out/"],
:root main:has(> article) a[href^="/ref/"] {
  display: inline-block;
  background: var(--accent);
  color: #F2EEE4;
  padding: 5px 16px;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(42, 36, 32, 0.15);
  font-family: var(--fb), sans-serif;
  font-weight: 700;
  font-size: 0.9em;
  letter-spacing: 0.03em;
  line-height: 1.5;
  text-decoration: none;
}
:root main:has(> article) a[href^="/check/"]:hover,
:root main:has(> article) a[href^="/go/"]:hover,
:root main:has(> article) a[href^="/out/"]:hover,
:root main:has(> article) a[href^="/ref/"]:hover {
  background: var(--primary);
  color: #F2EEE4;
}
:root main:has(> article) a[href^="/check/"]::after,
:root main:has(> article) a[href^="/go/"]::after,
:root main:has(> article) a[href^="/out/"]::after,
:root main:has(> article) a[href^="/ref/"]::after { content: " \2197"; }

/* Images */
:root main img,
:root main figure { margin: 0 0 28px; }
:root main img,
:root main figure > img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--r);
  box-shadow: 0 3px 14px rgba(42, 36, 32, 0.10);
}
:root main figcaption {
  font-family: var(--fb), sans-serif;
  font-size: 13px;
  color: var(--fg);
  opacity: 0.65;
  margin-top: 8px;
  text-align: center;
}

/* Footer */
:root footer {
  background: transparent;
  border-top: 1px solid var(--border);
  padding: 26px 24px 36px;
  margin-top: 54px;
  text-align: center;
  font-family: var(--fb), sans-serif;
  font-size: 12.5px;
  color: var(--fg);
  opacity: 0.62;
  letter-spacing: 0.03em;
}
:root footer a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px dotted var(--border);
}
:root footer a:hover { color: var(--primary); border-bottom-color: var(--primary); }

/* ══════════ RESPONSIVE ══════════ */
@media (max-width: 768px) {
  :root > body > header { padding: 40px 20px 30px; margin-bottom: 40px; }
  :root > body > header h1,
  :root > body > header > a { font-size: 29px; }

  :root main:not(:has(> article)) {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 28px;
    padding: 0 18px 60px;
  }
  :root main:not(:has(> article)) > div:has(> h2) { padding: 22px 22px 24px; }
  :root main:not(:has(> article)) > div:nth-of-type(1) { padding: 30px 24px 32px; }
  :root main:not(:has(> article)) > div:nth-of-type(1) > h2 { font-size: 32px; }
  :root main:not(:has(> article)) > div:nth-of-type(1) > p:last-of-type { font-size: 18px; }
  :root main:not(:has(> article)) > div:nth-of-type(2) { padding: 24px 22px 26px; }
  :root main:not(:has(> article)) > div:nth-of-type(2)::after { margin: 28px -22px -26px; height: 160px; }
  :root main:not(:has(> article)) > div:not(:has(> h2)) {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 12px;
    padding: 26px 22px 26px;
  }
  :root main:not(:has(> article)) > div:not(:has(> h2))::before { margin: -26px -22px 22px; height: 150px; }

  :root main:has(> article) > h1 { font-size: 30px; }
  :root main > h1,
  :root main > hgroup > h1 { font-size: 25px; }
  :root main h2 { font-size: 21px; }
  :root main p,
  :root main li { font-size: 16.5px; }
}

@media (max-width: 480px) {
  :root > body > header h1,
  :root > body > header > a { font-size: 25px; }
  :root main:not(:has(> article)) > div:nth-of-type(1) > h2 { font-size: 27px; }
  :root main:has(> article) > h1 { font-size: 26px; }
  :root main h2 { font-size: 19px; }
  /* M7: single column of boxed tail cards on phones */
  :root main:not(:has(> article)) > div:not(:has(> h2)) { grid-template-columns: 1fr; }
}


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


/* table-overflow-fix v1 — M7 (article) */
/* Ingredient tables had no styling and rendered at natural content width, so
   their right columns overflowed the viewport on article2-mobile. Force the
   table to the reading measure (table-layout:fixed distributes columns within
   100% instead of expanding to content) and wrap cell text so nothing spills. */
:root main table {
  display: table;
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 0 0 28px;
  font-size: 15px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
:root main th,
:root main td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}
:root main thead th,
:root main table th {
  background: rgba(44, 74, 110, 0.08);
  font-family: var(--fh), Georgia, serif;
  font-weight: 600;
  color: var(--primary);
}
@media (max-width: 640px) {
  :root main table { font-size: 13.5px; }
  :root main th,
  :root main td { padding: 8px 9px; }
}


/* premium-upgrade v1 */
/* premium editorial upgrade — style=Monocle-Swiss overlay=25% grid=asymmetric 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; }
}

