*{margin:0;padding:0;box-sizing:border-box}
body{font-family:Georgia,'Times New Roman',serif;line-height:1.8;color:#222;background:#f4f1eb}
.wrapper-df5c10{max-width:1100px;margin:0 auto;padding:0 24px}
.outer-ec98a3{background:linear-gradient(135deg,#2c3e50,#34495e);color:#fff;padding:48px 0;text-align:center;margin-bottom:48px}
.outer-ec98a3 h1{font-size:36px;letter-spacing:2px;text-transform:uppercase;margin-bottom:6px}
.outer-ec98a3 p{font-size:16px;opacity:.8;font-style:italic}
.outer-ec98a3 .container-0aa6f8{color:#fff;text-decoration:none;font-size:20px;letter-spacing:1px;text-transform:uppercase}
.footer-65c622{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:28px}
.sidebar-eedd43{background:#fff;border-radius:4px;box-shadow:0 2px 12px rgba(0,0,0,.08);padding:28px;transition:box-shadow .2s}
.sidebar-eedd43:hover{box-shadow:0 4px 20px rgba(0,0,0,.14)}
.sidebar-eedd43 h2{font-size:22px;margin-bottom:10px;line-height:1.3}
.sidebar-eedd43 h2 a{color:#2c3e50;text-decoration:none}
.sidebar-eedd43 .content-8e2357{font-size:12px;color:#888;margin-bottom:10px;text-transform:uppercase;letter-spacing:1px}
.sidebar-eedd43 p{font-size:15px;color:#555;margin-bottom:14px}
.widget-936bdd{color:#e74c3c;text-decoration:none;font-weight:700;font-size:13px;text-transform:uppercase;letter-spacing:.5px}
.content-f2de3d{max-width:780px;margin:0 auto;padding:0 24px 60px}
.content-f2de3d h1{font-size:36px;margin-bottom:10px;line-height:1.2}
.content-f2de3d .content-8e2357{font-size:13px;color:#888;display:block;margin-bottom:28px;text-transform:uppercase;letter-spacing:1px}
.content-f2de3d h2{font-size:24px;margin:36px 0 14px}
.content-f2de3d h3{font-size:19px;margin:28px 0 10px}
.content-f2de3d p{margin-bottom:18px;font-size:17px}
.content-f2de3d ul,.content-f2de3d ol{margin:0 0 18px 28px}
.content-f2de3d a{color:#e74c3c}
.content-f2de3d img{max-width:100%;height:auto;border-radius:4px;margin:20px 0}
.container-aa1b6e{border-top:2px solid #ddd;padding:28px 0;margin-top:48px;text-align:center;font-size:13px;color:#888}
.container-aa1b6e a{color:#888}
.region-fb6951{border-top:1px solid #ccc;border-bottom:1px solid #ccc;padding:14px 0;margin-bottom:28px;font-size:14px;color:#888;font-style:italic;text-align:center}
.page-228a8e{background:#f9f3e3;padding:16px 20px;margin-top:28px;font-size:13px;color:#7a6230;border-radius:4px}
.region-6f24a5{font-size:11px;color:#888;margin:-22px 0 28px;text-transform:uppercase;letter-spacing:1.5px}
.block-593e67{margin:0 0 28px}
.region-33bc10{width:100%;height:auto;border-radius:4px}
.inner-3784e5{border-top:2px solid #ddd;margin-top:40px;padding-top:24px}
.inner-3784e5 h4{font-size:16px;text-transform:uppercase;letter-spacing:1px;margin-bottom:16px;color:#888}
.mag-related-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.mag-related-item a{color:#2c3e50;text-decoration:none;font-size:15px}
.mag-related-item a:hover{color:#e74c3c}
.footer-a1cb99{background:#fff;border-radius:4px;box-shadow:0 2px 12px rgba(0,0,0,.08);padding:22px 28px;margin-top:28px}
.footer-a1cb99 p{font-size:15px;padding:4px 0;margin:0}
.footer-a1cb99 .content-8e2357{margin:0 8px 0 0;display:inline}
.footer-a1cb99 a{color:#2c3e50;text-decoration:none}
.footer-a1cb99 a:hover{color:#e74c3c}
/* === Theme === */
:root{--primary:#26263A;--accent:#4B3FD1;--bg:#F4F1EA;--fg:#23222B;--border:#D9D5CC;--muted:#6E6B7A;--surface:#FBFAF7;--r:8px;--fd:'Instrument Serif';--ft:'Source Serif 4';--fm:'Karla';--fb:'Source Serif 4';--fh:'Source Serif 4'}
/* === Custom === */
/* v.f8c831 — layout revision */
/* Lienzopixel — a working illustrator's cuaderno. Warm paper, ultramarine ink,
   one olive "moment" used twice. Editorial serif display + serif body + tracked
   sans meta. Homepage rebuilt from a flat 21-card grid into hero → picks band →
   photo break → journal grid → closing band, all via structural selectors. */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Karla:wght@400;500;600;700&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;0,8..60,700;1,8..60,400&display=swap');

:root {
  --primary: #26263A;
  --accent: #4B3FD1;
  --moment: #5C6B4A;
  --bg: #F4F1EA;
  --fg: #2A2933;
  --border: rgba(38, 38, 58, 0.13);
  --muted: #6E6B7A;
  --surface: #FAF5EC;
  --ink: #191B2A;
  --r: 8px;
  --fd: 'Instrument Serif';
  --fb: 'Source Serif 4';
  --fh: 'Source Serif 4';
  --fm: 'Karla';
}

/* ─── Base ─── */

*,
*::before,
*::after { box-sizing: border-box; }

:root body {
  font-family: var(--fb), Georgia, 'Times New Roman', serif;
  background-color: var(--bg);
  color: var(--fg);
  line-height: 1.72;
  font-size: 1.0625rem;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

:root ::selection { background: var(--accent); color: #FAF5EC; }

/* ─── Links ─── */

:root a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}
:root a:hover { color: var(--primary); }

/* ─── Headings ─── */

:root h1, :root h2, :root h3, :root h4 {
  font-family: var(--fh), Georgia, serif;
  color: var(--primary);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin-top: 1.6em;
  margin-bottom: 0.55em;
}
:root h1 { font-size: 2.4rem; font-weight: 700; margin-top: 0; }
:root h2 { font-size: 1.7rem; }
:root h3 { font-size: 1.3rem; }
:root h4 {
  font-family: var(--fm), system-ui, sans-serif;
  font-size: 0.85rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.18em;
}

/* ─── Body copy ─── */

:root p { max-width: 68ch; margin: 0 0 1.3em; }
:root ul, :root ol { max-width: 68ch; margin: 0 0 1.3em; padding-left: 1.4em; }
:root li { margin-bottom: 0.5em; }
:root li::marker { color: var(--accent); }
:root strong { color: var(--primary); font-weight: 700; }

/* ─── Blockquote ─── */

:root blockquote {
  max-width: 66ch;
  margin: 1.8em 0;
  padding: 0.4em 0 0.4em 1.6em;
  border-left: 3px solid var(--accent);
  color: #46454f;
  font-style: italic;
  font-size: 1.12rem;
  line-height: 1.6;
}
:root blockquote p { margin-bottom: 0; }

/* ─── Tables ─── */

:root table { width: 100%; border-collapse: collapse; margin: 1.8em 0; font-size: 0.98rem; }
:root th {
  font-family: var(--fm), system-ui, sans-serif;
  color: var(--primary); text-align: left; padding: 0.6em 0.8em;
  border-bottom: 2px solid var(--border);
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.82rem;
}
:root td { padding: 0.65em 0.8em; border-bottom: 1px solid var(--border); }
:root tr:hover td { background: var(--surface); }

/* ─── Code / rule / images / small ─── */

:root code {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 4px; padding: 0.1em 0.4em; font-size: 0.9em;
}
:root img { max-width: 100%; height: auto; border-radius: var(--r); }
:root hr { border: none; border-top: 1px solid var(--border); margin: 2.4em 0; }
:root small { color: var(--muted); font-size: 0.85em; }

/* ══════════════════════════════════════════════════════════════════════
   MASTHEAD  —  home nav has  div > h1 + p ; article/static nav has div > a
   ══════════════════════════════════════════════════════════════════════ */

:root body > nav { border-bottom: 1px solid rgba(0, 0, 0, 0.18); }

/* Full masthead (homepage) */
:root body > nav:has(> div > h1) {
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(20, 21, 36, 0.74), rgba(20, 21, 36, 0.86)),
    url("/theme-assets/cover.jpg");
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  text-align: center;
  padding: clamp(3.4rem, 8vw, 6rem) 1.5rem clamp(2.6rem, 5vw, 4rem);
}
:root body > nav:has(> div > h1) > div { max-width: 62ch; margin: 0 auto; }
:root body > nav:has(> div > h1) h1 {
  font-family: var(--fd), Georgia, serif;
  font-style: italic; font-weight: 400;
  color: #FAF6EC;
  font-size: clamp(2.8rem, 6.5vw, 4.6rem);
  line-height: 1.02; letter-spacing: 0.01em;
  margin: 0;
}
:root body > nav:has(> div > h1) p {
  font-family: var(--fb), Georgia, serif;
  font-style: italic;
  color: rgba(247, 243, 233, 0.9);
  max-width: 52ch;
  margin: 1.4rem auto 0;
  padding-top: 1.2rem;
  font-size: 1.06rem; line-height: 1.6;
  border-top: 2px solid var(--moment);   /* moment colour — use 1 of 2 */
  display: inline-block;
}

/* Compact nav (article + static pages) */
:root body > nav:has(> div > a) {
  background: var(--primary);
  text-align: center;
  padding: 1.05rem 1.5rem;
}
:root body > nav:has(> div > a) > div { max-width: 1080px; margin: 0 auto; }
:root body > nav:has(> div > a) a {
  font-family: var(--fd), Georgia, serif;
  font-style: italic; font-size: 1.55rem;
  color: #FAF6EC; text-decoration: none;
}
:root body > nav:has(> div > a) a:hover { color: #fff; }

/* ══════════════════════════════════════════════════════════════════════
   HOMEPAGE  —  main:not(:has(>article)) > div  is the single card grid.
   6-col base: hero & bands span full width, picks span 2, journal span 3.
   Card order:  hero → [picks label] → picks → strip1 → [journal label]
                → journal → strip2   (positioned with `order`).
   ══════════════════════════════════════════════════════════════════════ */

:root main:not(:has(> article)) > div {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(2.8rem, 5vw, 4.5rem) 1.5rem clamp(3.5rem, 6vw, 5.5rem);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: 2rem;
  row-gap: 2.6rem;
  align-items: stretch;
}

/* Section labels — full-row, outside any frame (container pseudo-elements) */
:root main:not(:has(> article)) > div::before,
:root main:not(:has(> article)) > div::after {
  grid-column: 1 / -1;
  font-family: var(--fm), system-ui, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  font-size: 0.9rem;
  color: var(--primary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.85rem;
  margin: 1.6rem 0 0.2rem;
}
:root main:not(:has(> article)) > div::before {
  content: "La selección de Paloma — empieza por aquí";
  order: 2;
}
:root main:not(:has(> article)) > div::after {
  content: "El cuaderno — en orden de escritura";
  order: 5;
}

/* Base card */
:root main:not(:has(> article)) > div > div {
  order: 6;
  grid-column: span 3;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  padding: 1.9rem 2rem;
  display: flex;
  flex-direction: column;
}
:root main:not(:has(> article)) > div > div > p:first-of-type {
  font-family: var(--fm), system-ui, sans-serif;
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 0.7rem;
}
:root main:not(:has(> article)) > div > div > h2 {
  margin: 0 0 0.7rem; padding: 0; border: 0;
  font-family: var(--fh), Georgia, serif;
  font-size: 1.24rem; line-height: 1.3; font-weight: 600;
  letter-spacing: -0.005em;
}
:root main:not(:has(> article)) > div > div > h2 a {
  color: var(--primary); text-decoration: none;
}
:root main:not(:has(> article)) > div > div > h2 a:hover { color: var(--accent); }
:root main:not(:has(> article)) > div > div > p:nth-of-type(2) {
  font-size: 1rem; line-height: 1.6; color: #45444f;
  margin: 0 0 1.15rem; max-width: 64ch;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
/* CTA — hide the English "Continue Reading →", relabel in Spanish */
:root main:not(:has(> article)) > div > div > a {
  margin-top: auto; align-self: flex-start;
  font-size: 0; text-decoration: none;
}
:root main:not(:has(> article)) > div > div > a::after {
  content: "Leer el apunte →";
  font-family: var(--fm), system-ui, sans-serif;
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}
:root main:not(:has(> article)) > div > div > a:hover::after {
  color: var(--primary); border-color: var(--primary);
}

/* ── HERO (first card) ── */
:root main:not(:has(> article)) > div > div:nth-child(1) {
  order: 1;
  grid-column: 1 / -1;
  padding: clamp(2.4rem, 4vw, 3.4rem) clamp(2rem, 4vw, 3.4rem);
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  grid-template-rows: auto auto 1fr auto;
  column-gap: 2.6rem; row-gap: 0.55rem;
  border-color: rgba(38, 38, 58, 0.16);
  box-shadow: 0 2px 14px rgba(38, 38, 58, 0.07);
}
:root main:not(:has(> article)) > div > div:nth-child(1) > p:first-of-type {
  grid-column: 1 / -1; grid-row: 1;
  color: var(--accent); font-weight: 600; margin-bottom: 0.3rem;
}
:root main:not(:has(> article)) > div > div:nth-child(1) > p:first-of-type::before {
  content: "Apunte destacado · ";
}
:root main:not(:has(> article)) > div > div:nth-child(1) > h2 {
  grid-column: 1 / -1; grid-row: 2;
  font-family: var(--fd), Georgia, serif;
  font-weight: 400; font-size: clamp(2.1rem, 4.4vw, 3.3rem);
  line-height: 1.06; letter-spacing: 0.005em; margin: 0.1rem 0 0.4rem;
}
:root main:not(:has(> article)) > div > div:nth-child(1) > p:nth-of-type(2) {
  grid-column: 1 / 2; grid-row: 3;
  font-size: 1.2rem; line-height: 1.5; color: #3c3b47;
  -webkit-line-clamp: 4; max-width: 60ch; margin-bottom: 1.3rem;
}
:root main:not(:has(> article)) > div > div:nth-child(1) > p:nth-of-type(2)::first-letter {
  font-family: var(--fd), Georgia, serif;
  font-style: italic; font-size: 3.5em; line-height: 0.8;
  float: left; margin: 0.06em 0.1em 0 0;
  color: var(--moment);   /* moment colour — use 2 of 2 */
}
:root main:not(:has(> article)) > div > div:nth-child(1) > a { grid-column: 1 / 2; grid-row: 4; }
:root main:not(:has(> article)) > div > div:nth-child(1) > a::after {
  font-size: 0.82rem; letter-spacing: 0.14em;
}
/* Hero metadata rail (fills the right column so the row stays balanced) */
:root main:not(:has(> article)) > div > div:nth-child(1)::before {
  content: "Por Paloma Aguirre\A\A Ilustradora freelance\A Valencia\A\A Lectura · 6 min";
  white-space: pre-line;
  grid-column: 2 / 3; grid-row: 3 / 5;
  align-self: start;
  font-family: var(--fm), system-ui, sans-serif;
  font-size: 0.78rem; letter-spacing: 0.1em; line-height: 2;
  text-transform: uppercase; color: var(--muted);
  border-left: 1px solid var(--border); padding-left: 1.5rem;
}

/* ── Editor's picks (cards 2–4) ── */
:root main:not(:has(> article)) > div > div:nth-child(2),
:root main:not(:has(> article)) > div > div:nth-child(3),
:root main:not(:has(> article)) > div > div:nth-child(4) {
  order: 3;
  grid-column: span 2;
}

/* ── Journal (cards 5+) already default: order 6, span 3 ── */
:root main:not(:has(> article)) > div > div:nth-child(n + 5) {
  order: 6;
  grid-column: span 3;
}

/* ── PHOTO BAND BREAKS — the last two cards become full-width strips.
      nth-last-child keeps them pinned to the end regardless of card count.
      Rules come AFTER the journal rule so they win on equal specificity. ── */
:root main:not(:has(> article)) > div > div:nth-last-child(2),
:root main:not(:has(> article)) > div > div:last-child {
  grid-column: 1 / -1;
  min-height: 210px;
  margin: 1.8rem 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  border-radius: var(--r);
  overflow: hidden;
  background-color: var(--ink);
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
}
:root main:not(:has(> article)) > div > div:nth-last-child(2) > *,
:root main:not(:has(> article)) > div > div:last-child > * { display: none; }
:root main:not(:has(> article)) > div > div:nth-last-child(2)::before,
:root main:not(:has(> article)) > div > div:last-child::before {
  font-family: var(--fm), system-ui, sans-serif;
  font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.32em; font-size: 0.85rem;
  color: #FAF6EC; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}
/* Strip 1 — between picks and journal */
:root main:not(:has(> article)) > div > div:nth-last-child(2) {
  order: 4;
  background-image:
    linear-gradient(rgba(20, 24, 28, 0.55), rgba(20, 24, 28, 0.28)),
    url("/theme-assets/entry-photo.jpg");
  background-position: center 30%;
}
:root main:not(:has(> article)) > div > div:nth-last-child(2)::before { content: "Más abajo"; }
/* Strip 2 — closing band after the journal */
:root main:not(:has(> article)) > div > div:last-child {
  order: 7;
  background-image:
    linear-gradient(rgba(24, 22, 34, 0.58), rgba(24, 22, 34, 0.3)),
    url("/theme-assets/entry-photo.jpg");
  background-position: center 70%;
}
:root main:not(:has(> article)) > div > div:last-child::before { content: "Todas las entradas"; }

/* ══════════════════════════════════════════════════════════════════════
   ARTICLE + STATIC PAGES  —  main:has(> article) is the reading column.
   Real posts additionally have  main > time  and  main > aside.
   ══════════════════════════════════════════════════════════════════════ */

:root main:has(> article) {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(2.6rem, 5vw, 4.2rem) 1.5rem clamp(3rem, 5vw, 4.5rem);
}

/* Article headline (real posts) */
:root main:has(> time) > h1 {
  font-family: var(--fd), Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.5rem, 5.2vw, 3.7rem);
  line-height: 1.06; letter-spacing: 0.005em;
  margin: 0 0 0.35rem;
}
:root main:has(> time) > time {
  display: block;
  font-family: var(--fm), system-ui, sans-serif;
  text-transform: uppercase; letter-spacing: 0.18em;
  font-size: 0.78rem; color: var(--muted);
  margin: 0 0 2.4rem;
}

/* Static-page headline */
:root main:has(> article) > article > h1 {
  font-family: var(--fd), Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.3rem, 4.6vw, 3.2rem);
  line-height: 1.08; margin: 0 0 1.4rem;
}

/* Body measure + breathing */
:root main:has(> article) > article > p,
:root main:has(> article) > article > ul,
:root main:has(> article) > article > ol {
  font-size: 1.13rem; line-height: 1.78; max-width: 68ch;
}

/* Section headings with a dinkus break */
:root main:has(> article) > article > h2 {
  border: 0; padding: 0;
  font-size: 1.75rem; margin-top: 2.6em;
}
:root main:has(> article) > article > h2::before {
  content: "✷ ✷ ✷";
  display: block; text-align: center;
  color: var(--muted); opacity: 0.7;
  letter-spacing: 0.5em; font-size: 0.78rem;
  margin: 0 0 1.3rem; text-indent: 0.5em;
}

/* Hanging quote on blockquotes */
:root main:has(> article) > article > blockquote {
  position: relative; margin-left: 0.2rem;
}
:root main:has(> article) > article > blockquote::before {
  content: "\201C";
  position: absolute; left: -0.7rem; top: 0.35rem;
  font-family: var(--fd), Georgia, serif;
  font-size: 3.4rem; line-height: 1; color: var(--accent);
  opacity: 0.35;
}

/* Figures */
:root main:has(> article) figure { margin: 2rem 0; }
:root main:has(> article) figure img { border-radius: var(--r); }

/* Closing photo band — real posts only (has > time) */
:root main:has(> time) > article::after {
  content: "Lienzopixel";
  display: flex; align-items: center; justify-content: center;
  min-height: 200px; margin: 3.4rem 0 0;
  border-radius: var(--r); overflow: hidden;
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(20, 21, 36, 0.5), rgba(20, 21, 36, 0.32)),
    url("/theme-assets/entry-photo.jpg");
  background-size: cover; background-position: center 55%;
  background-repeat: no-repeat;
  font-family: var(--fd), Georgia, serif; font-style: italic;
  font-size: 1.7rem; color: #FAF6EC;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

/* Related articles block */
:root main:has(> aside) > aside {
  margin-top: 2.8rem; padding-top: 2rem;
  border-top: 1px solid var(--border);
}
:root main:has(> aside) > aside h4 { margin: 0 0 1.2rem; }
:root main:has(> aside) > aside > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
:root main:has(> aside) > aside > div > div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.1rem 1.3rem;
}
:root main:has(> aside) > aside > div > div a {
  font-family: var(--fh), Georgia, serif;
  color: var(--primary); text-decoration: none;
  line-height: 1.4;
}
:root main:has(> aside) > aside > div > div a:hover { color: var(--accent); }

/* ─── Recommendation / affiliate links → filled ultramarine pill ─── */
:root a[href^="/rec/"],
:root a[href^="/go/"] {
  display: inline-block;
  font-family: var(--fm), system-ui, sans-serif;
  font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; font-size: 0.82rem;
  color: #FAF6EC; background: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.55em 1.15em; border-radius: 6px;
  text-decoration: none;
}
:root a[href^="/rec/"]:hover,
:root a[href^="/go/"]:hover {
  background: var(--primary); border-color: var(--primary); color: #FAF6EC;
}

/* Footer */
:root body > footer {
  background: var(--primary);
  color: rgba(247, 243, 233, 0.72);
  text-align: center;
  padding: 2rem 1.5rem;
  margin-top: 0;
}
:root body > footer p { max-width: none; margin: 0; font-size: 0.9rem; }
:root body > footer a { color: rgba(247, 243, 233, 0.92); text-decoration: none; }
:root body > footer a:hover { color: #fff; text-decoration: underline; }

/* ══════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════ */

@media (max-width: 760px) {
  :root main:not(:has(> article)) > div {
    grid-template-columns: 1fr;
    row-gap: 2rem;
  }
  :root main:not(:has(> article)) > div > div,
  :root main:not(:has(> article)) > div > div:nth-child(2),
  :root main:not(:has(> article)) > div > div:nth-child(3),
  :root main:not(:has(> article)) > div > div:nth-child(4),
  :root main:not(:has(> article)) > div > div:nth-child(n + 5) {
    grid-column: 1 / -1;
  }
  /* Hero collapses to one column; metadata rail moves below the excerpt */
  :root main:not(:has(> article)) > div > div:nth-child(1) {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  :root main:not(:has(> article)) > div > div:nth-child(1) > p:nth-of-type(2),
  :root main:not(:has(> article)) > div > div:nth-child(1) > a { grid-column: 1 / -1; }
  :root main:not(:has(> article)) > div > div:nth-child(1)::before {
    grid-column: 1 / -1; grid-row: auto; order: 9;
    border-left: 0; padding-left: 0;
    border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 0.4rem;
  }
}
