/* =============================================
   BLACK Theme — blackout edition for Blackishere.com
   ============================================= */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* BLACK theme palette — pure black canvas, gray text panels, white accent. */
  --red:         #f2f2f2;   /* accent (was crimson): near-white */
  --red-dark:    #c9c9c9;   /* accent hover */
  --black:       #0d0d0d;   /* deep surface: header, top bar, dark buttons */
  --charcoal:    #161616;   /* dark panel */
  --ink:         #d4d4d4;   /* body text on gray panels */
  --mid:         #b0b0b0;   /* secondary text */
  --muted:       #969696;   /* tertiary text */
  --subtle:      #7c7c7c;   /* faintest text */
  --border:      #262626;
  --border-mid:  #3a3a3a;
  --bg:          #000000;   /* page canvas: pure black */
  --bg-card:     #1a1a1a;   /* gray text areas / cards */
  --bg-alt:      #202020;   /* alt gray panel */
  --bg-elev:     #242424;   /* elevated gray (inputs, quotes) */
  --white:       #ffffff;
  --text:        #f5f5f5;   /* headings / strong text */
  --accent-ink:  #0a0a0a;   /* text sitting on the white accent */
  --max-w:       1400px;
  --font-head:   'Barlow Condensed', sans-serif;
  --font-body:   'WF Visual Sans', Arial, Helvetica, sans-serif;
  --font-ui:     'WF Visual Sans', Arial, Helvetica, sans-serif;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.5), 0 1px 2px rgba(0,0,0,.35);
  --shadow-md:   0 8px 28px rgba(0,0,0,.55), 0 2px 6px rgba(0,0,0,.4);
  --transition:  .2s cubic-bezier(.4,0,.2,1);
  --transition-bounce: .25s cubic-bezier(.34,1.56,.64,1);
}

html { scroll-behavior: smooth; }

/* In-page anchors must clear the sticky header, or the target heading lands
   underneath it. scroll-padding applies to the scroll container, so it has to
   sit on <html> while the marker class lives on <body>. Kept in sync with
   .site-header-inner's height (72px desktop, 60px at <=640px — see Responsive). */
html:has(body.has-sticky-header) { scroll-padding-top: 72px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Reading Progress Bar ---------- */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: var(--red);
  z-index: 9999;
  transition: width .08s linear;
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 10px rgba(255,255,255,.6), 0 0 4px rgba(255,255,255,.4);
  pointer-events: none;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

p, ul, ol, li,
input, textarea, select, button {
  font-family: var(--font-body);
}

h1, h2, h3, h4, h5, h6,
.article-title,
.post-row-title,
.section-title,
.sidebar-card-title,
.archive-header-title,
.site-hero-title,
.logo-text {
  font-family: var(--font-head);
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }

/* Prevent hover color bleeding on structural/wrapper anchors */
.post-row-image,
.post-row-image:hover,
.related-card a,
.related-card a:hover { color: inherit; }
img { display: block; max-width: 100%; height: auto; }

/* ---------- Top Bar ---------- */
.top-bar {
  background: var(--black);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #EEE;
  letter-spacing: .05em;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 8px 24px;
  box-sizing: border-box;
}
.top-bar .top-bar-right {
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--red);
  font-size: 10.5px;
}
.top-bar a { transition: color var(--transition); }
.top-bar a:hover { color: var(--white); }
.top-bar .top-bar-right a:hover { color: #ffffff; }

/* ---------- Site Header ---------- */
.site-header {
  background: rgba(17, 17, 17, 0.92); /* Updated for immersive frost layout */
  border-bottom: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
  position: relative;
  top: 0;
  z-index: 100;
  max-width: var(--max-w);
  margin: 0 auto;
  box-sizing: border-box;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
body.has-sticky-header .site-header {
  position: sticky;
  top: 0;
}

.site-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

/* Logo — image version */
.site-logo { display: flex; align-items: center; height: 48px; }
.site-logo img {
  height: 48px;
  width: auto;
  display: block;
}
/* Fallback text logo if no image */
.site-logo .logo-text {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1;
}
.site-logo .logo-text span { color: var(--red); }

/* ---------- Primary Nav ---------- */
.primary-nav { display: flex; align-items: center; gap: 2px; }

.primary-nav a,
.primary-nav button.nav-parent {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--white);
  padding: 8px 13px;
  border-radius: 4px;
  position: relative;
  display: inline-block;
  transition: color var(--transition), background var(--transition), transform var(--transition);
}
.primary-nav a::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 13px; right: 13px;
  height: 2px;
  background: var(--red);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: center; /* Reveal from center outward */
  transition: transform 0.25s cubic-bezier(.4,0,.2,1);
}
.primary-nav a:hover,
.primary-nav button.nav-parent:hover { 
  color: var(--white); 
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}
.primary-nav a:hover::after { transform: scaleX(1); }
.primary-nav a.active {
  background: var(--red);
  color: var(--accent-ink);
}
.primary-nav a.active::after { display: none; }

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform .3s;
}

/* ---------- Search Toggle Button ---------- */
.search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 6px;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  margin-left: 6px;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition);
  flex-shrink: 0;
}
.search-toggle:hover,
.search-toggle.active {
  background: var(--red);
  border-color: var(--red);
  color: var(--accent-ink);
}

/* ---------- Search Dropdown ---------- */
.search-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  width: 360px;
  z-index: 98;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  opacity: 0;
  transform: translateY(-8px);
  /* visibility (not just opacity) so the input is neither focusable nor
     announced while the panel is closed. Delayed so the fade still plays. */
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}
.search-dropdown.open {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
  transition: opacity .2s ease, transform .2s ease, visibility 0s;
}

@media (prefers-reduced-motion: reduce) {
  .search-dropdown,
  .search-dropdown.open { transition: none; }
}

.search-dropdown-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
}

.search-dropdown-input {
  flex: 1;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--text);
  background: var(--bg-elev);
  outline: none;
  transition: border-color var(--transition);
  -webkit-appearance: none;
}
.search-dropdown-input:focus { border-color: var(--red); background: var(--bg-elev); }
.search-dropdown-input::placeholder { color: var(--subtle); }

.search-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 44px;
  padding: 0 20px;
  background: var(--red);
  color: var(--accent-ink);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition);
  flex-shrink: 0;
}
.search-dropdown-btn:hover { background: var(--red-dark); }

@media (max-width: 768px) {
  .search-dropdown {
    left: 0;
    right: 0;
    width: auto;
    border-left: none;
    border-right: none;
    border-radius: 0;
  }
  .search-dropdown-form { padding: 12px 16px; }
  .search-dropdown-btn { padding: 0 14px; }
}

/* ---------- Search Results Page ---------- */
.search-page-form {
  display: flex;
  gap: 10px;
  padding: 24px 0 8px;
}
.search-page-input {
  flex: 1;
  height: 48px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--text);
  background: var(--bg-elev);
  outline: none;
  transition: border-color var(--transition);
  -webkit-appearance: none;
}
.search-page-input:focus { border-color: var(--red); }
.search-page-input::placeholder { color: var(--subtle); }
.search-page-btn {
  height: 48px;
  padding: 0 28px;
  background: var(--red);
  color: var(--accent-ink);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition);
  flex-shrink: 0;
}
.search-page-btn:hover { background: var(--red-dark); }

/* ---------- Wrapper ---------- */
.wrapper {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 10px 24px;
}

/* ---------- Homepage Hero Banner ---------- */
.site-hero {
  position: relative;
  display: block;
  width: 100%;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  height: 500px;
  background-color: var(--charcoal);
  overflow: hidden;
  isolation: isolate;
  box-sizing: border-box;
}
.site-hero--color { background: linear-gradient(135deg, #1a1a1a 0%, #050505 100%); }
.site-hero--video { background: var(--charcoal); }
.site-hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.site-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.15) 55%, transparent 100%);
  transition: background .25s;
}
.site-hero-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  z-index: 2;
  padding-bottom: 36px;
}
.site-hero-text-box {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  padding: 0 24px;
}
.site-hero-custom-text {
  font-family: var(--font-body);
  font-size: 32px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.35;
  word-break: break-word;
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
}
.site-hero-rule {
  width: 40px;
  height: 3px;
  background: var(--red);
  border-radius: 2px;
  margin: 10px 0 0;
}
a.site-hero {
  display: block;
  text-decoration: none;
  color: inherit;
}
a.site-hero.site-hero--linked:hover .site-hero-overlay {
  background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.25) 55%, transparent 100%);
}
a.site-hero.site-hero--linked { cursor: pointer; }

/* ---------- Index Section Bar ---------- */
.index-hero {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 18px 24px;
  overflow: hidden;
}
.index-hero .wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}
.index-hero-accent {
  width: 5px;
  height: 36px;
  background: var(--red);
  border-radius: 3px;
  flex-shrink: 0;
  display: block;
}
.index-hero-text { flex: 1; }
.index-hero-title {
  font-family: var(--font-head);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text);
  line-height: 1;
}
.index-hero-sub {
  font-size: 11px;
  color: var(--subtle);
  margin-top: 3px;
  font-weight: 500;
}
.index-hero-line { flex: 1; height: 1px; background: var(--border); }
.index-hero-back {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .04em;
  transition: color var(--transition);
  white-space: nowrap;
}
.index-hero-back:hover { color: var(--red); }

/* ---------- Post Listing ---------- */
.post-listing {
  padding: 20px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.post-row {
  display: grid;
  grid-template-columns: 300px 1fr;
  background: var(--bg-card);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  /* Upgraded shadow depth interpolations */
  transition: box-shadow 0.35s cubic-bezier(.25,.8,.25,1), 
              transform 0.35s cubic-bezier(.25,.8,.25,1),
              border-color var(--transition);
  will-change: transform, box-shadow;
}
.post-row:hover {
  box-shadow: 0 20px 38px rgba(0,0,0,0.12), 0 10px 10px rgba(0,0,0,0.06);
  transform: translateY(-5px);
  border-color: var(--border-mid);
}

/* Thumbnail */
.post-row-image {
  display: block;
  position: relative;
  overflow: hidden;
  height: 185px;
  background: #262626;
  flex-shrink: 0;
}
/* Absolutely positioned so neither the image nor the placeholder can feed back
   into the row's intrinsic height. The card_grid variant sets height:auto on
   this cell, which leaves it without a definite height — a percentage height on
   the child then becomes a cyclic dependency that WebKit and Blink resolve
   differently, blanking the text column on iPad.
   Longhand offsets rather than `inset`, which needs Safari 14.1+: this exists
   to fix an old-WebKit bug, so it must not depend on a newer feature.
   width/height are required too — offsets alone do not stretch a replaced
   element, an <img> would fall back to its intrinsic size. */
.post-row-image img,
.post-row-image-placeholder { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; }
.post-row-image img {
  object-fit: cover;
  /* Cinematic ease curve for background elements */
  transition: transform 0.6s cubic-bezier(.16, 1, .3, 1);
  display: block;
}
.post-row:hover .post-row-image img { transform: scale(1.06); }

.post-row-cat-strip {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--red);
  padding: 6px 14px;
  display: flex;
  align-items: center;
  pointer-events: none;
}
.post-row-cat-strip span {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.post-row-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #262626;
  color: var(--subtle);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* Content */
.post-row-content {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
  border-left: 4px solid var(--bg);
}
.post-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--subtle);
}
.post-row-meta strong { color: var(--mid); font-weight: 600; }
.post-row-meta .meta-sep {
  width: 1px; height: 10px;
  background: var(--border-mid);
  flex-shrink: 0;
}

.post-row-title {
  font-family: var(--font-head);
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--text);
  line-height: 1.15;
}
.post-row-title a { transition: color var(--transition); }
.post-row-title a:hover,
.post-row:hover .post-row-title a { color: var(--red); }

.post-row-excerpt {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-row-readmore {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--red);
  padding: 7px 14px;
  border-radius: 4px;
  align-self: flex-start;
  margin-top: 2px;
  transition: background var(--transition), transform var(--transition-bounce),
              gap var(--transition);
  will-change: transform;
}
.post-row-readmore:hover,
.post-row:hover .post-row-readmore {
  background: var(--red-dark);
  color: var(--accent-ink);
  transform: scale(1.04);
  gap: 10px;
}

.no-posts {
  font-size: 14px;
  color: var(--muted);
  padding: 80px 0;
  text-align: center;
}

/* ---------- Post Listing — Band wrappers ---------- */
.post-band {
  max-width: var(--max-w);
  margin: 0 auto;
  box-sizing: border-box;
}
.post-band > .post-listing { padding: 0; }
.post-band--featured {
  background: linear-gradient(to bottom, #050505 0%, #2a2a2a 100%);
  padding: 32px 24px;
}
.post-band--featured .post-row-title,
.post-band--featured .post-row-title a { color: var(--white); }
.post-band--featured .post-row-title a:hover,
.post-band--featured .post-row:hover .post-row-title a { color: var(--red); }
.post-band--featured .post-row-meta,
.post-band--featured .post-row-meta strong,
.post-band--featured .post-row-excerpt { color: rgba(255,255,255,.78); }
.post-band--featured .post-row {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 6px;
  overflow: hidden;
}
.post-band--featured .post-row-content {
  background: transparent;
  border-top: none;
  padding: 14px 4px 0;
}
.post-band--featured .post-row-readmore { display: none; }
.post-band--latest {
  background: var(--bg-card);
}

/* ---------- Post Listing — 2-column grid variant ---------- */
.post-listing--grid_2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding: 20px 0 16px;
}
.post-listing--grid_2col .post-row {
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
}
.post-listing--grid_2col .post-row-image { height: 275px; }
.post-listing--grid_2col .post-row-content {
  border-left: none;
  border-top: 4px solid var(--bg);
  background: rgba(255, 255, 255, 0.1); 
  justify-content: flex-start;
  padding: 18px 22px 22px;
}
.post-listing--grid_2col .post-row-readmore { margin-top: auto; }
.post-listing--grid_2col .post-row-title { font-size: clamp(17px, 1.8vw, 21px); }
.post-listing--grid_2col .post-row-excerpt { -webkit-line-clamp: 3; }

/* ---------- Post Listing — 3-column grid variant ---------- */
.post-listing--grid_3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 20px 0 16px;
}
.post-listing--grid_3col .post-row {
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
}
.post-listing--grid_3col .post-row-image { height: 250px; }
.post-listing--grid_3col .post-row-content {
  border-left: none;
  border-top: 4px solid var(--bg);
  background: rgba(255, 255, 255, 0.1);
  justify-content: flex-start;
  padding: 16px 18px 20px;
}
.post-listing--grid_3col .post-row-readmore { margin-top: auto; }
.post-listing--grid_3col .post-row-title { font-size: clamp(15px, 1.5vw, 18px); }
.post-listing--grid_3col .post-row-excerpt { -webkit-line-clamp: 3; }

/* ---------- Post Listing — split variant ---------- */
.post-listing--card_grid .post-row { grid-template-columns: 2fr 3fr; }
.post-listing--card_grid .post-row-image { height: auto; min-height: 275px; }

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 32px 0 52px;
  flex-wrap: wrap;
}
.page-btn {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 6px;
  min-width: 40px;
  text-align: center;
  transition: all var(--transition), transform var(--transition-bounce);
  will-change: transform;
}
.page-btn:hover {
  border-color: var(--red);
  color: var(--red);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255,255,255,.15);
}
.page-btn.active {
  background: var(--red);
  color: var(--accent-ink);
  border-color: var(--red);
  box-shadow: 0 2px 8px rgba(255,255,255,.3);
  pointer-events: none;
}
.page-dots { color: var(--subtle); padding: 0 4px; font-size: 14px; }

/* ---------- Mobile Load More ---------- */
.load-more-wrap { display: none; text-align: center; padding: 24px 0 48px; }
.load-more-btn {
  font-family: var(--font-ui); font-size: 14px; font-weight: 600;
  color: var(--accent-ink); background: var(--red);
  border: none; padding: 14px 48px; border-radius: 6px;
  cursor: pointer; transition: all var(--transition);
}
.load-more-btn:hover { opacity: .9; }
.load-more-btn:disabled { opacity: .5; cursor: default; }
@media (max-width: 768px) {
  .pagination { display: none; }
  .load-more-wrap { display: block; }
}

/* ---------- In-Post Pagination ---------- */
.post-page-pagination {
  margin: 32px 0;
  padding: 20px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.post-page-count { font-weight: 600; margin-bottom: 12px; color: var(--ink); }
.post-page-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.post-page-links a {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 6px;
  text-decoration: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition), transform var(--transition-bounce);
}
.post-page-links a:hover {
  border-color: var(--red);
  color: var(--red);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255,255,255,.15);
}
.post-page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
}
.post-page-num.active {
  background: var(--red);
  color: var(--accent-ink);
  border-color: var(--red);
  box-shadow: 0 2px 8px rgba(255,255,255,.3);
  padding: 0 10px;
}

/* ---------- Article Hero Image ---------- */
.hero-wrap { background: var(--charcoal); position: relative; overflow: hidden; }
.hero-wrap img { width: 100%; max-height: 600px; object-fit: cover; opacity: .92; }
.hero-caption {
  position: absolute;
  bottom: 12px; right: 16px;
  font-size: 11px;
  color: rgba(255,255,255,.45);
  font-style: italic;
  letter-spacing: .04em;
}

/* ---------- Article Page Layout ---------- */
.page-layout { padding: 40px; background: var(--bg-card);}

/* ---------- Article ---------- */
.article-title {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: .01em;
}
.byline {
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.byline-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.byline a { color: var(--red); font-weight: 600; transition: color var(--transition); }
.byline a:hover { color: var(--red-dark); }
.byline .meta-sep {
  width: 1px; height: 10px;
  background: var(--border-mid);
  flex-shrink: 0;
}

/* ---------- Share Buttons ---------- */
.share-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.share-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--subtle);
  margin-right: 2px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--mid);
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition-bounce),
              box-shadow var(--transition);
  flex-shrink: 0;
  will-change: transform;
}

/* Consolidated state - bugs removed */
.share-btn:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 6px 16px rgba(0,0,0,.15);
}
.share-facebook:hover  { background: #1877f2; border-color: #1877f2; color: #fff; }
.share-twitter:hover   { background: #000;    border-color: #000;    color: #fff; }
.share-linkedin:hover  { background: #0a66c2; border-color: #0a66c2; color: #fff; }
.share-copy:hover      { background: var(--red); border-color: var(--red); color: var(--accent-ink); }
.share-copy.copied { background: #16a34a; border-color: #16a34a; color: #fff; }

@media (max-width: 540px) {
  .byline { flex-direction: column; align-items: flex-start; gap: 10px; }
  .share-buttons { align-self: flex-start; }
}

/* ---------- Top Answer / TL;DR ---------- */
.top-answer {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--bg-elev);
  border-left: 4px solid var(--red);
  border-radius: 0 6px 6px 0;
  padding: 16px 20px;
  margin: 0 0 28px;
}

.article-body p {
  font-family: var(--font-body);
  margin-bottom: 1.5em;
  font-size: 17px;
  color: var(--ink);
  line-height: 1.85;
}
.article-body h2 {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: .02em;
  margin: 1.8em 0 .7em;
  color: var(--text);
}
.article-body h3 {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 600;
  margin: 1.5em 0 .5em;
  color: var(--text);
}
.article-body strong { color: var(--text); font-weight: 700; }
.article-body a {
  color: var(--red);
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,.3);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--transition);
}
.article-body a:hover { text-decoration-color: var(--red); }
.article-body ul, .article-body ol {
  font-family: var(--font-body);
  margin: 0 0 1.5em 1.6em;
  font-size: 17px;
  color: var(--ink);
}
.article-body li { margin-bottom: .5em; }
.article-body blockquote {
  border-left: 4px solid var(--red);
  margin: 1.8em 0;
  padding: 16px 24px;
  background: var(--bg-elev);
  font-style: italic;
  color: var(--mid);
  border-radius: 0 6px 6px 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 17px;
}

/* ---------- Prev/Next Nav ---------- */
.post-nav {
  margin-top: 36px;
  background: var(--charcoal);
  padding: 18px 24px;
  border-radius: 8px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.post-nav .arrow {
  color: var(--red);
  font-size: 20px;
  line-height: 1.2;
  flex-shrink: 0;
  margin-top: 2px;
}
.post-nav .label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #777777;
  margin-bottom: 5px;
}
.post-nav strong {
  display: block;
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .01em;
}
.post-nav a { color: #9a9a9a; transition: color var(--transition); }
.post-nav a:hover { color: var(--white); }
.post-nav .arrow {
  color: var(--red);
  font-size: 20px;
  line-height: 1.2;
  flex-shrink: 0;
  margin-top: 2px;
  display: inline-block;
  transition: transform var(--transition);
}
.post-nav:hover .arrow { transform: translateX(-4px); }

/* ---------- Author Bio Card ---------- */
.author-card {
  margin: 40px 0 0;
  padding: 24px 28px;
  background: var(--bg-alt, #202020);
  border-left: 4px solid var(--red);
  border-radius: 0 8px 8px 0;
}
.author-card-name {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.author-card-bio {
  font-size: 14px;
  line-height: 1.65;
  color: var(--mid, #b0b0b0);
  margin: 0 0 14px;
}
.author-card-social { display: flex; flex-wrap: wrap; gap: 10px; }
.author-social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  text-decoration: none;
  transition: opacity .15s;
}
.author-social-link:hover { opacity: .75; }
.author-social-li  { background: #0a66c2; color: #fff; }
.author-social-x   { background: #000;    color: #fff; }
.author-social-ig  { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); color: #fff; }

/* ---------- Post FAQs ---------- */
.post-faqs {
  margin: 48px 0 0;
  border-top: 2px solid var(--border);
  padding-top: 32px;
}
.post-faqs-heading {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.post-faqs-heading::before {
  content: '';
  display: block;
  width: 5px;
  height: 22px;
  background: var(--red);
  border-radius: 2px;
  flex-shrink: 0;
}
.post-faq-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.post-faq-item:last-child { border-bottom: none; }
.post-faq-question {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
  line-height: 1.4;
}
.post-faq-answer {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  margin: 0;
}

/* ---------- Related Posts ---------- */
.related-posts { margin-top: 52px; }
.section-title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title::before {
  content: '';
  display: block;
  width: 5px; height: 24px;
  background: var(--red);
  border-radius: 3px;
  flex-shrink: 0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.related-card {
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition),
              border-color var(--transition);
  will-change: transform;
}
.related-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(0,0,0,.14), 0 6px 14px rgba(0,0,0,.07);
  border-color: var(--border-mid);
}
.related-card-img-wrap {
  position: relative;
  overflow: hidden;
  height: 200px;
  background: #262626;
}
.related-card-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s cubic-bezier(.4,0,.2,1);
}
.related-card:hover .related-card-img-wrap img { transform: scale(1.05); }
.related-card-cat {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--red);
  padding: 5px 12px;
}
.related-card-cat span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.related-card-body { padding: 14px 16px; }
.related-card h4 {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 6px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .01em;
  transition: color var(--transition);
}
.related-card:hover h4 { color: var(--red); }
.related-card .date {
  font-size: 11px;
  color: var(--subtle);
  font-weight: 500;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--charcoal);
  padding: 52px 24px 28px;
  margin-top: 16px;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.footer-logo { margin-bottom: 14px; }
.footer-logo img {
  height: 38px;
  width: auto;
  display: block;
  opacity: 1;
  filter: none;
}
.footer-logo .logo-text {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--white);
  line-height: 1;
}
.footer-logo .logo-text span { color: var(--red); }
.footer-about p { font-size: 12.5px; line-height: 1.75; color: #EEE; }
.footer-col h4 {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #EEE;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col ul li a {
  font-size: 13px;
  color: #EEE;
  transition: color var(--transition), padding-left var(--transition);
  display: inline-block;
}
.footer-col ul li a:hover { color: var(--white); padding-left: 4px; }
.footer-social { display: flex; gap: 8px; flex-wrap: wrap; }
.social-chip {
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  color: #EEE;
  transition: all var(--transition), transform var(--transition-bounce);
  cursor: pointer;
  will-change: transform;
}
.social-chip:hover {
  border-color: var(--red);
  color: var(--red);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255,255,255,.2);
}
.footer-network {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
}
.footer-network-label {
  color: rgba(255,255,255,.5);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 11px;
}
.footer-network a {
  color: #eee;
  text-decoration: none;
  font-weight: 600;
  transition: color .2s;
}
.footer-network a:hover { color: var(--red); }
.footer-bottom {
  max-width: var(--max-w);
  margin: 22px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #EEE;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom a { color: #EEE; transition: color var(--transition); }
.footer-bottom a:hover { color: var(--red); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .post-row { grid-template-columns: 260px 1fr; }
  .post-listing--grid_3col { grid-template-columns: repeat(2, 1fr); }
  .post-listing--grid_3col .post-row { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .site-hero { height: 480px; }
  .site-header-inner { padding: 0 18px; height: 60px; }
  /* Matches the shorter header, so anchor targets still clear it. */
  html:has(body.has-sticky-header) { scroll-padding-top: 60px; }
  /* Anchored to the header box (which is position:relative/sticky) rather than
     the viewport, so the panel tracks the header whether or not a top bar is
     present and whether or not the header has stuck. The previous
     `position: fixed; top: 60px` only lined up by accident — the header's
     backdrop-filter makes it a containing block for fixed descendants, so the
     panel silently detached wherever that filter was unsupported or disabled. */
  .primary-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--black);
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 12px 18px 16px;
    box-shadow: var(--shadow-md);
    z-index: 99;
    max-height: calc(100vh - 60px);
    max-height: calc(100dvh - 60px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .primary-nav.open { display: flex; }
  /* Changing this breakpoint? The .header-action swap at the end of this
     file must move with it, or the header button shows twice (or not at
     all) in the gap. tests/header-action-button-smoke.php enforces the
     pairing. */
  .hamburger { display: flex; }
  .top-bar { padding: 8px 18px; }
  .wrapper { padding: 0 16px; }
  .post-row { grid-template-columns: 1fr; }
  .post-listing--card_grid .post-row { grid-template-columns: 1fr; }
  .post-listing--card_grid .post-row-image { height: 200px; min-height: unset; }
  .post-row-image { height: 200px; }
  .post-row-content { padding: 18px 20px; }
  .post-listing--grid_3col { grid-template-columns: 1fr; }
  .post-listing--grid_2col { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-social { gap: 6px; }
}

/* ---------- Front-end audit pass additions ---------- */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}
body.single-post-page .page-layout { max-width: 920px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.search-toggle {
  width: auto;
  padding: 0 12px;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.search-toggle-icon { font-size: 14px; line-height: 1; }
.search-toggle-text { display: inline-block; }
.site-hero img.site-hero-video { object-fit: cover; }
.post-row { align-items: stretch; }
.post-row-content { min-height: 185px; }
.post-row-excerpt { min-height: 3.4em; }
.byline-meta span, .byline-meta strong { white-space: nowrap; }
.article-body > :first-child { margin-top: 0; }
.article-body img { width: 100%; border-radius: 10px; margin: 26px 0; }
.article-body figure { margin: 26px 0; }
/* Embedded video players (YouTube/Vimeo iframes) — responsive 16:9 */
.article-body iframe { display: block; width: 100%; max-width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 10px; margin: 26px 0; }
.article-body figcaption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  text-align: center;
}
.article-body hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
.post-nav-next { justify-content: flex-end; }
.post-nav-next .arrow { order: 2; margin-left: auto; }
.post-nav-next:hover .arrow { transform: translateX(4px); }
.author-card-social { margin-top: 10px; }
.footer-col ul li a, .footer-bottom, .footer-about p, .footer-col h4 { color: #eee; }
.no-posts {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.error-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  border-radius: 14px;
  padding: 36px;
}
.error-eyebrow {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
  margin-bottom: 10px;
}
.error-copy { font-size: 15px; color: var(--muted); max-width: 640px; }
.error-actions { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .header-actions { gap: 8px; }
  .search-toggle-text { display: none; }
  .search-toggle { width: 38px; padding: 0; }
}

@media (max-width: 640px) {
  .site-header-inner { gap: 12px; }
  .header-actions { margin-left: auto; }
  .search-toggle { width: 34px; height: 34px; }
  .article-title { font-size: 32px; }
  .post-nav, .post-nav-next { padding: 16px 18px; }
  .error-card { padding: 24px 20px; }
}

/* ---------- Pass 7.2 · Single Post Sidebar + Homepage Ads Block ---------- */
body.single-post-page .page-layout-sidebar { max-width: var(--max-w); }
.single-post-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}
.single-post-main {
  min-width: 0;
  background: var(--bg-card);
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 28px 20px 30px;
  margin-top: 15px;
  margin-bottom: 15px;
}
.article-hero-figure { margin: 0 0 22px; }
.article-hero-figure img { width: 100%; height: auto; border-radius: 6px; display: block; }
.article-hero-caption { text-align: center; font-size: 13px; color: var(--muted); font-style: italic; padding: 8px 0 4px; }
.post-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 14px 0 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.post-meta-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
}
.post-meta-left .byline { border: none; padding: 0; margin: 0; }
.post-meta-left .post-taxonomy { margin: 0; position: relative; padding-left: 14px; }
.post-meta-left .post-taxonomy::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 1px; height: 14px;
  background: var(--border-mid);
}
.post-taxonomy {
  font-size: 13px;
  color: var(--mid);
  margin: 8px 0 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.post-taxonomy-label { color: var(--ink); }
.post-taxonomy-term {
  color: var(--red);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 12px;
  transition: color var(--transition);
}
.post-taxonomy-term:hover { color: var(--red-dark); }

.share-buttons--row { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.share-buttons--row .share-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition-bounce), box-shadow var(--transition), opacity var(--transition);
  text-decoration: none;
}
.share-buttons--row .share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,.18);
  opacity: .92;
}
.share-buttons--row .share-facebook  { background: #1877f2; }
.share-buttons--row .share-twitter   { background: #1da1f2; }
.share-buttons--row .share-linkedin  { background: #0a66c2; }
.share-buttons--row .share-pinterest { background: #e60023; }
.share-buttons--row .share-whatsapp  { background: #25d366; }
.share-buttons--row .share-email     { background: #d44638; }

.single-post-main .byline { border-top: none; padding-top: 0; margin-bottom: 0; }
.single-post-sidebar { display: flex; flex-direction: column; gap: 20px; margin-bottom: 15px; margin-top: 15px;}
.sidebar-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-sm); padding: 18px; overflow: hidden; }
.sidebar-ad-card { text-align: center; display: flex; flex-direction: column; align-items: center; }

@media (min-width: 1025px) {
  .sidebar-column,
  .single-post-sidebar,
  .homepage-sidebar {
    position: sticky;
    top: 88px;
    align-self: start;
  }
  .sidebar-column .sidebar-ad-sticky,
  .single-post-sidebar .sidebar-ad-sticky,
  .homepage-sidebar .sidebar-ad-sticky,
  .sidebar-column .ad-slot-sticky,
  .single-post-sidebar .ad-slot-sticky,
  .homepage-sidebar .ad-slot-sticky {
    position: static;
  }
}
@media (max-width: 1024px) {
  .sidebar-column,
  .single-post-sidebar,
  .homepage-sidebar,
  .sidebar-ad-sticky,
  .ad-slot-sticky { position: static; }
}

.sidebar-card-title {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--red);
}
.sidebar-latest-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.sidebar-latest-item { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.sidebar-latest-item:last-child { padding-bottom: 0; border-bottom: none; }
.sidebar-latest-item a { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.4; transition: color var(--transition); }
.sidebar-latest-item a:hover { color: var(--red); }
.sidebar-latest-date { font-size: 11px; color: var(--subtle); }

@media (max-width: 960px) {
  .single-post-with-sidebar { grid-template-columns: 1fr; }
  .sidebar-ad-sticky { position: static; }
  .single-post-sidebar { margin-top: 0; }
}
@media (max-width: 640px) {
  .single-post-main { padding: 18px 16px 24px; border-radius: 6px; }
  .share-buttons--row .share-btn { width: 34px; height: 34px; }
  .post-meta-row { flex-direction: column; align-items: flex-start; gap: 14px; }
  .post-meta-left .post-taxonomy { padding-left: 0; }
  .post-meta-left .post-taxonomy::before { display: none; }
}

.homepage-ads-block { width: 100%; }
.ads-block-hide-mobile { display: none; }
@media (min-width: 600px) { .ads-block-hide-mobile { display: block; } }
.ads-block-card { overflow: hidden; text-align: center; display: flex; flex-direction: column; align-items: center;}
.ads-block-title { margin-bottom: 1rem; }
.ads-block-card.ads-rotating-out { opacity: 0; transition: opacity 0.25s ease; }
.ads-block-card.ads-rotating-in { opacity: 1; transition: opacity 0.25s ease; }
.ad-slot-wrap { width: 100%; }
@media (min-width: 1025px) { .ad-slot-sticky { position: sticky; top: 88px; } }
@media (max-width: 900px)  { .ad-slot-wrap.ad-target-desktop { display: none !important; } }
@media (min-width: 901px)  { .ad-slot-wrap.ad-target-mobile  { display: none !important; } }

/* ---------- Pass 8 · Block Registry shared layout ---------- */
.block-shell { max-width: var(--max-w); margin: 0 auto; box-sizing: border-box; width: 100%; }
.block-shell .section-heading { text-align: center; margin: 0 auto 1.25rem; }
.block-shell .block-inner { margin-left: auto; margin-right: auto; }
.block-shell .newsletter-block,
.block-shell .homepage-ads-block,
.block-shell .category-strip-items { margin-left: auto; margin-right: auto; }

/* ── Homepage hero extended elements ── */
.site-hero-title {
  font-family: var(--font-head);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 .5rem;
  color: #fff;
}
.site-hero-subtitle {
  font-size: 1.3rem;
  font-weight: 400;
  margin: 0 0 .75rem;
  color: rgba(255,255,255,.88);
}
.site-hero-cta {
  display: inline-block;
  background: #fff;
  color: #111;
  padding: .5rem 1.4rem;
  border-radius: 4px;
  font-weight: 600;
  margin-top: .5rem;
  text-decoration: none;
}
@media (max-width: 768px) { .site-hero-title { font-size: 2rem; } }

/* ── Category strip ── */
.category-strip-items {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  padding: .5rem 0 1rem;
}
.category-strip-items a {
  display: inline-block;
  padding: .35rem .85rem;
  background: rgba(255,255,255,.08);
  border-radius: 3px;
  text-decoration: none;
  color: inherit;
  font-size: .875rem;
  transition: background .15s;
}
.category-strip-items a:hover { background: rgba(255,255,255,.16); }

/* ── Newsletter block ── */
.newsletter-block {
  text-align: center;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  padding: 2.5rem 1.5rem;
  border-radius: 6px;
  max-width: 720px;
  margin: 0 auto;
}
.newsletter-block h2 { margin: 0 0 1rem; font-size: 1.4rem; }
.newsletter-block .btn-cta {
  display: inline-block;
  background: var(--red);
  color: var(--accent-ink);
  text-decoration: none;
  padding: .6rem 1.6rem;
  border-radius: 4px;
  font-weight: 600;
  margin-top: .25rem;
}
.newsletter-block .btn-cta:hover { opacity: .9; }

/* ── Custom HTML block ── */
.custom-html-block { text-align: left; }

/* ---------- Pass 9.3 · Custom Layout Builder Blocks ---------- */
.custom-block-section { max-width: var(--max-w); margin: 0 auto; box-sizing: border-box; padding: 3rem 0; }
.custom-block-section .custom-block-inner { margin-left: auto; margin-right: auto; }
.custom-block-section .custom-block-grid { display: grid; gap: 2rem; align-items: start; }
.custom-block-section .custom-block-grid--1 { grid-template-columns: minmax(0, 1fr); }
.custom-block-section .custom-block-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.custom-block-section .custom-block-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.custom-block-section .custom-block-col { min-width: 0; word-wrap: break-word; }
.custom-block-section .custom-block-col > *:first-child { margin-top: 0; }
.custom-block-section .custom-block-col > *:last-child { margin-bottom: 0; }
.reusable-block {max-width: var(--max-w); margin-left: auto; margin-right: auto;} 

@media (max-width: 900px) {
  .custom-block-section .custom-block-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .custom-block-section { padding: 2rem 0; }
  .custom-block-section .custom-block-grid--2,
  .custom-block-section .custom-block-grid--3 { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
}

/* ── People taxonomy ── */
.archive-header { display: flex; align-items: center; gap: 2rem; background: var(--charcoal); padding: 2.5rem 2rem; border-radius: 6px; border-left: 5px solid var(--red); box-shadow: var(--shadow-md); box-sizing: border-box; }
.archive-header-image { width: 130px; height: 130px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 3px solid var(--white); box-shadow: 0 4px 14px rgba(0,0,0,0.3); }
.archive-header-title { margin: 0 0 .4rem; font-family: var(--font-head); font-size: clamp(1.85rem, 3.5vw, 2.75rem); font-weight: 800; text-transform: uppercase; letter-spacing: .01em; color: var(--white); line-height: 1.1; }
.archive-header-description { margin: 0; font-family: var(--font-body); font-size: .95rem; line-height: 1.6; color: rgba(255,255,255,0.78); max-width: 850px; }
.post-people { margin: 1.25rem 0 0; font-size: .875rem; }
.post-people-label { font-weight: 700; margin-right: .25rem; }
.post-people a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.post-people a:hover { opacity: .75; }
.post-people-sep { margin-right: .25rem; }
@media (max-width: 600px) {
  .archive-header { flex-direction: column; text-align: center; align-items: center; gap: 1.25rem; padding: 2rem 1.25rem; }
  .archive-header-image { width: 100px; height: 100px; }
  .archive-header-description { text-align: center; }
}

/* ── TinyMCE image alignment ── */
.article-body img.img-left   { float: left;  width: auto; max-width: 50%; margin: 0 1.25em 1em 0; border-radius: 6px; }
.article-body img.img-right  { float: right; width: auto; max-width: 50%; margin: 0 0 1em 1.25em; border-radius: 6px; }
.article-body img.img-center { float: none;  display: block; width: auto; max-width: 100%; margin: 0 auto 1em; }
.article-body img.img-full   { float: none;  display: block; width: 100%; height: auto; margin: 0 0 1em; }
.article-body::after { content: ''; display: table; clear: both; }

/* ── Responsive tables ── */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.5em; }
.table-responsive table { margin: 0; }
.article-body .cms-table { border-collapse: collapse; width: 100%; }
.article-body .cms-table th,
.article-body .cms-table td { border: 1px solid var(--border, #333333); padding: 8px 12px; vertical-align: top; text-align: left; }
.article-body .cms-table th { background: var(--bg-alt, #202020); font-weight: 600; }

/* ==========================================================================
   ── CMS Slider — Black Theme Sizing & Colors Override (Boxed Layout) ──
   ========================================================================== */

.cms-slider {
    width: 100%;
    max-width: var(--max-w); /* Enforces the 1400px grid directly on the component container */
    margin-left: auto;
    margin-right: auto;
    --swiper-navigation-color: var(--white);
    --swiper-pagination-color: var(--red);
    
    /* Mapping core structural tokens to BLACK theme design variables */
    --slider-progress-fill: var(--red);
    --slider-feature-bg: var(--black);
}

/* Parent container is now safely boxed, allowing us to use streamlined static padding values */
.cms-slider.cms-slider--featured_posts .cms-slider__overlay {
    padding: 3.5rem 4.5rem 4rem;
    color: var(--white);
    
    /* Deep cinematic dark mask matching the industrial aesthetic of BLACK */
    background: linear-gradient(to top, rgba(17, 17, 17, 0.95) 0%, rgba(17, 17, 17, 0.35) 60%, transparent 100%);
}

/* Typographic layout rules matching BLACK display style rules */
.cms-slider--featured_posts .cms-slider__title {
    font-family: var(--font-head);
    font-size: clamp(2rem, 4vw, 3.5rem); /* Proportional scaling inside the boxed wrapper */
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: .01em;
    color: var(--white);
    margin-bottom: 1.25rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Modernizing the Call to Action Button with theme physics spring tokens */
.cms-slider--featured_posts .cms-slider__read-more {
    display: inline-block;
    padding: 10px 22px;
    background: var(--red);
    color: var(--accent-ink);
    border-radius: 4px;
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background var(--transition), transform var(--transition-bounce), box-shadow var(--transition);
    will-change: transform;
}

.cms-slider--featured_posts .cms-slider__read-more:hover {
    background: var(--red-dark);
    transform: scale(1.04);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

/* Fluid responsive height scaling rules for BLACK layouts */
.cms-slider--featured_posts .cms-slider__media { 
    width: 100%; 
    aspect-ratio: 21 / 9; 
    height: 600px; 
}

@media (max-width: 1024px) {
    .cms-slider--featured_posts .cms-slider__media { 
        height: 500px; 
    }
}

@media (max-width: 640px) { 
    .cms-slider--featured_posts .cms-slider__media { 
        aspect-ratio: auto; 
        height: 400px; 
    }
    .cms-slider.cms-slider--featured_posts .cms-slider__overlay {
        padding: 2rem 1.5rem 2.5rem;
    }
}

/* ── Modern Subgrid Implementation Pass ── */
/* ── Modern Subgrid Implementation Pass ── */
/* ── Modern Subgrid Implementation Pass ── */
@media (min-width: 901px) {
  .post-listing--grid_2col,
  .post-listing--grid_3col {
    align-items: stretch;
  }
  
  .post-listing--grid_2col .post-row,
  .post-listing--grid_3col .post-row {
    grid-row: span 5;
    display: grid;
    grid-template-rows: subgrid;
    grid-template-columns: 1fr;
    height: 100%;
    row-gap: 0; /* FIXED: Overrides parent layout gap to bring content flush with image */
  }
  
  .post-listing--grid_2col .post-row-image,
  .post-listing--grid_3col .post-row-image {
    grid-row: 1;
  }
  
  .post-listing--grid_2col .post-row-content,
  .post-listing--grid_3col .post-row-content {
    grid-row: 2 / span 4;
    display: grid;
    grid-template-rows: subgrid;
    height: auto;
    min-height: unset;
    padding: 18px 22px 22px;
    border-top: none; /* FIXED: Eliminates the background-colored separation line */
    row-gap: 8px;     /* FIXED: Keeps text items nicely spaced internally */
  }
  
  .post-row-meta     { grid-row: 1; }
  .post-row-title    { grid-row: 2; }
  .post-row-excerpt  { grid-row: 3; min-height: unset; }
  
  .post-row-readmore {
    grid-row: 4;
    justify-self: start;
  }
}

/* ── Site Layout Shell System ── */
.site-main {
  width: 100%;
  background: var(--bg-card);
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
}

.main-layout {
  padding: 0 24px;
  box-sizing: border-box;
}

.main-layout--with-sidebar {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

.main-layout--full { max-width: 100%; }

.content-column { min-width: 0; }
.sidebar-column { min-width: 0; }

.custom-blocks-wrap {
  width: 100%;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  box-sizing: border-box;
}

.custom-blocks-inner {
  padding: 0 24px;
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .main-layout--with-sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .main-layout { padding: 0 16px; }
  .custom-blocks-inner { padding: 0 16px; }
}

/* ── Homepage Sidebar Layout ── */
.homepage-sidebar-wrap {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 10px 24px;
  box-sizing: border-box;
}

.homepage-main-content { min-width: 0; margin-top: 15px; margin-bottom: 15px;}
.homepage-sidebar { min-width: 0; }

@media (max-width: 1024px) {
  .homepage-sidebar-wrap {
    grid-template-columns: 1fr;
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 640px) {
  .homepage-sidebar-wrap { padding-left: 16px; padding-right: 16px; }
}

/* ── Search Page ── */
.search-heading {
  font-family: var(--font-head);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text);
  margin-bottom: 4px;
  padding-top: 24px;
}

.search-results-count {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}

.search-page-content {
  padding-top: 24px;
  padding-bottom: 40px;
}

.search-post-listing {
  padding-top: 16px;
}

.search-page-pages-section {
  margin-top: 32px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

/* ── Page Shell (static pages) ── */
.static-page-shell {
  background: var(--bg-card);
  padding-top: 32px;
  padding-bottom: 48px;
}

/* ── Enhanced Vibrant Breadcrumb Navigation ── */
.page-breadcrumbs { 
  margin-bottom: 32px; 
  background: var(--charcoal, #161616); /* Immersive dark block base */
  padding: 10px 18px;
  border-radius: 6px;
  display: inline-flex; /* Formats track as a distinct standalone capsule element */
  border-bottom: 2px solid var(--red, #f2f2f2); /* Hot crimson edgy accent anchor */
  box-shadow: var(--shadow-sm);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-ui), sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.breadcrumb-item a { 
  color: rgba(255, 255, 255, 0.7); 
  transition: color var(--transition, .2s); 
}

.breadcrumb-item a:hover { 
  color: var(--white, #ffffff); 
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.breadcrumb-item:last-child {
  color: var(--white, #ffffff);
  opacity: 1;
  pointer-events: none;
}

.breadcrumb-sep { 
  color: var(--red, #f2f2f2); /* Vibrant separator focus toggle */
  font-weight: 800;
  opacity: 1;
}

/* ── Refactored Equal-Height Sub-Resource Cards ── */
.page-section-nav {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border, #262626);
}

.page-section-nav h2 {
  font-family: var(--font-head), sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text, #f5f5f5);
  margin-bottom: 1.25rem;
}

.page-section-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); /* Auto-scaling modern columns */
  align-items: stretch; /* Directs children blocks to stretch together perfectly */
}

.page-section-card {
  display: flex;
  flex-direction: column;
  height: 100%; /* Forces card height alignment matching row variables */
  padding: 22px;
  background: var(--bg-card, #1a1a1a);
  border: 1px solid var(--border, #262626);
  border-left: 4px solid var(--border-mid, #3a3a3a); /* Asymmetrical edgy border anchor */
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-bounce, .25s), 
              border-color var(--transition, .2s), 
              box-shadow var(--transition, .2s);
}

.page-section-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-left-color: var(--red, #f2f2f2); /* Snaps accent line to brand crimson color */
  border-color: var(--border-mid, #3a3a3a);
  box-shadow: 0 12px 24px rgba(255, 255, 255, 0.08), var(--shadow-md); /* Smooth neon shadow blend */
  color: inherit;
}

.page-section-card strong { 
  display: block; 
  font-family: var(--font-head), sans-serif;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--text, #f5f5f5);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.page-section-card p { 
  margin: 0; 
  font-size: 0.9rem; 
  color: var(--mid, #b0b0b0);
  line-height: 1.5; 
  flex-grow: 1; /* Instructs text field to take up unused space, anchoring card heights */
}

/* ── Refactored Modern Sibling Navigation ── */
.page-siblings-nav {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border, #262626);
}

.page-siblings-nav h3 {
  font-family: var(--font-head), sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text, #f5f5f5);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Subtle accent block indicator matching parent section elements */
.page-siblings-nav h3::before {
  content: '';
  width: 4px;
  height: 16px;
  background: var(--red, #f2f2f2);
  border-radius: 2px;
  display: inline-block;
}

.page-siblings-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.page-sibling-link {
  display: inline-block;
  padding: 0.45rem 1.1rem;
  background: var(--bg-card, #1a1a1a);
  border: 1px solid var(--border, #262626);
  border-left: 3px solid var(--border-mid, #3a3a3a); /* Edgy, geometric signature border */
  border-radius: 4px; /* Shifted from rounded pills to sharp modern chips */
  font-family: var(--font-ui), sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink, #d4d4d4);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-bounce, .25s),
              border-color var(--transition, .2s),
              box-shadow var(--transition, .2s),
              color var(--transition, .2s);
}

.page-sibling-link:hover {
  transform: translateY(-2px);
  border-left-color: var(--red, #f2f2f2); /* Hot crimson state snap */
  border-color: var(--border-mid, #3a3a3a);
  box-shadow: 0 6px 14px rgba(255, 255, 255, 0.06), var(--shadow-sm); /* Vibrant crimson shadow glow */
  color: var(--red, #f2f2f2);
}

/* =========================================================
   Homepage block registry — black-branded overrides
   ========================================================= */

/* Block section headings inherit the hits section-title look:
   uppercase Barlow Condensed with a red vertical bar. */
.block-shell .section-heading {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: left;
}
.block-shell .section-heading::before {
  content: '';
  display: block;
  width: 5px; height: 24px;
  background: var(--red);
  border-radius: 3px;
  flex-shrink: 0;
}

/* ── CTA banner block ── */
.cta-banner-block { color: var(--ink); }
.cta-banner-block--dark { background: var(--charcoal); color: var(--white); }
.cta-banner-eyebrow {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--red);
  margin: 0 0 .5rem;
}
.cta-banner-headline {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--text);
  margin: 0 0 .75rem;
}
.cta-banner-body {
  font-size: 1.1rem;
  margin: 0 0 1.25rem;
  color: var(--ink);
}
.cta-banner-block--dark .cta-banner-headline { color: var(--white); }
.cta-banner-block--dark .cta-banner-body { color: rgba(255,255,255,0.88); }
.cta-banner-btn {
  background: var(--red);
  color: var(--accent-ink);
  border-left: 4px solid rgba(0,0,0,.35);
  padding: .7rem 1.8rem .7rem 1.4rem;
  font-family: var(--font-head);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-radius: 4px;
  transition: background var(--transition), transform var(--transition);
}
.cta-banner-btn:hover { background: var(--red-dark); color: var(--accent-ink); transform: translateY(-1px); }
/* On the dark fallback banner the same white accent button carries it. */
.cta-banner-block--dark .cta-banner-btn {
  background: var(--red);
  color: var(--accent-ink);
  border-left-color: rgba(0,0,0,.35);
}
.cta-banner-block--dark .cta-banner-btn:hover { background: var(--red-dark); color: var(--accent-ink); }

/* ── Image + text block ── */
.image-text-block { color: var(--ink); }
.image-text-wrapper { padding: 2.5rem 1rem; }
.image-text-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
}
.image-text-inner--left  { flex-direction: row; }
.image-text-inner--right { flex-direction: row-reverse; }
.image-text-img,
.image-text-copy { flex: 1; min-width: 280px; }
.image-text-img img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  box-shadow: var(--shadow-md);
}
.image-text-headline {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--text);
  margin: 0 0 .75rem;
  line-height: 1.15;
}
.image-text-body { color: var(--ink); line-height: 1.7; }
@media (max-width: 720px) {
  .image-text-inner--left,
  .image-text-inner--right { flex-direction: column; }
  .image-text-wrapper { padding: 2rem 1rem; }
}

/* ── Shared primary button (black-branded) ──
   Used by image-text block and any future block that opts into .btn.btn-primary. */
.btn.btn-primary {
  display: inline-block;
  background: var(--red);
  color: var(--accent-ink);
  border-left: 4px solid rgba(0,0,0,.35);
  padding: .7rem 1.6rem .7rem 1.2rem;
  margin-top: 1rem;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-radius: 4px;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}
.btn.btn-primary:hover { background: var(--red-dark); color: var(--accent-ink); transform: translateY(-1px); }

/* =============================================
   Save for Later — reading list (client-side)
   ============================================= */

/* ---- Bookmark button on listing cards ---- */
.post-row { position: relative; }

.bookmark-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(17, 17, 17, .55);
  color: var(--white);
  cursor: pointer;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  transform: translateY(-4px);
  transition: background var(--transition), color var(--transition),
              opacity var(--transition), transform var(--transition-bounce);
}
.post-row:hover .bookmark-btn,
.bookmark-btn:focus-visible,
.bookmark-btn.is-saved {
  opacity: 1;
  transform: translateY(0);
}
.bookmark-btn:hover { background: rgba(17, 17, 17, .82); }
.bookmark-btn svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
  transition: fill var(--transition);
}
.bookmark-btn.is-saved { background: var(--red); color: var(--accent-ink); }
.bookmark-btn.is-saved svg path { fill: var(--accent-ink); stroke: var(--accent-ink); }

/* Touch devices: no hover, so keep the button visible. */
@media (hover: none) {
  .bookmark-btn { opacity: 1; transform: none; }
}

/* ---- Save button in the single-article share row ---- */
.share-btn.share-bookmark { background: var(--charcoal); }
.share-btn.share-bookmark:hover { background: var(--black); }
.share-btn.share-bookmark svg path { fill: none; stroke: currentColor; transition: fill var(--transition); }
.share-btn.share-bookmark.is-saved { background: var(--red); color: var(--accent-ink); }
.share-btn.share-bookmark.is-saved svg path { fill: var(--accent-ink); stroke: var(--accent-ink); }

/* ---- Floating reading-list launcher (FAB) ---- */
.saved-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  /* Keep clear of the notch / home-bar on mobile. */
  right: calc(22px + env(safe-area-inset-right, 0px));
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 200;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  /* Subtle by default (nothing saved yet). */
  background: rgba(30, 30, 30, .85);
  border: 1px solid var(--border-mid);
  color: var(--white);
  opacity: .78;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  box-shadow: var(--shadow-md);
  transition: background var(--transition), opacity var(--transition),
              transform var(--transition-bounce), box-shadow var(--transition);
}
.saved-fab:hover { opacity: 1; transform: translateY(-2px); }
.saved-fab:active { transform: translateY(0); }
.saved-fab:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.saved-fab-icon { display: block; }
.saved-fab-icon path { transition: fill var(--transition); }

/* Prominent once the reader has saved something. */
.saved-fab.has-saved {
  background: var(--red);
  color: var(--accent-ink);
  opacity: 1;
}
.saved-fab.has-saved .saved-fab-icon path { fill: var(--accent-ink); stroke: var(--accent-ink); }

/* Count badge pinned to the FAB corner. */
.saved-count {
  position: absolute;
  top: -3px;
  right: -3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  border: 2px solid var(--bg-card);
  background: var(--red);
  color: var(--accent-ink);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
/* When the FAB itself is red, give the badge contrast against it. */
.saved-fab.has-saved .saved-count { background: var(--black); border-color: var(--red); color: var(--white); }

@media (prefers-reduced-motion: reduce) {
  .saved-fab { transition: background var(--transition), opacity var(--transition); }
  .saved-fab:hover, .saved-fab:active { transform: none; }
}

@media (max-width: 640px) {
  .saved-fab {
    width: 48px;
    height: 48px;
    right: 16px;  /* fallback for browsers without env() */
    bottom: 16px;
    right: calc(16px + env(safe-area-inset-right, 0px));
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
}

/* ---- Slide-in drawer ---- */
.saved-drawer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  visibility: hidden;
  pointer-events: none;
}
.saved-drawer.open { visibility: visible; pointer-events: auto; }

.saved-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, .5);
  opacity: 0;
  transition: opacity .28s ease;
}
.saved-drawer.open .saved-drawer-overlay { opacity: 1; }

.saved-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 380px;
  max-width: 88vw;
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.4, 0, .2, 1);
}
.saved-drawer.open .saved-drawer-panel { transform: translateX(0); }

.saved-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.saved-drawer-title {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .01em;
}
.saved-drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--mid);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}
.saved-drawer-close:hover { background: var(--border); color: var(--text); }

.saved-drawer-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0;
}

.saved-item {
  position: relative;
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--border);
}
.saved-item-link {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
  padding: 14px 8px 14px 20px;
  color: inherit;
}
.saved-item-thumb {
  flex-shrink: 0;
  width: 74px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  background: #262626;
}
.saved-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.saved-item-body { min-width: 0; }
.saved-item-cat {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 3px;
}
.saved-item-title {
  display: block;
  font-family: var(--font-head);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.saved-item-link:hover .saved-item-title { color: var(--red); }
.saved-item-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--subtle);
  cursor: pointer;
  transition: color var(--transition);
}
.saved-item-remove:hover { color: var(--red); }

.saved-drawer-empty {
  padding: 40px 28px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

body.saved-drawer-lock { overflow: hidden; }

@media (max-width: 640px) {
  .saved-drawer-panel { width: 100%; max-width: 100%; }
}

/* =============================================
   Container-query grids  (progressive enhancement)
   ---------------------------------------------
   Post-grid blocks reflow on their OWN container's width, so a block
   dropped into a narrow column (sidebar, a custom-html-2col cell, a
   future split layout) collapses on its own instead of following the
   whole viewport and cramming 3 cards into a sliver.

   Purely additive: full-width blocks keep their existing viewport
   behaviour (the media queries above still apply); this only corrects
   narrow placements. Browsers without @container / :has() support fall
   back to those same viewport rules — nothing breaks.
   ============================================= */
@supports (container-type: inline-size) {

  /* Only wrappers that actually hold a grid become query containers.
     Scoping with :has() also keeps container-type from turning every
     block wrapper into a containing block for its abspos descendants. */
  .block-shell:has(> .post-listing--grid_2col),
  .block-shell:has(> .post-listing--grid_3col),
  .block-shell:has(> .post-listing--card_grid),
  .post-band:has(> .post-listing--grid_2col),
  .post-band:has(> .post-listing--grid_3col),
  .post-band:has(> .post-listing--card_grid) {
    container-type: inline-size;
  }

  /* 3-column variant: 3-up wide → 2-up mid → 1-up tight */
  @container (max-width: 760px) {
    .post-listing--grid_3col { grid-template-columns: repeat(2, 1fr); }
  }

  /* 2- and 3-column variants both drop to a single column once tight */
  @container (max-width: 480px) {
    .post-listing--grid_3col,
    .post-listing--grid_2col { grid-template-columns: 1fr; }
  }

  /* Split/card variant: stack image over content when the container is tight */
  @container (max-width: 520px) {
    .post-listing--card_grid .post-row { grid-template-columns: 1fr; }
    .post-listing--card_grid .post-row-image { height: 200px; min-height: unset; }
  }

  /* Headline scales to the container, not the screen. */
  .post-listing--grid_3col .post-row-title { font-size: clamp(15px, 2.2cqi, 18px); }
  .post-listing--grid_2col .post-row-title { font-size: clamp(16px, 2.6cqi, 21px); }
}


/* ==========================================================================
   Post list layouts — tablet / iPad responsive pass
   --------------------------------------------------------------------------
   Breakpoints requested: 1024px (tablet/iPad) and 768px (mobile).

   Selector note: this theme's markup does not use .post-layout-* / .post-card /
   .post-thumbnail. The listing emits .post-listing (+ a --grid_2col /
   --grid_3col / --card_grid modifier) wrapping .post-row, which is a CSS grid
   of .post-row-image + .post-row-content. The rules below are the requested
   behaviour expressed against those real selectors, with flex-basis
   percentages translated to grid tracks.

   Appended at the end of the stylesheet so it composes with, and takes
   precedence over, the theme's existing 900px / 640px rules.
   ========================================================================== */

/* A grid item's automatic minimum size is its min-content width, so a long
   word or URL in the copy can force the text track wider than its share.
   min-width:0 lets the track shrink as intended. */
.post-row-content { min-width: 0; }

/* --- Tablet / iPad (<= 1024px) --- */
@media screen and (max-width: 1024px) {
  /* 3-up grids drop to 2-up so cards keep a legible width */
  .post-listing--grid_3col { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
  .post-listing--grid_2col { gap: 1.25rem; }

  /* Split (card_grid): thumbnail 40% -> 35%, giving the copy more room */
  .post-listing--card_grid .post-row { grid-template-columns: 35% minmax(0, 1fr); }

  /* List: cap the thumbnail at 200px so title and excerpt get the remainder */
  .post-row { grid-template-columns: minmax(0, 200px) minmax(0, 1fr); }

  /* Ranked rows carry a third child (.post-rank) and must keep a third track.
     The bare .post-row rule above would otherwise win on source order and push
     the content onto an implicit second row. */
  .post-row--ranked { grid-template-columns: minmax(4.5rem, auto) minmax(0, 200px) minmax(0, 1fr); }
}

/* --- Mobile (<= 768px) --- */
@media screen and (max-width: 768px) {
  /* All grids collapse to a single column */
  .post-listing--grid_2col,
  .post-listing--grid_3col { grid-template-columns: minmax(0, 1fr); gap: 1rem; }

  /* Split and list stack vertically with a full-width thumbnail */
  .post-row,
  .post-listing--card_grid .post-row { grid-template-columns: minmax(0, 1fr); }
  .post-row-image,
  .post-listing--card_grid .post-row-image { width: 100%; max-width: 100%; }

  /* Ranked rows keep the rank beside the image, with the copy spanning below,
     rather than stranding a large numeral on a line of its own. */
  .post-row--ranked { grid-template-columns: minmax(3.5rem, auto) minmax(0, 1fr); }
  .post-row--ranked .post-row-image { width: auto; max-width: none; }
  .post-row--ranked .post-row-content { grid-column: 1 / -1; }
}

/* ---------- Header call-to-action button ---------- */
/* Rendered twice by render_header_action() (cms-core/helpers-header-action.php):
   the --bar copy sits beside the search toggle, the --menu copy inside
   .primary-nav. Exactly one is ever shown. The swap happens at THIS theme's own
   nav-collapse breakpoint (640px) so the button drops into the mobile
   dropdown at the same moment the nav does — leaving the mobile header bar
   exactly as it was. */
.header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--red);
  border-radius: 6px;
  /* Rests as an outline and fills in on hover, the same direction as its
     neighbour .search-toggle. It used to run the other way — solid at rest,
     draining to transparent on hover — so hovering across the pair made one
     button empty while the other filled. The border is var(--red) in both
     states, so hover moves the fill and the label only. */
  background: transparent;
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.header-action:hover,
.header-action:focus-visible {
  background: var(--red);
  color: var(--accent-ink);
}
/* Above the breakpoint only the bar copy exists visually.
   Scoped to .primary-nav deliberately: the menu copy is an <a> inside the nav,
   and the theme's own `.primary-nav a` rule has specificity 0,1,1 — which beats
   a lone `.header-action--menu` class at 0,1,0. In hits that rule sets
   `display: inline-block` and forced BOTH copies on screen at once on desktop;
   in every theme it also overrides the button's colour, padding and radius.
   `.primary-nav .header-action--menu` is 0,2,0 and wins on class count. */
.primary-nav .header-action--menu { display: none; }

@media (max-width: 640px) {
  .header-action--bar { display: none; }
  .primary-nav .header-action--menu {
    display: flex;
    width: 100%;
    height: 40px;
    margin-top: 10px;
    /* Re-assert the button look; `.primary-nav a` outranks `.header-action`. */
    justify-content: center;
    padding: 0 14px;
    border-radius: 6px;
    /* Outline at rest, filling on hover — same direction as the desktop copy
       and as .search-toggle. */
    background: transparent;
    /* !important here defends against a nav-link colour rule set with
       !important, which would otherwise beat this on specificity alone.
       It MUST be matched on the :hover rule below: !important outranks
       specificity, so an !important resting colour against a plain hover
       colour pins the label and the hover never lands. That is exactly what
       happened before — the background changed on hover and the text did not. */
    color: var(--white) !important;
    font-size: 12px;
    font-weight: 700;
  }
  /* 0,2,1 — ties `.primary-nav a:hover`, and wins on source order. */
  .primary-nav .header-action--menu:hover {
    background: var(--red);
    color: var(--accent-ink) !important;
  }
}

/* ---------- Primary nav submenus ---------- */
/* An item with children is wrapped in .nav-item; one without renders as a bare
   <a>, exactly as before, so nothing about the existing nav layout moves.
   Selectors are scoped through .primary-nav so they outrank this theme's own
   `.primary-nav a` rule (0,1,1) — the same specificity trap that put the header
   button on screen twice. */
.primary-nav .nav-item { position: relative; display: inline-flex; align-items: center; }
.primary-nav .nav-item .nav-parent { display: inline-flex; align-items: center; gap: 6px; }

/* Parent rendered as a <button> (no destination, e.g. url '#'). Only the
   form-control chrome is reset here — font and colour deliberately are NOT set,
   because this theme's own `.primary-nav a, .primary-nav button.nav-parent`
   rule above supplies them. Declaring `color: inherit` here would outrank it
   (0,3,1 against 0,2,1) and leave the parent grey among white siblings. */
.primary-nav .nav-item button.nav-parent {
  background: none; border: 0; cursor: pointer;
}
.primary-nav .nav-toggle {
  background: none; border: 0; padding: 0 4px;
  color: inherit; cursor: pointer; line-height: 0;
}
/* The caret-only button is mobile-only. A parent that IS the toggle (no
   destination, so it is a <button> rather than a link) must stay visible on
   desktop — hiding every .nav-toggle would erase the parent's label. */
.primary-nav .nav-toggle:not(.nav-parent) { display: none; }
.primary-nav .nav-caret { transition: transform .2s ease; }

.primary-nav .nav-submenu { display: none; }
.primary-nav .nav-submenu a {
  display: block; padding: 8px 12px; border-radius: 6px;
  text-transform: none; letter-spacing: 0;
}

/* The floating card is a desktop shape, and so is its colour. Scoping it to
   min-width keeps `color: var(--ink)` off the collapsed panel, which sits on
   the header's own dark background — inside the breakpoint the links simply
   inherit this theme's `.primary-nav a` colour and stay readable without this
   file having to know what that colour is. */
@media (min-width: 641px) {
  .primary-nav .nav-submenu {
    position: absolute; top: 100%; left: 0; z-index: 120;
    min-width: 210px; padding: 8px;
    background: var(--bg-card, var(--white)); border: 1px solid var(--border);
    border-radius: 10px; box-shadow: var(--shadow-md);
  }
  .primary-nav .nav-submenu a { white-space: nowrap; color: var(--ink); }
  .primary-nav .nav-submenu a:hover { background: var(--border); color: var(--ink); }
}

/* Desktop opens on hover, and on keyboard focus so it is reachable without a
   mouse. `hover: hover` keeps a touch device from latching it open. */
@media (hover: hover) {
  .primary-nav .nav-item--has-children:hover > .nav-submenu { display: block; }
}
.primary-nav .nav-item--has-children:focus-within > .nav-submenu { display: block; }

@media (max-width: 640px) {
  /* In the mobile panel the nav is a column, so a parent takes a full row and
     its children stack underneath. Hover is meaningless here: the caret button
     drives it, and .open is what shows the panel. */
  /* Block, not flex: the parent and its caret then flow inline exactly like a
     sibling <a>, inheriting whatever text-align the theme gives its collapsed
     nav instead of this file imposing one. The submenu is a block underneath. */
  /* No width here on purpose. The collapsed nav is a flex column and each
     theme positions its items with align-items, so a shrink-to-fit wrapper
     lands exactly where a sibling <a> does; forcing width:100% stretched the
     row and dropped its text to the left of centred siblings. */
  .primary-nav .nav-item,
  .primary-nav .nav-item--has-children { display: block; }
  .primary-nav .nav-item .nav-parent { display: inline-flex; }
  .primary-nav .nav-toggle:not(.nav-parent) { display: inline-flex; align-items: center; padding: 10px 12px; }
  .primary-nav .nav-item--has-children:hover > .nav-submenu,
  .primary-nav .nav-item--has-children:focus-within > .nav-submenu { display: none; }
  .primary-nav .nav-item--has-children.open > .nav-submenu { display: block; }
  .primary-nav .nav-item--has-children.open .nav-caret { transform: rotate(180deg); }
  .primary-nav .nav-submenu {
    position: static; width: auto; min-width: 0; order: 3;
    margin: 4px 0 6px; box-shadow: none; background: transparent; border: 0;
    border-left: 2px solid var(--border); border-radius: 0; padding: 2px 0 2px 12px;
  }
  .primary-nav .nav-submenu a { white-space: normal; }
}

/* ---------- Primary nav submenus · touch above the collapse width ---------- */
/* An iPad is 768-1366px wide, so it sits ABOVE this theme's collapse
   breakpoint and gets the desktop treatment: caret display:none, submenu on
   :hover. A touch device has neither. Tapping a linked parent just followed
   the link, and its children were unreachable at any width. (A '#' parent
   happened to keep working — it renders as a <button>, so :focus-within fired
   on tap. Only linked parents were affected, which is why it looked partial.)

   Hand touch devices the caret and the same .open mechanism the collapsed
   layout already uses. The parent link keeps its own tap, so the destination
   stays reachable in one tap and the caret is what opens the panel.

   Gated on .nav-touch from main.js rather than (hover: none)/(pointer: coarse):
   iPadOS Safari in desktop mode can report itself as hover-capable, and the
   media query would then silently never match on the exact device this is for.
   Without the class nothing here applies, so a JS failure leaves the existing
   desktop behaviour untouched. */
@media (min-width: 641px) {
  .nav-touch .primary-nav .nav-toggle:not(.nav-parent) {
    display: inline-flex;
    align-items: center;
  }
  /* :focus-within must not fight .open up here: tapping the caret leaves it
     focused, so focus-within would re-open the panel the same tap just closed.

     :hover is deliberately NOT neutralised. Its rule already sits inside
     @media (hover: hover), so on a pure touch device it is inert anyway — and
     maxTouchPoints is true for hybrids too (touchscreen laptops, iPad with a
     trackpad), where hover-to-open is real and worth keeping alongside the
     caret. Cancelling it here would take that away for no gain. */
  .nav-touch .primary-nav .nav-item--has-children:focus-within > .nav-submenu {
    display: none;
  }
  .nav-touch .primary-nav .nav-item--has-children.open > .nav-submenu {
    display: block;
  }
  .nav-touch .primary-nav .nav-item--has-children.open .nav-caret {
    transform: rotate(180deg);
  }
}
