/* Dink & Carreau — branded after petanque.me (Provençal palette + type).
   Palette: warm paper, terracotta, olive, boule gold.
   Fonts: Crimson Pro (serif), Barlow (sans), Barlow Condensed (kickers). */
:root {
  --paper: #F5EDDB;
  --paper-deep: #EDE0C2;
  --ink: #1E1A14;
  --muted: #6B5E48;
  --line: #E2D4B0;
  --terra: #C4622C;
  --terra-dark: #8B3A10;
  --olive: #5C6B3A;
  --olive-dark: #3A4525;
  --gold: #C8942A;
  --gold-bright: #D4A840;
  --serif: "Crimson Pro", Georgia, "Times New Roman", serif;
  --sans: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --condensed: "Barlow Condensed", "Barlow", -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
}

/* Boule-gold top bar, echoing the petanque.me favicon gradient */
.boulebar {
  height: 5px;
  background: linear-gradient(to right, var(--gold-bright) 0%, var(--gold) 30%, var(--terra) 65%, var(--olive) 100%);
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
.wrap.narrow { max-width: 720px; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}
.brand { text-decoration: none; color: var(--ink); display: flex; align-items: center; gap: 0.55rem; }
.brand-mark { display: block; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; letter-spacing: 0.01em; }
.amp { color: var(--terra); font-style: italic; }
.main-nav { display: flex; gap: 1.25rem; margin-left: auto; align-items: center; }
.main-nav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.main-nav a:hover { color: var(--terra); }
.main-nav a[aria-current="page"] { color: var(--terra); border-bottom: 2px solid var(--terra); }
.nav-search {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-left: 1.25rem; padding-left: 1.25rem;
  border-left: 1px solid var(--line);
  font-family: var(--serif); font-style: italic; font-size: 1.02rem;
  color: var(--muted); text-decoration: none; white-space: nowrap;
}
.nav-search:hover { color: var(--terra); }
.nav-search[aria-current="page"] { color: var(--terra); }
.lang-switch {
  display: flex; align-items: stretch;
  border: 1px solid var(--line); border-radius: 999px; overflow: hidden;
  font-size: 0.85rem; margin-left: 1.25rem;
}
.lang-opt { padding: 0.32rem 0.85rem; text-decoration: none; color: var(--muted); white-space: nowrap; }
.lang-opt.active { background: var(--terra); color: #fff; font-weight: 700; }
a.lang-opt:hover { background: rgba(196,98,44,0.12); color: var(--ink); }
/* Mobile-only short language labels (EN/FR); hidden on desktop. */
.lang-short { display: none; }
/* Search + language toggle group: invisible wrapper on desktop so the
   header keeps its single-row flex layout; becomes a right-aligned row
   on mobile so the header collapses to exactly two lines. */
.header-tools { display: contents; }

/* Hero */
.hero { padding: 4.5rem 0 3rem; text-align: left; }
.kicker {
  font-family: var(--condensed);
  font-size: 1rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terra);
  font-weight: 600;
  margin: 0 0 1rem;
}
.hero h1, .page-head h1, .article h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.08;
  margin: 0 0 1.25rem;
  font-weight: 700;
}
.lede { font-size: 1.25rem; color: var(--muted); max-width: 640px; margin: 0; }

/* Stat strip */
.stats { background: var(--ink); color: var(--paper); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 1rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
}
.stat { display: flex; flex-direction: column; gap: 0.25rem; border-left: 3px solid var(--gold); padding-left: 1rem; }
.stat-num { font-family: var(--serif); font-size: 2rem; font-weight: 700; }
.stat-label { font-size: 0.85rem; color: #cfc6b2; }

/* Sections & cards */
.sections, .latest, .section-list { padding: 3rem 0; }
.sections h2, .latest h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  margin: 0 0 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--ink);
}
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.cards-2x2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 640px) { .cards-2x2 { grid-template-columns: 1fr; } }
.card {
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(30, 26, 20, 0.12); }
.card-visual {
  display: block;
  height: 110px;
  background-color: var(--terra);
  background-image:
    radial-gradient(circle at 76% 32%, rgba(255,255,255,.30) 0 30px, rgba(255,255,255,.10) 31px 40px, transparent 41px),
    radial-gradient(circle at 20% 80%, rgba(0,0,0,.16) 0 24px, transparent 25px),
    linear-gradient(135deg, rgba(255,255,255,.12), rgba(0,0,0,.14));
}
.card-visual img { width: 100%; height: 110px; object-fit: cover; display: block; }
.card[data-section="culture"] .card-visual { background-color: #C4622C; }
.card[data-section="news"] .card-visual { background-color: #31404d; }
.card[data-section="sports"] .card-visual { background-color: #5C6B3A; }
.card[data-section="dink-carreau"] .card-visual { background-color: #C8942A; }
.card-body { display: block; padding: 1.25rem 1.5rem 1.5rem; }
.card h3 { font-family: var(--serif); font-size: 1.35rem; margin: 0 0 0.5rem; }
.card p { color: var(--muted); margin: 0 0 1rem; font-size: 0.95rem; }
.card-link { font-weight: 700; color: var(--terra); font-size: 0.9rem; }

/* Article byline, tags, hero */
.byline { color: var(--muted); font-size: 0.92rem; margin: 0.75rem 0 0; }
.tags { margin: 0.75rem 0 0; }
.tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--terra);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  margin: 0 0.4rem 0.4rem 0;
  text-decoration: none;
}
.tag:hover { background: var(--terra); color: #fff; border-color: var(--terra); }
.article-hero { width: 100%; border-radius: 10px; margin: 1.25rem 0 0; }
.article-hero img { width: 100%; height: auto; display: block; border-radius: 10px; }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 1.25rem; margin-top: 2.5rem; }
.pagination a { font-weight: 700; color: var(--terra); text-decoration: none; }
.pagination a:hover { text-decoration: underline; }
.page-info { color: var(--muted); font-size: 0.9rem; }

/* Hero CTA + Start Here */
.hero-cta {
  display: inline-block;
  margin-top: 1.25rem;
  background: var(--terra);
  color: #fff;
  font-weight: 700;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
}
.hero-cta:hover { background: #a94f22; color: #fff; }
.start-row {
  display: flex; gap: 1.25rem; align-items: flex-start;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--ink);
}
.start-row:hover h3 { color: var(--terra); }
.start-num { font-family: var(--serif); font-size: 1.6rem; color: var(--terra); min-width: 2.5rem; line-height: 1.2; }
.start-row h3 { font-family: var(--serif); font-size: 1.25rem; margin: 0.15rem 0 0.35rem; }
.start-row p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* Search */
.search-box { display: flex; gap: 0.5rem; margin: 1.5rem 0 2rem; }
.search-box input {
  flex: 1;
  font: inherit;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.search-result { display: block; padding: 1rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.search-result h3 { font-family: var(--serif); font-size: 1.2rem; margin: 0 0 0.25rem; }
.search-result p { color: var(--muted); margin: 0; font-size: 0.92rem; }
.search-result .kicker { margin-bottom: 0.25rem; }

/* Article teasers */
.teaser { padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.teaser-kicker { font-family: var(--condensed); font-size: 0.95rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--olive); font-weight: 600; margin: 0 0 0.35rem; }
.teaser h3 { font-family: var(--serif); font-size: 1.45rem; margin: 0 0 0.35rem; }
.teaser h3 a { color: var(--ink); text-decoration: none; }
.teaser h3 a:hover { color: var(--terra); }
.teaser p { color: var(--muted); margin: 0; }

/* Page head + article */
.page-head { padding: 3rem 0 1rem; }
.page-body { max-width: 720px; color: var(--muted); font-size: 1.1rem; }
.article { padding: 3rem 0 4rem; }
.prose { font-size: 1.1rem; }
.prose p { margin: 0 0 1.25em; }
.prose em { color: inherit; }
.prose h2 { font-family: var(--serif); font-size: 1.55rem; margin: 2em 0 0.75em; }
.prose blockquote {
  margin: 1.5em 0;
  padding: 0.25em 0 0.25em 1.25em;
  border-left: 3px solid var(--terra);
  font-family: var(--serif);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--ink);
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--paper-deep); margin-top: 2rem; }
.footer-inner { padding-top: 2rem; padding-bottom: 2rem; }
.footer-brand { font-family: var(--serif); font-weight: 700; margin: 0 0 0.25rem; }
.footer-note { color: var(--muted); font-size: 0.9rem; margin: 0; }

@media (max-width: 700px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .header-inner { flex-wrap: wrap; gap: 0.55rem 1rem; }
  /* Line 1: brand left, search + language toggle right. */
  .header-tools {
    display: flex; align-items: center; gap: 0.7rem;
    margin-left: auto;
  }
  .nav-search { margin-left: 0; padding-left: 0; border-left: none; }
  .nav-search span { display: none; } /* icon only, keeps line 1 compact */
  .lang-switch { margin-left: 0; }
  .lang-switch .lang-full { display: none; }
  .lang-switch .lang-short { display: inline; }
  /* Line 2: the nav links, centered and a touch larger. Wraps gracefully
     on narrow screens (e.g. the long FR label) while staying centered. */
  .main-nav { order: 3; flex: 0 0 100%; margin-left: 0; gap: 0.5rem 1.1rem; justify-content: center; flex-wrap: wrap; }
  .main-nav a { font-size: 0.95rem; white-space: nowrap; }
  /* French labels run longer: slightly smaller type and tighter gaps so
     all four fit on one centered line at iPhone widths. */
  html[lang="fr"] .main-nav { gap: 0.5rem 0.8rem; }
  html[lang="fr"] .main-nav a { font-size: 0.85rem; }
}

/* Banner ad slot (fracmoo.com leaderboard, on every page) */
.ad-slot { padding: 1.25rem 1rem 0.25rem; }

/* Homepage magazine-style latest section */
.mag { display: grid; gap: 2rem; }
.mag-lead { border-bottom: 2px solid var(--terra); padding-bottom: 1.75rem; }
.mag-lead h3 { font-family: var(--serif); font-size: 2.4rem; line-height: 1.1; margin: 0.4rem 0 0.75rem; }
.mag-lead h3 a { color: var(--ink); text-decoration: none; }
.mag-lead h3 a:hover { color: var(--terra); }
.mag-dek { font-size: 1.2rem; color: var(--muted); max-width: 62ch; }
.mag-meta { font-size: 0.85rem; color: var(--muted); letter-spacing: 0.04em; margin: 0.75rem 0 0; }
.mag-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.mag-item h4 { font-family: var(--serif); font-size: 1.35rem; line-height: 1.2; margin: 0.35rem 0 0.5rem; }
.mag-item h4 a { color: var(--ink); text-decoration: none; }
.mag-item h4 a:hover { color: var(--terra); }
.mag-item p { color: var(--muted); font-size: 0.98rem; margin: 0; }
.mag-kicker { font-family: var(--condensed); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem; color: var(--terra); margin: 0; }

@media (max-width: 700px) {
  .mag-row { grid-template-columns: 1fr; }
  .mag-lead h3 { font-size: 1.8rem; }
}

/* Footer legal links */
.footer-legal { margin-top: 1rem; display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-legal a { color: var(--muted); font-size: 0.9rem; text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.footer-legal a:hover { color: var(--terra); border-bottom-color: var(--terra); }

/* Cookie consent banner */
.dc-cookie {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 500;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  background: var(--paper-deep); border-top: 2px solid var(--gold);
  padding: 1rem 170px 1rem 1.75rem; /* right padding clears Netlify's fixed "Powered by Netlify" badge */
  transform: translateY(100%); transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 -6px 24px rgba(30, 26, 20, 0.12);
}
.dc-cookie.visible { transform: translateY(0); }
/* Text takes available space up to ~two lines; it only wraps further when the
   buttons crowd it on narrower screens. Buttons stay vertically centered. */
.dc-cookie p { margin: 0; font-size: 0.92rem; color: var(--muted); line-height: 1.5; flex: 1 1 20rem; max-width: 45rem; }
.dc-cookie p a { color: var(--terra); }
.dc-cookie-btns { display: flex; gap: 0.75rem; flex-shrink: 0; }
.dc-cookie-accept {
  font-family: var(--sans); font-size: 0.85rem; font-weight: 700;
  background: var(--terra); color: #fff; border: none;
  padding: 0.6rem 1.5rem; cursor: pointer; transition: background 0.25s;
}
.dc-cookie-accept:hover { background: var(--terra-dark); }
.dc-cookie-decline {
  font-family: var(--sans); font-size: 0.85rem;
  background: none; color: var(--muted);
  border: 1px solid var(--line); padding: 0.6rem 1.25rem; cursor: pointer; transition: all 0.25s;
}
.dc-cookie-decline:hover { border-color: var(--muted); color: var(--ink); }

@media (max-width: 700px) {
  .dc-cookie { padding: 1rem 125px 1rem 1.25rem; } /* keep clear of Netlify badge on small screens */
}

/* ---------- Ad slots ---------- */
.ad-slot { padding: 1.25rem 1rem 0.25rem; }
.ad-slot-bottom { padding: 2.5rem 1rem 3rem; }
.ad-slot-mid { padding: 2.5rem 1rem; }
.ad-slot-incontent { padding: 1.5rem 0; }

/* Related articles */
.related { padding: 2.5rem 1rem 3.5rem; }
.related h2 { font-family: var(--serif); font-size: 1.6rem; margin: 0 0 1.25rem; }
.related .cards { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ad-label {
  text-align: center;
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.65;
  margin: 0 0 0.5rem;
}

/* Fluid ad slot: the fixed 728x90 creative scales down to fit any viewport.
   --ad-scale is a pure number: min(full size, viewport fit). overflow:hidden
   clips the 728px layout box so the page never scrolls sideways on mobile. */
.za-ad-slot {
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  --ad-scale: 1;
}
.za-ad-leaderboard {
  max-width: 728px;
  --ad-scale: min(1, calc((100vw - 32px) / 728));
  height: calc(90px * var(--ad-scale));
}
.za-ad-small {
  max-width: 468px;
  --ad-scale: min(0.6429, calc((100vw - 32px) / 728));
  height: calc(90px * var(--ad-scale));
}
.za-ad-scaler {
  width: 728px;
  height: 90px;
  transform: scale(var(--ad-scale));
  transform-origin: top left;
}

/* Zenas Aquila creative — scoped to .za-ad-wrap */
.za-ad-wrap *,
.za-ad-wrap *::before,
.za-ad-wrap *::after { box-sizing: border-box; margin: 0; padding: 0; }
.za-ad-wrap {
  display: block;
  width: 728px;
  height: 90px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #1A1410;
  border: 1px solid rgba(212,168,83,0.25);
  text-decoration: none;
}
.za-ad-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 40% 120% at 18% 50%, rgba(124,58,30,0.5) 0%, transparent 65%),
    radial-gradient(ellipse 30% 100% at 50% 50%, rgba(193,126,58,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.za-ad-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
  opacity: 0.5;
  pointer-events: none;
}
.za-hairline-top, .za-hairline-bottom {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(212,168,83,0.6) 20%, rgba(212,168,83,0.6) 80%, transparent);
  z-index: 5;
}
.za-hairline-top    { top: 0; }
.za-hairline-bottom { bottom: 0; }
.za-rings {
  position: absolute;
  left: 54px;
  top: 50%;
  transform: translateY(-50%);
  width: 80px;
  height: 80px;
  z-index: 2;
}
.za-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(212,168,83,0.1);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: za-ring-pulse 5s ease-out infinite;
}
.za-ring:nth-child(1) { width: 24px; height: 24px; animation-delay: 0s;   border-color: rgba(212,168,83,0.28); }
.za-ring:nth-child(2) { width: 42px; height: 42px; animation-delay: 0.7s; }
.za-ring:nth-child(3) { width: 62px; height: 62px; animation-delay: 1.4s; }
.za-ring:nth-child(4) { width: 82px; height: 82px; animation-delay: 2.1s; }
.za-v-divider {
  position: absolute;
  left: 118px;
  top: 12px; bottom: 12px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(212,168,83,0.35) 30%, rgba(212,168,83,0.35) 70%, transparent);
  z-index: 3;
}
.za-text-block {
  position: absolute;
  left: 138px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
}
.za-eyebrow {
  font-family: 'Cormorant SC', serif;
  font-size: 8px;
  letter-spacing: 0.45em;
  color: rgba(212,168,83,0.65);
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}
.za-name {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 32px;
  letter-spacing: 0.05em;
  line-height: 1;
  color: #FAF6EE;
  display: block;
  margin-bottom: 5px;
  animation: za-shimmer 6s ease-in-out infinite;
}
.za-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(193,126,58,0.85);
  display: block;
}
.za-waveform {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 2px;
  height: 44px;
  z-index: 3;
}
.za-waveform span {
  display: block;
  width: 2px;
  background: linear-gradient(to top, #7C3A1E, #C17E3A);
  border-radius: 2px;
  animation: za-wv 1.5s ease-in-out infinite;
  opacity: 0.55;
}
.za-waveform span:nth-child(1)  { height: 10px; animation-delay: 0.00s; }
.za-waveform span:nth-child(2)  { height: 20px; animation-delay: 0.08s; }
.za-waveform span:nth-child(3)  { height: 32px; animation-delay: 0.16s; }
.za-waveform span:nth-child(4)  { height: 24px; animation-delay: 0.24s; }
.za-waveform span:nth-child(5)  { height: 38px; animation-delay: 0.32s; }
.za-waveform span:nth-child(6)  { height: 18px; animation-delay: 0.40s; }
.za-waveform span:nth-child(7)  { height: 40px; animation-delay: 0.48s; }
.za-waveform span:nth-child(8)  { height: 28px; animation-delay: 0.56s; }
.za-waveform span:nth-child(9)  { height: 34px; animation-delay: 0.64s; }
.za-waveform span:nth-child(10) { height: 16px; animation-delay: 0.72s; }
.za-waveform span:nth-child(11) { height: 26px; animation-delay: 0.80s; }
.za-waveform span:nth-child(12) { height: 12px; animation-delay: 0.88s; }
.za-cta-block {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}
.za-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(193,126,58,0.7);
  background: linear-gradient(135deg, rgba(124,58,30,0.5), rgba(193,126,58,0.2));
  color: #F5EDD8;
  font-family: 'Cormorant SC', serif;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 9px 20px;
  text-decoration: none;
  transition: all 0.35s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.za-cta-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(212,168,83,0.2), transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.za-ad-wrap:hover .za-cta-btn::after { opacity: 1; }
.za-ad-wrap:hover .za-cta-btn {
  border-color: #D4A853;
  box-shadow: 0 0 20px rgba(193,126,58,0.3);
}
.za-cta-badge {
  font-family: 'Raleway', sans-serif;
  font-size: 7.5px;
  font-weight: 300;
  letter-spacing: 0.18em;
  color: rgba(212,168,83,0.45);
  text-transform: uppercase;
  white-space: nowrap;
}
.za-ad-wrap:hover {
  border-color: rgba(212,168,83,0.5);
  box-shadow: 0 4px 30px rgba(124,58,30,0.35);
}
@keyframes za-ring-pulse {
  0%   { opacity: 0; transform: translate(-50%,-50%) scale(0.7); }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.25); }
}
@keyframes za-shimmer {
  0%, 100% { color: #FAF6EE; }
  50%       { color: #D4A853; }
}
@keyframes za-wv {
  0%, 100% { transform: scaleY(0.5); opacity: 0.4; }
  50%       { transform: scaleY(1.0); opacity: 0.75; }
}

/* Guard: never let fixed-width ad internals cause sideways scrolling */
body { overflow-x: clip; }

/* ============ Redesign draft (Oct 2026): active, modern homepage ============
   Keeps palette, type and brand; replaces the template-style homepage with
   a dateline strip, top-story feature, news rail and numbered section bands. */

/* Dateline strip */
.dateline { border-bottom: 1px solid var(--line); background: var(--paper); }
.dateline-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 0.55rem; padding-bottom: 0.55rem; }
.dateline p { margin: 0; font-family: var(--condensed); font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.dateline a { color: var(--terra); text-decoration: none; font-weight: 700; }
.dateline a:hover { text-decoration: underline; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--terra); margin-right: 0.55rem; vertical-align: 1px; animation: live-pulse 2.2s ease-in-out infinite; }
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* Top story feature */
.topstory { padding: 3.25rem 0; }
.topstory-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; }
.topstory-title { font-family: var(--serif); font-weight: 700; font-size: clamp(2.4rem, 5.2vw, 3.9rem); line-height: 1.04; letter-spacing: -0.01em; margin: 0 0 1rem; }
.topstory-title a { color: var(--ink); text-decoration: none; }
.topstory-title a:hover { color: var(--terra); }
.topstory-dek { font-size: 1.2rem; color: var(--muted); margin: 0 0 0.25rem; max-width: 34rem; }
.topstory-img { display: block; }
.topstory-img img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; box-shadow: 14px 14px 0 var(--terra); display: block; transition: transform 0.25s ease; }
.topstory-img:hover img { transform: translate(-4px, -4px); }
.btn-read { display: inline-block; margin-top: 1.4rem; background: var(--ink); color: var(--paper); font-weight: 700; padding: 0.75rem 1.75rem; border-radius: 999px; text-decoration: none; }
.btn-read:hover { background: var(--terra); color: #fff; }

/* Section headings: condensed uppercase with a heavy rule */
.block-head { border-bottom: 3px solid var(--ink); margin-bottom: 1.75rem; padding-bottom: 0.55rem; }
.block-head h2 { font-family: var(--condensed); font-size: 1.1rem; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 700; margin: 0; }

/* Latest rail: newsy thumb cards, 2x2 with the Explore card filling slot 4 */
.rail { padding: 3rem 0; }
.rail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.rail-card { display: flex; gap: 1rem; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 1rem; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.rail-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(30, 26, 20, 0.12); }
.rail-thumb { flex: 0 0 110px; }
.rail-thumb img { width: 110px; height: 110px; object-fit: cover; border-radius: 6px; display: block; }
.rail-body { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.rail-title { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; line-height: 1.25; }
.rail-card:hover .rail-title { color: var(--terra); }
.rail-meta { font-size: 0.8rem; color: var(--muted); margin-top: auto; }

/* Compact section cards: 2x2 grid on desktop, single column when narrow */
.bands { padding: 3rem 0; }
.bands-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.band-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 1.25rem 1.35rem; text-decoration: none; color: var(--ink); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.band-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(30, 26, 20, 0.12); }
.band-body { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.band-card-title { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; line-height: 1.2; }
.band-card:hover .band-card-title { color: var(--terra); }
.band-card-dek { color: var(--muted); font-size: 0.95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.band-card-meta { font-size: 0.8rem; color: var(--muted); }

/* Tablet portrait: keep magazine-style side-by-side proportions instead of
   stacking everything full-width (which made images oversized on iPad). */
@media (max-width: 1000px) {
  .topstory-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .rail-grid { grid-template-columns: 1fr 1fr; }
  .bands-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .topstory-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .topstory-img { order: -1; }
  .topstory-img img { box-shadow: 8px 8px 0 var(--terra); }
  .rail-grid { grid-template-columns: 1fr; }
  .bands-grid { grid-template-columns: 1fr; }
  .dateline-inner { flex-wrap: wrap; gap: 0.3rem 1rem; }
}

/* Explore card (Latest rail slot 4): dark card with section links */
.explore-card { background: var(--ink); border-color: var(--ink); flex-direction: column; justify-content: center; }
.explore-card .mag-kicker { color: var(--gold-bright); }
.explore-body { display: flex; flex-direction: column; gap: 0.75rem; }
.explore-links { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1rem; }
.explore-links a { color: var(--paper); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.explore-links a:hover { color: var(--gold-bright); }
.explore-links a span { color: var(--terra); }

/* Previous grids: 4 columns, one row of articles per publishing day */
.mag-row-4 { grid-template-columns: repeat(4, 1fr); }

/* Previous section: publishing-day group headings */
.prev-day { font-family: var(--condensed); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.95rem; color: var(--muted); margin: 2.25rem 0 1rem; }
.previous .topics-card { margin-top: 2.25rem; }

/* Topics card (Previous grid last slot): tag cloud */
.topics-card { background: var(--paper-deep); border: 1px solid var(--line); border-radius: 10px; padding: 1.25rem; }
.topics-cloud { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0; }
.topics-cloud .tag { margin: 0; }
.topics-more { margin: 0.5rem 0 0; }
.topics-more a { font-weight: 700; color: var(--terra); text-decoration: none; font-size: 0.9rem; }
.topics-more a:hover { text-decoration: underline; }

@media (max-width: 1000px) {
  .mag-row-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .mag-row-4 { grid-template-columns: 1fr; }
  .explore-links { grid-template-columns: 1fr 1fr; }
}

/* Glossary index: dense alphabetical list, no thumbnails */
.glossary-index { padding: 1rem 0 3.5rem; }
.glossary-cols { columns: 2; column-gap: 3.5rem; }
.glossary-group { break-inside: avoid; margin-bottom: 1.5rem; }
.glossary-letter {
  font-family: var(--cond); font-weight: 700; font-size: 1.35rem;
  color: var(--terra); margin: 0 0 0.15rem; padding-bottom: 0.25rem;
  border-bottom: 2px solid var(--terra);
}
.glossary-row {
  display: flex; gap: 0.75rem; align-items: baseline;
  padding: 0.5rem 0; border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.glossary-row:hover .glossary-term { color: var(--terra); }
.glossary-term { font-weight: 600; color: var(--ink); white-space: nowrap; }
.glossary-def { color: var(--muted); font-size: 0.92rem; }
@media (max-width: 700px) { .glossary-cols { columns: 1; } }

/* ---------- Muse AI referral banner — matches the Muse "Invite friends" sheet ---------- */
/* Light card, grey code pill, blue pill CTA. Desktop: fixed 728x90 via .za-ad-scaler.
   Mobile: break out of the scaler — full-width stacked card, readable text. */
.dc-muse-ad-wrap *,
.dc-muse-ad-wrap *::before,
.dc-muse-ad-wrap *::after { box-sizing: border-box; margin: 0; padding: 0; }
.dc-muse-ad-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 728px;
  height: 90px;
  padding: 10px 18px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #FFFFFF;
  border: 1px solid #E8E8E8;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  text-decoration: none;
}
.dc-muse-ad-wrap:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.10); }
.dc-muse-chars { display: flex; gap: 2px; flex-shrink: 0; align-items: center; font-size: 30px; line-height: 1; }
.dc-muse-left { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dc-muse-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 20px;
  line-height: 1.15;
  color: #111111;
  white-space: nowrap;
}
.dc-muse-sub {
  font-family: var(--sans);
  font-size: 11.5px;
  line-height: 1.4;
  color: #444444;
}
.dc-muse-sub b { color: #111111; }
.dc-muse-right { display: flex; flex-direction: column; gap: 7px; flex-shrink: 0; width: 168px; align-items: stretch; }
.dc-muse-code-box {
  display: block;
  background: #EDEEF0;
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
}
.dc-muse-code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.08em;
  line-height: 1.1;
  color: #111111;
}
.dc-muse-cta-btn {
  display: block;
  background: #2F7CF6;
  color: #fff;
  font-family: var(--sans);
  font-size: 13px; font-weight: 700;
  padding: 9px 10px;
  border-radius: 999px;
  white-space: nowrap;
  text-align: center;
}
.dc-muse-ad-wrap:hover .dc-muse-cta-btn { background: #1E63D6; }

/* Mobile: full-width stacked card — no more tiny scaled-down 728x90. */
@media (max-width: 700px) {
  .za-ad-slot:has(.dc-muse-ad-wrap),
  .za-ad-leaderboard:has(.dc-muse-ad-wrap),
  .za-ad-small:has(.dc-muse-ad-wrap) {
    max-width: none;
    height: auto;
    overflow: visible;
    --ad-scale: 1;
  }
  .za-ad-slot:has(.dc-muse-ad-wrap) .za-ad-scaler {
    width: 100%;
    height: auto;
    transform: none;
  }
  .dc-muse-ad-wrap {
    width: 100%;
    height: auto;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 16px;
    gap: 12px;
  }
  .dc-muse-chars { justify-content: center; font-size: 34px; }
  .dc-muse-left { text-align: center; align-items: center; }
  .dc-muse-title { font-size: 22px; white-space: normal; }
  .dc-muse-sub { font-size: 13.5px; white-space: normal; max-width: 34rem; }
  .dc-muse-right { width: 100%; }
  .dc-muse-code { font-size: 20px; }
  .dc-muse-cta-btn { font-size: 15px; padding: 12px; }
}

/* In-article banners: full width of the article column on desktop (not 468px centered). */
@media (min-width: 701px) {
  .article .ad-slot-incontent,
  .article .ad-slot-mid { padding-left: 0; padding-right: 0; }
  .article .za-ad-slot:has(.dc-muse-ad-wrap),
  .article .za-ad-small:has(.dc-muse-ad-wrap) {
    max-width: none;
    width: 100%;
    height: auto;
    overflow: visible;
    --ad-scale: 1;
  }
  .article .za-ad-slot:has(.dc-muse-ad-wrap) .za-ad-scaler {
    width: 100%;
    height: auto;
    transform: none;
  }
  .article .dc-muse-ad-wrap { width: 100%; height: auto; min-height: 90px; }
}
