*{margin:0;padding:0;box-sizing:border-box}
body{font-family:Georgia,'Times New Roman',serif;line-height:1.8;color:#222;background:#f4f1eb}
.footer-3d47fb{max-width:1100px;margin:0 auto;padding:0 24px}
.module-1a6df1{background:linear-gradient(135deg,#2c3e50,#34495e);color:#fff;padding:48px 0;text-align:center;margin-bottom:48px}
.module-1a6df1 h1{font-size:36px;letter-spacing:2px;text-transform:uppercase;margin-bottom:6px}
.module-1a6df1 p{font-size:16px;opacity:.8;font-style:italic}
.module-1a6df1 .content-66fbb6{color:#fff;text-decoration:none;font-size:20px;letter-spacing:1px;text-transform:uppercase}
.frame-98afa3{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:28px}
.module-2e01ba{background:#fff;border-radius:4px;box-shadow:0 2px 12px rgba(0,0,0,.08);padding:28px;transition:box-shadow .2s}
.module-2e01ba:hover{box-shadow:0 4px 20px rgba(0,0,0,.14)}
.module-2e01ba h2{font-size:22px;margin-bottom:10px;line-height:1.3}
.module-2e01ba h2 a{color:#2c3e50;text-decoration:none}
.module-2e01ba .layout-0455cb{font-size:12px;color:#888;margin-bottom:10px;text-transform:uppercase;letter-spacing:1px}
.module-2e01ba p{font-size:15px;color:#555;margin-bottom:14px}
.widget-572457{color:#e74c3c;text-decoration:none;font-weight:700;font-size:13px;text-transform:uppercase;letter-spacing:.5px}
.region-6fc9a8{max-width:780px;margin:0 auto;padding:0 24px 60px}
.region-6fc9a8 h1{font-size:36px;margin-bottom:10px;line-height:1.2}
.region-6fc9a8 .layout-0455cb{font-size:13px;color:#888;display:block;margin-bottom:28px;text-transform:uppercase;letter-spacing:1px}
.region-6fc9a8 h2{font-size:24px;margin:36px 0 14px}
.region-6fc9a8 h3{font-size:19px;margin:28px 0 10px}
.region-6fc9a8 p{margin-bottom:18px;font-size:17px}
.region-6fc9a8 ul,.region-6fc9a8 ol{margin:0 0 18px 28px}
.region-6fc9a8 a{color:#e74c3c}
.region-6fc9a8 img{max-width:100%;height:auto;border-radius:4px;margin:20px 0}
.widget-435e47{border-top:2px solid #ddd;padding:28px 0;margin-top:48px;text-align:center;font-size:13px;color:#888}
.widget-435e47 a{color:#888}
.page-ea03d0{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}
.header-149c79{background:#f9f3e3;padding:16px 20px;margin-top:28px;font-size:13px;color:#7a6230;border-radius:4px}
.container-6e34ae{font-size:11px;color:#888;margin:-22px 0 28px;text-transform:uppercase;letter-spacing:1.5px}
.wrapper-a3b922{margin:0 0 28px}
.frame-d4914d{width:100%;height:auto;border-radius:4px}
.region-0b5d23{border-top:2px solid #ddd;margin-top:40px;padding-top:24px}
.region-0b5d23 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}
.main-ed48d8{background:#fff;border-radius:4px;box-shadow:0 2px 12px rgba(0,0,0,.08);padding:22px 28px;margin-top:28px}
.main-ed48d8 p{font-size:15px;padding:4px 0;margin:0}
.main-ed48d8 .layout-0455cb{margin:0 8px 0 0;display:inline}
.main-ed48d8 a{color:#2c3e50;text-decoration:none}
.main-ed48d8 a:hover{color:#e74c3c}
/* === Theme === */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&family=Oswald:wght@400;700&display=swap');
body{font-family:'Roboto',sans-serif;color:#1A1A1A;background:#F9F9F9}
.module-1a6df1{background:#2D2D2D;color:#fff}
.module-1a6df1 h1{font-family:'Oswald',serif;color:#fff}
.module-1a6df1 p{color:rgba(255,255,255,.75)}
.module-1a6df1 a{color:#fff;text-decoration:none}
.card h2{font-family:'Oswald',serif}
.card h2 a{color:#2D2D2D}
.card h2 a:hover{color:#F28C28}
.read-more{color:#F28C28}
.article-content h1{font-family:'Oswald',serif}
.article-content h2{font-family:'Oswald',serif}
.article-content a{color:#F28C28}
.article-content img{border-radius:4px}
.affiliate-disclosure{border-radius:4px}
.ymyl-disclaimer{border-radius:4px}
/* === Custom === */
/* v.54210a — layout revision */
/* ================================================================
   ac-autocad-fr — custom.css  (editorial signature pass)
   Persona : Cédric Moreau, dessinateur ferraillage/coffrage (Nancy)
   Palette : navy blueprint + vélin chaud + bronze ocre + moment ocre brûlé
   Selectors are element/structural (+[class]/:root only to win specificity
   against the base layout.css class rules — never class NAMES, which the
   pipeline reseeds). Home = main:has(> div > div > h2); article = main:has(> article).
   Assets are layered under opaque gradients + solid fallbacks so a 404
   degrades to a solid editorial band, not an empty box.
   ================================================================ */

/* --- Fonts: @import is stripped at deploy; declare @font-face (position-independent) --- */
@font-face{font-family:'Source Serif 4';font-style:normal;font-weight:400 700;font-display:swap;src:url(https://fonts.gstatic.com/s/sourceserif4/v14/vEFI2_tTDB4M7-auWDN0ahZJW1gb8te1Xb7G.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212;}
@font-face{font-family:'Source Serif 4';font-style:normal;font-weight:400 700;font-display:swap;src:url(https://fonts.gstatic.com/s/sourceserif4/v14/vEFI2_tTDB4M7-auWDN0ahZJW1gV8te1Xb7GlMo.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+0300-04FF,U+1E00-1EFF,U+2020,U+20A0-20AB,U+2113;}
@font-face{font-family:'Source Serif 4';font-style:italic;font-weight:400 700;font-display:swap;src:url(https://fonts.gstatic.com/s/sourceserif4/v14/vEFK2_tTDB4M7-auWDN0ahZJW1gewtW_WpzEpMs.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2074,U+20AC,U+2122,U+2212;}
@font-face{font-family:'Source Serif 4';font-style:italic;font-weight:400 700;font-display:swap;src:url(https://fonts.gstatic.com/s/sourceserif4/v14/vEFK2_tTDB4M7-auWDN0ahZJW1gewtu_WpzEpMvsfA.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+0300-04FF,U+1E00-1EFF,U+2020,U+2113;}
@font-face{font-family:'Source Sans 3';font-style:normal;font-weight:400 700;font-display:swap;src:url(https://fonts.gstatic.com/s/sourcesans3/v19/nwpStKy2OAdR1K-IwhWudF-R3w8aZejf5Hc.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212;}
@font-face{font-family:'Source Sans 3';font-style:normal;font-weight:400 700;font-display:swap;src:url(https://fonts.gstatic.com/s/sourcesans3/v19/nwpStKy2OAdR1K-IwhWudF-R3wEaZejf5HdF8Q.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+0300-04FF,U+1E00-1EFF,U+2020,U+20A0-20AB,U+2113;}

/* --- Design tokens --- */
:root {
  --color-bg:            #F5F1E8;
  --color-surface:       #FCF8EF;
  --color-surface-2:     #F1EADB;
  --color-text:          #26272A;
  --color-text-muted:    #6A6660;
  --color-heading:       #17233A;
  --color-accent:        #1D4B7A;
  --color-accent-hover:  #163D65;
  --color-accent-2:      #B8722A;
  --color-moment:        #8C4A00;
  --color-border:        #D8D0C3;
  --color-border-light:  #E6DFD1;
  --font-heading: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-body:    'Source Sans 3', system-ui, -apple-system, sans-serif;
  --radius-card:  8px;
  --site-w:       1100px;
}

/* --- Base / sticky-footer shell (kills phantom blank area below footer + any h-scroll) --- */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.72;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body > main { flex: 1 0 auto; }
body > footer { flex: 0 0 auto; }

/* ================================================================
   1 · MASTHEAD — photo wash + monogram + serif wordmark + manifesto
   Shared across home (div>h1 + tagline p) and article (div>a).
   ================================================================ */
:root body > nav[class] {
  background-color: #16283F;
  background-image:
    linear-gradient(180deg, rgba(19,38,60,.86), rgba(19,38,60,.95)),
    url("/theme-assets/front-image.jpg");
  background-size: cover;
  background-position: center;
  border-bottom: 3px solid var(--color-accent-2);
  padding: 2.7rem 1.25rem 2.1rem;
  margin-bottom: 3.25rem;
  text-align: center;
}
:root body > nav[class] > div {
  max-width: 860px;
  margin: 0 auto;
  padding: 0;
}
/* Signature monogram — reinforced-concrete stirrup / column cross-section */
:root body > nav[class] > div::before {
  content: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2048%2048'%20fill='none'%20stroke='%23E8DFD0'%20stroke-width='2'%3E%3Crect%20x='6'%20y='6'%20width='36'%20height='36'%20rx='3'/%3E%3Cpath%20d='M16%2016%20L32%2032%20M32%2016%20L16%2032'%20stroke-width='1.3'%20opacity='.8'/%3E%3Ccircle%20cx='16'%20cy='16'%20r='3'%20fill='%23E8DFD0'%20stroke='none'/%3E%3Ccircle%20cx='32'%20cy='16'%20r='3'%20fill='%23E8DFD0'%20stroke='none'/%3E%3Ccircle%20cx='16'%20cy='32'%20r='3'%20fill='%23E8DFD0'%20stroke='none'/%3E%3Ccircle%20cx='32'%20cy='32'%20r='3'%20fill='%23E8DFD0'%20stroke='none'/%3E%3C/svg%3E");
  display: block;
  width: 46px;
  margin: 0 auto 0.7rem;
  line-height: 0;
  opacity: 0.92;
}
:root body > nav[class] h1 {
  color: #FBF7EF;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.95rem, 4.6vw, 2.7rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.1;
  margin: 0 0 0.45rem;
}
:root body > nav[class] h1 a { color: inherit; text-decoration: none; }
/* Article-page wordmark = the bare back-link */
:root body > nav[class] > div > a {
  display: inline-block;
  color: #FBF7EF;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.55rem, 3.4vw, 2.15rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
}
/* Tagline (home) */
:root body > nav[class] > p {
  color: rgba(251,247,239,.82);
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.55;
  max-width: 58ch;
  margin: 0 auto;
}
/* Manifesto — Cédric's voice, bronze hairline */
:root body > nav[class]::after {
  content: "« J'installe le pack, je le lance sur mes propres plans, puis je vous dis s'il vaut son prix. »";
  display: block;
  max-width: 54ch;
  margin: 1rem auto 0;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-accent-2);
  border-top: 1px solid rgba(232,223,208,.28);
  padding-top: 0.85rem;
}

/* ================================================================
   2 · HOMEPAGE  (main:has(> div > div > h2))
   Grid = first div (frame). Cards: 1=hero, 2-3=Editor's Picks,
   4+=Journal (chrono). Tail = last div.
   ================================================================ */
:root body > main[class]:has(> div > div > h2) {
  max-width: var(--site-w);
  margin: 0 auto;
  padding: 0 1.25rem 1rem;
}
:root body > main[class]:has(> div > div > h2) > div:first-of-type {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.6rem 2rem;
  margin: 0 0 4rem;
  padding: 0;
  align-items: stretch;
}

/* ---- Every card: warm surface, soft frame (RULE A/C/E).
   position:relative so section pseudo-bands anchor to their host card
   (full-width spans use width: calc(200% + column-gap)). ---- */
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div {
  position: relative;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  box-shadow: 0 1px 4px rgba(23,35,58,.05);
  padding: 1.7rem 1.9rem;
  margin: 0;
  max-width: none;
  display: flex;
  flex-direction: column;
}
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div:hover {
  border-color: var(--color-border);
  box-shadow: 0 6px 20px -8px rgba(23,35,58,.22);
}
/* kicker (date) → editorial meta */
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div > p:first-child {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 0.7rem;
}
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div > p:first-child::after {
  content: " · Cédric Moreau";
  color: var(--color-accent);
}
/* title */
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div > h2 {
  font-family: var(--font-heading);
  font-size: 1.34rem;
  font-weight: 600;
  line-height: 1.28;
  margin: 0 0 0.55rem;
}
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div > h2 a {
  color: var(--color-heading);
  text-decoration: none;
}
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div > h2 a:hover { color: var(--color-accent); }
/* excerpt — clamped to 3 lines for even card heights (RULE D/H) */
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div > p:nth-of-type(2) {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  max-width: 64ch;
  margin: 0 0 1.1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* read-more → quiet weighted link; French text swap */
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div > a {
  margin-top: auto;
  font-size: 0;
  text-decoration: none;
  align-self: flex-start;
}
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div > a::after {
  content: "Lire →";
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-2);
}
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div > a:hover::after { color: var(--color-accent); }

/* ---- HERO (card 1) — one loud voice ---- */
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div:nth-child(1) {
  grid-column: 1 / -1;
  padding: 2.6rem 2.9rem 2.5rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-accent);
  box-shadow: 0 12px 34px -20px rgba(23,35,58,.45);
}
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div:nth-child(1) > p:first-child {
  color: var(--color-accent-2);
  letter-spacing: 0.18em;
  margin-bottom: 0.9rem;
}
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div:nth-child(1) > p:first-child::before {
  content: "Dernier comparatif — ";
  font-weight: 700;
  color: var(--color-accent-2);
}
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div:nth-child(1) > p:first-child::after {
  content: " · par Cédric Moreau · lecture 6 min";
  color: var(--color-text-muted);
}
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div:nth-child(1) > h2 {
  font-size: clamp(1.9rem, 3.7vw, 2.75rem);
  font-style: italic;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-width: 20ch;
  margin-bottom: 0.9rem;
}
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div:nth-child(1) > p:nth-of-type(2) {
  font-size: 1.16rem;
  line-height: 1.6;
  color: var(--color-text);
  max-width: 62ch;
  -webkit-line-clamp: unset;
  display: block;
  overflow: visible;
}
/* drop cap — MOMENT COLOR #1 */
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div:nth-child(1) > p:nth-of-type(2)::first-letter {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 700;
  font-size: 3.4rem;
  line-height: 0.78;
  float: left;
  margin: 0.24rem 0.6rem 0 0;
  color: var(--color-moment);
}
/* hero CTA — outlined pill */
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div:nth-child(1) > a {
  border: 1.5px solid var(--color-accent);
  border-radius: 999px;
  padding: 0.55rem 1.45rem;
  transition: background-color .15s ease, color .15s ease;
}
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div:nth-child(1) > a::after {
  content: "Lire le comparatif →";
  color: var(--color-accent);
}
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div:nth-child(1) > a:hover { background-color: var(--color-accent); }
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div:nth-child(1) > a:hover::after { color: #FBF7EF; }

/* ---- EDITOR'S PICKS band (cards 2-3) — full-width label above (RULE B) ---- */
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div:nth-child(2),
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div:nth-child(3) {
  margin-top: 3.1rem;
}
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div:nth-child(2)::before {
  content: "La sélection de Cédric — à lire en premier";
  position: absolute;
  left: 0;
  top: -2.5rem;
  width: calc(200% + 2rem);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.55rem;
}

/* ---- STRIP 1 — photo band between Picks and Journal (RULE F) ---- */
/* Journal starts at card 4 (left col) & 5 (right col); reserve space, band is
   card4::before spanning the full grid width. */
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div:nth-child(4),
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div:nth-child(5) {
  margin-top: 15.5rem;
}
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div:nth-child(4)::before {
  content: "Par ordre d'écriture";
  position: absolute;
  left: 0;
  top: -14rem;
  width: calc(200% + 2rem);
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #141B24;
  background-image:
    linear-gradient(rgba(20,24,28,.55), rgba(20,24,28,.30)),
    url("/theme-assets/entry-photo.jpg");
  background-size: cover;
  background-position: center 30%;
  border-radius: var(--radius-card);
  color: #FBF7EF;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}

/* ---- Journal: lone trailing card self-balances to full width (RULE 4) ---- */
:root body > main[class]:has(> div > div > h2) > div:first-of-type > div:last-child:nth-child(even):nth-child(n+4) {
  grid-column: 1 / -1;
}

/* ================================================================
   3 · COMPACT TAIL — full-width archive index + STRIP 2 (RULE M7)
   IMPORTANT — DOM reality: this theme nests EVERY article card inside
   ONE <div class="frame">, so <main> has exactly ONE div child. There
   is NO separate trailing archive <div>; the lone frame is therefore
   simultaneously :first-of-type AND :last-of-type. Left unscoped, the
   tail rules below overran that single frame — wrapping the site's one
   article in an auto-fit grid under an "Articles précédents" band, i.e.
   the exact M7 break (a lone full-width row masquerading as an archive
   index). Every tail selector is now scoped :not(:first-of-type) so it
   fires ONLY for a genuine SECOND div. With the current single-article
   homepage this block is inert and the article renders as the hero
   feature card (section 2). If a real archive block is ever emitted it
   still becomes a full-width grid of boxed cream cards (auto-fit) with
   design parity to the journal cards above, STRIP 2 band absolutely
   positioned so empty tracks can't strand a lone card.
   ================================================================ */
:root body > main[class]:has(> div > div > h2) > div:last-of-type:not(:first-of-type) {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.75rem 1rem;
  align-items: stretch;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  max-width: none;
  margin: 0;
  padding: calc(210px + 2rem) 0 0;
}
/* STRIP 2 band — out of grid flow, reserved by the tail's padding-top */
:root body > main[class]:has(> div > div > h2) > div:last-of-type:not(:first-of-type)::before {
  content: "Articles précédents";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 210px;
  background-color: #141B24;
  background-image:
    linear-gradient(rgba(20,24,28,.55), rgba(20,24,28,.25)),
    url("/theme-assets/entry-photo.jpg");
  background-size: cover;
  background-position: center 70%;
  border-radius: var(--radius-card);
  color: #FBF7EF;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
/* archive entry — boxed cream card, same visual system as journal cards */
:root body > main[class]:has(> div > div > h2) > div:last-of-type:not(:first-of-type) > p {
  margin: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  box-shadow: 0 1px 4px rgba(23,35,58,.05);
  padding: 1.2rem 1.4rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
:root body > main[class]:has(> div > div > h2) > div:last-of-type:not(:first-of-type) > p:hover {
  border-color: var(--color-border);
  box-shadow: 0 6px 20px -8px rgba(23,35,58,.22);
}
/* date kicker — block, above the title (matches card meta line) */
:root body > main[class]:has(> div > div > h2) > div:last-of-type:not(:first-of-type) > p > span {
  display: block;
  margin: 0 0 0.5rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--color-text-muted);
}
/* title — serif, quiet weight for aperture at small size (RULE M9) */
:root body > main[class]:has(> div > div > h2) > div:last-of-type:not(:first-of-type) > p > a {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.32;
  color: var(--color-heading);
  text-decoration: none;
}
:root body > main[class]:has(> div > div > h2) > div:last-of-type:not(:first-of-type) > p > a:hover { color: var(--color-accent); }

/* ================================================================
   4 · ARTICLE PAGE  (main:has(> article))
   ================================================================ */
:root body > main[class]:has(> article) {
  max-width: 820px;
  margin: 0 auto;
}
:root body > main[class]:has(> article) > h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.95rem, 4vw, 2.65rem);
  font-style: italic;
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: var(--color-heading);
  margin: 0.4rem 0 0.6rem;
}
:root body > main[class]:has(> article) > time {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
:root body > main[class]:has(> article) article p {
  font-size: 1.06rem;
  line-height: 1.8;
  color: var(--color-text);
}
/* section headings — navy + hairline rule + dinkus */
:root body > main[class]:has(> article) article h2 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-accent);
  border-top: 1px solid var(--color-border);
  padding-top: 1.5rem;
  margin: 2.7rem 0 1rem;
}
:root body > main[class]:has(> article) article h2::before {
  content: "❧";
  display: block;
  color: var(--color-accent-2);
  font-size: 1.15rem;
  line-height: 1;
  margin-bottom: 0.55rem;
}
:root body > main[class]:has(> article) article h3 {
  font-family: var(--font-heading);
  color: var(--color-accent);
}
/* body links — navy underline; external emphasis in bronze */
:root body > main[class]:has(> article) article p a,
:root body > main[class]:has(> article) article li a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
:root body > main[class]:has(> article) article p a[href^="http"],
:root body > main[class]:has(> article) article li a[href^="http"] {
  color: var(--color-accent-2);
  font-weight: 600;
}
/* blockquote — hanging quote + MOMENT COLOR #2 */
:root body > main[class]:has(> article) article blockquote {
  position: relative;
  background: var(--color-surface-2);
  border-left: 3px solid var(--color-moment);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  margin: 1.8rem 0;
  padding: 1rem 1.3rem 1rem 2.6rem;
  font-family: var(--font-heading);
  font-style: italic;
}
:root body > main[class]:has(> article) article blockquote::before {
  content: "\201C";
  position: absolute;
  left: 0.55rem;
  top: 0.15rem;
  font-family: var(--font-heading);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--color-moment);
  opacity: 0.5;
}
:root body > main[class]:has(> article) article figure { margin: 2rem 0; }
/* related aside — warm cards, no white */
:root body > main[class]:has(> article) aside[class] > h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
:root body > main[class]:has(> article) aside[class] > div > div {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
  padding: 1rem 1.2rem;
}
:root body > main[class]:has(> article) aside[class] > div > div a {
  color: var(--color-heading);
  font-family: var(--font-heading);
  text-decoration: none;
}
:root body > main[class]:has(> article) aside[class] > div > div a:hover { color: var(--color-accent); }

/* ================================================================
   5 · FOOTER
   ================================================================ */
:root body > footer[class] {
  margin-top: 4rem;
  border-top: 3px solid var(--color-accent-2);
  background-color: var(--color-surface-2);
  color: var(--color-text-muted);
  padding: 2.4rem 1.25rem;
}
:root body > footer[class] a { color: var(--color-accent); }
:root body > footer[class] a:hover { color: var(--color-accent-hover); }

/* ================================================================
   6 · RESPONSIVE
   ================================================================ */
@media (max-width: 720px) {
  :root body > main[class]:has(> div > div > h2) > div:first-of-type {
    grid-template-columns: 1fr;
    gap: 1.6rem;
    margin-bottom: 2.8rem;
  }
  :root body > main[class]:has(> div > div > h2) > div:first-of-type > div:nth-child(1) { padding: 1.9rem 1.5rem; }
  :root body > main[class]:has(> div > div > h2) > div:first-of-type > div:nth-child(1) > h2 { max-width: none; }
  /* Picks label reflows to normal flow */
  :root body > main[class]:has(> div > div > h2) > div:first-of-type > div:nth-child(2) { margin-top: 2.6rem; }
  :root body > main[class]:has(> div > div > h2) > div:first-of-type > div:nth-child(3) { margin-top: 1.6rem; }
  :root body > main[class]:has(> div > div > h2) > div:first-of-type > div:nth-child(2)::before {
    position: static;
    display: block;
    width: auto;
    top: auto;
    margin-bottom: 0.9rem;
  }
  /* Strip 1: card 4 keeps the band reserve, card 5 back to normal gap */
  :root body > main[class]:has(> div > div > h2) > div:first-of-type > div:nth-child(4) { margin-top: 12rem; }
  :root body > main[class]:has(> div > div > h2) > div:first-of-type > div:nth-child(5) { margin-top: 1.6rem; }
  :root body > main[class]:has(> div > div > h2) > div:first-of-type > div:nth-child(4)::before {
    width: 100%;
    height: 150px;
    top: -11rem;
  }
  :root body > main[class]:has(> div > div > h2) > div:last-of-type:not(:first-of-type) { grid-template-columns: 1fr; padding-top: calc(150px + 1.6rem); }
  :root body > main[class]:has(> div > div > h2) > div:last-of-type:not(:first-of-type)::before { height: 150px; }
  :root body > nav[class] { padding: 2.1rem 1.1rem 1.8rem; }
}


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


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


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


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


/* premium-upgrade v1 */
/* premium editorial upgrade — style=Substack-modern overlay=55% grid=mixed scale=dramatic family=astro-grid */

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


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

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

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

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

