/* ══════════════════════════════════════════════════════════════
   RALLY EDITORIAL — editorial.css
   New editorial design layer. Loaded after style.css.
   ══════════════════════════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────────────────────────── */
:root {
  --ed-ink:    #1b1a17;
  --ed-green:  #5A775E;
  --ed-cream:  #f7f4ee;
  --ed-tan:    #ebe3d3;
  --ed-warm:   #4a4942;
  --ed-rule:   #e4e1d9;
  --ed-rule-h: #ece7dd;
  --ed-muted:  #9a9d94;
  --ed-soft:   #6b6a63;
  --ed-max:    1280px;
}


/* ══════════════════════════════════════════════════════════════
   HEADER WRAPPER
   ══════════════════════════════════════════════════════════════ */

.editorial-header-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  transition: box-shadow 0.25s ease;
}

.editorial-header-wrapper.scrolled {
  box-shadow: 0 2px 16px rgba(27,26,23,0.10);
}


/* ══════════════════════════════════════════════════════════════
   UTILITY STRIP
   ══════════════════════════════════════════════════════════════ */

.editorial-utility-strip {
  border-bottom: 1px solid var(--ed-rule);
  font-family: 'Outfit', sans-serif;
}

.editorial-utility-inner {
  max-width: var(--ed-max);
  margin: 0 auto;
  padding: 0 32px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ed-soft);
}

.editorial-utility-left {
  flex: 1;
  white-space: nowrap;
}

.editorial-utility-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.editorial-utility-sep {
  color: #d8d4cb;
  pointer-events: none;
}

.editorial-utility-region {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ed-soft);
  font-size: 11px;
  font-family: 'Outfit', sans-serif;
  transition: color 0.15s;
}

.editorial-utility-region:hover { color: var(--ed-ink); }

.editorial-utility-search {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
  color: var(--ed-soft);
  transition: color 0.15s;
}

.editorial-utility-search:hover { color: var(--ed-ink); }

.editorial-utility-signin {
  all: unset;
  cursor: pointer;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ed-ink);
  font-weight: 600;
  font-size: 11px;
  font-family: 'Outfit', sans-serif;
  transition: color 0.15s;
}

.editorial-utility-signin:hover { color: var(--ed-green); }


/* ══════════════════════════════════════════════════════════════
   MASTHEAD
   ══════════════════════════════════════════════════════════════ */

.editorial-masthead {
  text-align: center;
  padding: 26px 32px 20px;
  user-select: none;
}

.editorial-masthead-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.editorial-masthead-mark {
  height: 56px;
  width: auto;
  display: block;
}

.editorial-masthead-wordmark {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-style: italic;
  color: var(--ed-green);
  font-size: 60px;
  line-height: 0.9;
  letter-spacing: -0.02em;
}


/* ══════════════════════════════════════════════════════════════
   CATEGORY NAV  (#catBar)
   ══════════════════════════════════════════════════════════════ */

.editorial-nav {
  border-top: 1px solid var(--ed-ink);
  border-bottom: 1px solid var(--ed-rule);
  font-family: 'Outfit', sans-serif;
  background: #fff;
  /* JS collapses via max-height / opacity / padding inline styles */
  max-height: 100px;
  overflow: hidden;
  opacity: 1;
  transition: max-height 0.25s ease, opacity 0.25s ease, padding 0.25s ease;
}

.editorial-nav-inner {
  max-width: var(--ed-max);
  margin: 0 auto;
  padding: 12px 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 22px;
  font-size: 12.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  position: relative;
}

/* Override existing cat-pill styles inside editorial nav */
.editorial-nav .cat-pill {
  color: var(--ed-ink);
  font-weight: 500;
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  font-size: 12.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: none;
  border: none;
  padding: 0;
  transition: color 0.15s;
  cursor: pointer;
}

.editorial-nav .cat-pill:hover { color: var(--ed-green); }

.editorial-nav .cat-pill.active {
  color: var(--ed-green);
  font-weight: 700;
  background: none;
  border: none;
}

/* Originals pill in editorial nav */
.editorial-nav .cat-pill-originals {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
}

/* Categories button (shown in scrolled state) */
.editorial-categories-btn {
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
}


/* ══════════════════════════════════════════════════════════════
   CONTENT AREA — width override to 1280px
   ══════════════════════════════════════════════════════════════ */

.content {
  max-width: var(--ed-max);
  padding: 32px 32px 0;
}

/* Featured wrapper fills width when banner is hidden */
.featured-wrapper.banner-hidden {
  display: block;
}

.featured-wrapper.banner-hidden #featuredArticle {
  flex: none;
  width: 100%;
}


/* ══════════════════════════════════════════════════════════════
   RALLYING CRY EDITORIAL BAND
   ══════════════════════════════════════════════════════════════ */

.editorial-rc-band {
  background: var(--ed-cream);
  border-top: 1px solid var(--ed-rule-h);
  border-bottom: 1px solid var(--ed-rule-h);
  padding: 48px 32px;
  text-align: center;
  margin-top: 56px;
}

/* Homepage hero: H1 + mission in a tan card flush against the Rallying Cry band */
.editorial-hero-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: 56px;
  margin-bottom: 40px;
}
.editorial-hero-row > #editorialRCBand {
  flex: 1 1 auto;
  min-width: 0;
  /* Zero ALL margins (other #editorialRCBand rules set top *and* bottom margins);
     ID-level specificity here beats them so the band is flush with the hero card. */
  margin: 0;
}
.editorial-hero-card {
  flex: 0 0 340px;
  background: var(--ed-tan);
  color: var(--ed-ink);
  border-radius: 0;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.editorial-hero-title {
  margin: 0;
  font-family: 'Lora', Georgia, serif;
  font-size: 2.1rem;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ed-ink);
}
.editorial-hero-text {
  margin: 16px 0 0;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ed-warm);
}
.editorial-hero-btn {
  margin: 20px 0 0;
  display: inline-block;
  background: var(--ed-green);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 11px 26px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.15s ease;
}
.editorial-hero-btn:hover { background: #4a6450; }
@media (max-width: 900px) {
  .editorial-hero-row { flex-direction: column; gap: 0; margin-top: 40px; }
  .editorial-hero-row > #editorialRCBand { margin: 0; }
  .editorial-hero-card { flex-basis: auto; margin-top: 0; }
}

.editorial-rc-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ed-green);
}

.editorial-rc-text {
  font-family: 'Lora', Georgia, serif;
  font-size: 22px;
  line-height: 1.55;
  color: #2b2a24;
  max-width: 760px;
  margin: 0 auto;
  letter-spacing: -0.01em;
}

/* Override .rallying-cry-text inside editorial band */
#editorialRCBand .rallying-cry-text {
  font-family: 'Lora', Georgia, serif;
  font-size: 22px;
  line-height: 1.55;
  color: #2b2a24;
  max-width: 760px;
  margin: 0 auto;
  letter-spacing: -0.01em;
}

/* Hide toggle button in editorial band — RC always shows in full */
#editorialRCBand .rallying-cry-toggle-btn {
  display: none !important;
}


/* ══════════════════════════════════════════════════════════════
   ORIGINALS EDITORIAL BAND
   ══════════════════════════════════════════════════════════════ */

.editorial-originals-band {
  background: var(--ed-ink);
  color: #f3f1ea;
  padding: 46px 32px;
  margin-top: 0;
}

.editorial-originals-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  max-width: var(--ed-max);
  margin-left: auto;
  margin-right: auto;
}

.editorial-originals-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #a8bdac;
  white-space: nowrap;
}

.editorial-originals-rule {
  flex: 1;
  height: 1px;
  background: #3a3833;
}

.editorial-originals-sub {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a887f;
  white-space: nowrap;
}

.editorial-originals-grid {
  max-width: var(--ed-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 38px;
  align-items: start;
}

/* If JS populates originals grid with standard cards, restyle them */
.editorial-originals-grid .hero-card,
.editorial-originals-grid .medium-card,
.editorial-originals-grid .regular-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.editorial-originals-grid .hero-title,
.editorial-originals-grid .medium-title,
.editorial-originals-grid .regular-title,
.editorial-originals-grid h2,
.editorial-originals-grid h3 {
  font-family: 'Lora', serif;
  color: #f3f1ea;
}

.editorial-originals-grid .hero-description,
.editorial-originals-grid .medium-description,
.editorial-originals-grid p {
  color: #c9c6bd;
}

.editorial-originals-grid .article-source,
.editorial-originals-grid .article-date {
  color: #8a887f;
}


/* ══════════════════════════════════════════════════════════════
   NEWSLETTER — editorial overrides
   ══════════════════════════════════════════════════════════════ */

.newsletter-card {
  max-width: var(--ed-max);
  margin: 0 auto;
  border-left: none;
  border-right: none;
  border-radius: 0;
  border-top: 1px solid var(--ed-rule);
  border-bottom: 1px solid var(--ed-rule);
  padding: 46px 32px;
  background: #fff;
  text-align: center;
}

.newsletter-card h2 {
  font-family: 'Lora', Georgia, serif;
  font-weight: 600;
  font-size: 30px;
  letter-spacing: -0.01em;
}

.newsletter-card p {
  font-family: 'Lora', Georgia, serif;
  font-size: 16px;
  max-width: 500px;
  margin: 0 auto 24px;
}

.newsletter-form {
  max-width: 460px;
  margin: 0 auto;
}

.newsletter-form-row {
  border: 1px solid var(--ed-ink);
  display: flex;
  gap: 0;
}

.newsletter-email-input {
  border: none;
  border-radius: 0;
  font-family: 'Lora', serif;
}

.newsletter-email-input:focus {
  outline: none;
  border-color: transparent;
}

.newsletter-submit-btn {
  border-radius: 0;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--ed-ink);
  color: #fff;
  border: none;
  padding: 0 24px;
  transition: background 0.15s;
}

.newsletter-submit-btn:hover {
  background: var(--ed-green);
}


/* ══════════════════════════════════════════════════════════════
   FOOTER — editorial overrides
   ══════════════════════════════════════════════════════════════ */

.footer {
  margin-top: 0;
}

.footer-content {
  max-width: var(--ed-max);
}


/* ══════════════════════════════════════════════════════════════
   DARK MODE OVERRIDES
   ══════════════════════════════════════════════════════════════ */

[data-theme="dark"] .editorial-header-wrapper,
[data-theme="dark"] .editorial-utility-strip,
[data-theme="dark"] .editorial-nav {
  background: var(--bg-main);
}

[data-theme="dark"] .editorial-masthead-wordmark {
  color: var(--rally-green);
}

[data-theme="dark"] .editorial-nav {
  border-top-color: var(--border-color);
  border-bottom-color: var(--border-color);
}

[data-theme="dark"] .editorial-rc-band {
  background: #1e1c18;
  border-color: #2e2c26;
}

[data-theme="dark"] .editorial-rc-text,
[data-theme="dark"] #editorialRCBand .rallying-cry-text {
  color: #e8e4d8;
}

[data-theme="dark"] .editorial-originals-band {
  background: #0f0e0c;
}

[data-theme="dark"] .newsletter-card {
  background: var(--bg-main);
  border-color: var(--border-color);
}

[data-theme="dark"] .newsletter-form-row {
  border-color: var(--border-color);
}

[data-theme="dark"] .newsletter-submit-btn {
  background: var(--rally-green);
}

[data-theme="dark"] .newsletter-submit-btn:hover {
  background: var(--rally-green-hover);
}


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

@media (max-width: 900px) {
  .editorial-masthead-wordmark { font-size: 48px; }
  .editorial-masthead-mark { height: 44px; }
  .editorial-masthead { padding: 18px 24px 14px; }

  .editorial-utility-inner { padding: 0 20px; }
  .editorial-nav-inner { padding: 10px 20px; gap: 6px 16px; }
  .editorial-categories-btn { left: 20px; }

  .content { padding: 24px 20px 0; }

  .editorial-originals-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .editorial-rc-band { padding: 36px 24px; }
  .editorial-rc-text,
  #editorialRCBand .rallying-cry-text { font-size: 19px; }

  .editorial-originals-band { padding: 36px 24px; }

  .newsletter-card { padding: 36px 24px; }
}

@media (max-width: 600px) {
  .editorial-masthead-wordmark { font-size: 40px; }
  .editorial-masthead-mark { height: 36px; }
  .editorial-masthead { padding: 14px 20px 12px; }

  .editorial-utility-left { display: none; }

  .editorial-nav-inner {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px 14px;
    font-size: 11.5px;
    padding: 10px 16px;
  }
  .editorial-nav-inner::-webkit-scrollbar { display: none; }
  .editorial-categories-btn { left: 16px; }

  .content { padding: 20px 16px 0; }

  .editorial-originals-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .editorial-originals-header { flex-wrap: wrap; gap: 6px; }
  .editorial-originals-rule { display: none; }

  .editorial-rc-text,
  #editorialRCBand .rallying-cry-text { font-size: 17px; }

  .newsletter-form-row { flex-direction: column; border: none; }
  .newsletter-email-input { border: 1px solid var(--ed-rule); border-radius: 0; padding: 12px 14px; }
  .newsletter-submit-btn { padding: 13px 24px; border: none; }
}


/* ══════════════════════════════════════════════════════════════
   EDITORIAL NAV — hide category icons (text-only nav)
   ══════════════════════════════════════════════════════════════ */
.editorial-nav .cat-icon { display: none; }
.editorial-nav .cat-pill.active .cat-icon { display: none; }


/* ══════════════════════════════════════════════════════════════
   CATEGORY MASTHEAD  ("The Good News In / Climate")
   JS renders: .cat-kicker + h1 + .cat-standfirst inside #categoryHeader
   ══════════════════════════════════════════════════════════════ */
/* Empty on the home feed — collapse it entirely (no stray rule / gap) */
.category-header:empty { display: none; margin: 0; padding: 0; border: none; }

.category-header {
  text-align: center;
  padding: 50px 0 30px;
  border-bottom: 1px solid var(--ed-ink);
  margin-bottom: 34px;
}

.category-header .cat-kicker {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ed-muted);
  margin-bottom: 14px;
}

.category-header h1 {
  font-family: 'Lora', Georgia, serif;
  font-weight: 600;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--ed-green);
  margin: 0;
}

.category-header .cat-standfirst {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-size: 18px;
  line-height: 1.5;
  color: #55534a;
  max-width: 580px;
  margin: 18px auto 0;
}

[data-theme="dark"] .category-header { border-bottom-color: var(--border-color); }
[data-theme="dark"] .category-header .cat-standfirst { color: var(--text-secondary); }


/* ══════════════════════════════════════════════════════════════
   FEED — editorial section heading + grid spacing
   ══════════════════════════════════════════════════════════════ */
#articleFeed { gap: 38px 34px; margin-bottom: 40px; }

/* Jump Right In → editorial (drop the green box, make it a clean band) */
.jump-right-in {
  background: transparent;
  border-radius: 0;
  padding: 0;
  margin-bottom: 14px;
}
.jump-right-in h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ed-ink);
  border-bottom: 2px solid var(--ed-ink);
  padding-bottom: 12px;
  margin-bottom: 26px;
}
[data-theme="dark"] .jump-right-in h2 { color: var(--text-primary); border-bottom-color: var(--text-primary); }


/* ── Card system → editorial typography ───────────────────────── */
.hero-card,
.medium-card,
.jump-card {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}
.hero-card:hover,
.medium-card:hover,
.jump-card:hover {
  transform: none;
  box-shadow: none;
  opacity: 0.9;
}

.hero-image,
.medium-image,
.jump-image {
  border-radius: 0;
  background-color: #eef0eb;
}
.hero-card { gap: 0; }
.hero-content { padding: 0 0 0 32px; }
.medium-content { padding: 14px 0 0; }
.jump-content { padding: 14px 0 0; }

.hero-title,
.medium-title,
.jump-title,
.regular-title,
.stacked-title {
  font-family: 'Lora', Georgia, serif !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em;
  color: var(--ed-ink);
}
[data-theme="dark"] .hero-title,
[data-theme="dark"] .medium-title,
[data-theme="dark"] .jump-title,
[data-theme="dark"] .regular-title,
[data-theme="dark"] .stacked-title { color: var(--text-primary); }

/* Carousel headline stays white over the photo (editorial serif) */
.featured-carousel .featured-title {
  font-family: 'Lora', Georgia, serif !important;
  font-weight: 600 !important;
  color: #fff !important;
}
.featured-carousel .featured-title,
.featured-carousel .featured-first-para,
.featured-carousel .article-source,
.featured-carousel .article-date { color: #fff; }

.hero-title { font-size: 28px; }
.medium-title { font-size: 20px; }
.jump-title { font-size: 20px; }

.hero-description,
.medium-description {
  font-family: 'Lora', Georgia, serif;
  color: var(--ed-warm);
}

/* Source/meta → editorial uppercase Outfit */
.article-source { font-weight: 600; color: var(--ed-ink); }
.article-date,
.jump-source { color: var(--ed-muted); }

.stacked-container { background: transparent; padding: 0; border-radius: 0; }
.regular-card,
.stacked-card { border-bottom: 1px solid var(--ed-rule); }
.regular-card:hover,
.stacked-card:hover { background: transparent; padding: 16px 0; margin: 0; opacity: 0.75; }


/* ══════════════════════════════════════════════════════════════
   READER MODE — editorial print layout
   (rewritten markup in script.js → .reader-view.reader-editorial)
   ══════════════════════════════════════════════════════════════ */
.reader-view.reader-editorial {
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
  background: #fff;
  animation: rvFadeEd 0.3s ease;
}
@keyframes rvFadeEd { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
[data-theme="dark"] .reader-view.reader-editorial { background: var(--bg-main); }

/* Chrome bar */
.reader-editorial .rv-chrome {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: none;
  font-family: 'Outfit', sans-serif;
}
[data-theme="dark"] .reader-editorial .rv-chrome { background: rgba(18,18,18,0.92); border-bottom-color: var(--border-color); }

.reader-editorial .rv-chrome-back {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ed-soft);
  transition: color 0.15s;
}
.reader-editorial .rv-chrome-back:hover { color: var(--ed-ink); }
[data-theme="dark"] .reader-editorial .rv-chrome-back:hover { color: var(--text-primary); }

.reader-editorial .rv-chrome-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}
.reader-editorial .rv-chrome-brand img { height: 26px; width: auto; display: block; }
.reader-editorial .rv-chrome-brand span {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-style: italic;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ed-green);
}
.reader-editorial .rv-chrome-actions { display: flex; align-items: center; gap: 4px; }
.reader-editorial .rv-chrome-actions button {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--ed-soft);
  transition: color 0.15s;
}
.reader-editorial .rv-chrome-actions button:hover { color: var(--ed-green); }
.reader-editorial .rv-chrome-actions .rv-close-btn { color: var(--ed-ink); }
[data-theme="dark"] .reader-editorial .rv-chrome-actions .rv-close-btn { color: var(--text-primary); }
.reader-editorial .rv-save-btn.saved svg { fill: var(--ed-green); stroke: var(--ed-green); }

/* Article body */
.reader-editorial .rv-article {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}
.reader-editorial .rv-article-header {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 0 24px;
  text-align: center;
}
.reader-editorial .rv-kicker {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ed-green);
  margin-bottom: 20px;
}
.reader-editorial .rv-title {
  font-family: 'Lora', Georgia, serif;
  font-weight: 600;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ed-ink);
  margin: 0;
  position: static;
  max-width: none;
}
[data-theme="dark"] .reader-editorial .rv-title { color: var(--text-primary); }
.reader-editorial .rv-standfirst {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-size: 21px;
  line-height: 1.45;
  color: #55534a;
  margin: 22px auto 0;
  max-width: 600px;
}
[data-theme="dark"] .reader-editorial .rv-standfirst { color: var(--text-secondary); }

/* Byline row */
.reader-editorial .rv-byline {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 0;
  border-top: 1px solid var(--ed-rule);
  border-bottom: 1px solid var(--ed-rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-family: 'Outfit', sans-serif;
}
[data-theme="dark"] .reader-editorial .rv-byline { border-color: var(--border-color); }
.reader-editorial .rv-byline-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ed-muted);
}
.reader-editorial .rv-publisher {
  color: var(--ed-ink);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.06em;
}
.reader-editorial .rv-publisher:hover { color: var(--ed-green); }
[data-theme="dark"] .reader-editorial .rv-publisher { color: var(--text-primary); }
.reader-editorial .rv-byline-sep { color: #d8d4cb; }
.reader-editorial .rv-original-tag { display: inline-flex; align-items: center; gap: 6px; color: var(--ed-green); font-weight: 700; }
.reader-editorial .rv-flag-pill {
  position: static;
  background: transparent;
  border: 1px solid var(--ed-rule);
  border-radius: 40px;
  padding: 7px 12px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ed-muted);
  backdrop-filter: none;
}
.reader-editorial .rv-flag-pill:hover { color: var(--ed-ink); border-color: #c9c4b8; background: transparent; }
.reader-editorial .rv-flag-pill.flagged,
.reader-editorial .rv-flag-pill:disabled { color: var(--ed-muted); border-color: var(--ed-rule); opacity: 0.7; }

/* Figure */
.reader-editorial .rv-figure { margin: 34px auto 0; max-width: 980px; }
.reader-editorial .rv-figure-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: #eef0eb;
}
.reader-editorial .rv-figcaption {
  font-family: 'Outfit', sans-serif;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ed-muted);
  margin-top: 12px;
  max-width: 720px;
}

/* Prose */
.reader-editorial .rv-prose {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 0 0;
}
.reader-editorial .rv-prose p,
.reader-editorial .rv-prose .rv-rich-content {
  font-family: 'Lora', Georgia, serif;
  font-size: 20px;
  line-height: 1.72;
  color: #26251f;
  margin: 0 0 26px;
}
[data-theme="dark"] .reader-editorial .rv-prose p,
[data-theme="dark"] .reader-editorial .rv-prose .rv-rich-content { color: var(--text-primary); }
.reader-editorial .rv-prose--dropcap > p:first-of-type::first-letter {
  font-family: 'Lora', Georgia, serif;
  font-weight: 600;
  float: left;
  font-size: 84px;
  line-height: 0.72;
  padding: 8px 14px 0 0;
  color: var(--ed-green);
}
.reader-editorial .rv-rich-content a { color: var(--ed-green); text-decoration: underline; }
.reader-editorial .rv-rich-content strong { font-weight: 700; }
.reader-editorial .rv-rich-content em { font-style: italic; }
.reader-editorial .rv-rich-content ul,
.reader-editorial .rv-rich-content ol { margin: 0.5em 0 1em 1.5em; }

/* Source handoff */
.reader-editorial .rv-handoff-wrap { max-width: 680px; margin: 14px auto 0; }
.reader-editorial .rv-handoff {
  border: 1px solid var(--ed-ink);
  padding: 34px 36px;
  text-align: center;
}
[data-theme="dark"] .reader-editorial .rv-handoff { border-color: var(--text-secondary); }
.reader-editorial .rv-handoff-kicker {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ed-muted);
  margin-bottom: 14px;
}
.reader-editorial .rv-handoff-title {
  font-family: 'Lora', Georgia, serif;
  font-weight: 600;
  font-size: 25px;
  line-height: 1.2;
  margin: 0 0 20px;
  color: var(--ed-ink);
}
[data-theme="dark"] .reader-editorial .rv-handoff-title { color: var(--text-primary); }
.reader-editorial .rv-handoff-title span { color: var(--ed-green); }
.reader-editorial .rv-continue-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--ed-ink);
  text-decoration: none;
  padding: 15px 30px;
  border-radius: 0;
  transition: background 0.15s;
}
.reader-editorial .rv-continue-btn:hover { background: var(--ed-green); }
.reader-editorial .rv-handoff-note {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ed-soft);
  margin: 22px auto 0;
  max-width: 430px;
}
.reader-editorial .rv-original-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  background: var(--ed-cream);
  border: 1px solid var(--ed-rule-h);
  color: var(--ed-green);
  border-radius: 0;
  padding: 24px 28px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
}

/* Article-level Save/Share buttons */
.reader-editorial .rv-article-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 26px 0 0;
}
.reader-editorial .rv-article-actions button {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ed-ink);
  border: 1px solid #d6d1c6;
  padding: 12px 22px;
  transition: border-color 0.15s;
}
.reader-editorial .rv-article-actions button:hover { border-color: var(--ed-ink); }
[data-theme="dark"] .reader-editorial .rv-article-actions button { color: var(--text-primary); border-color: var(--border-color); }

/* Prev/Next pager */
.reader-editorial .rv-pager {
  max-width: 980px;
  margin: 54px auto 0;
  border-top: 1px solid var(--ed-rule);
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
}
[data-theme="dark"] .reader-editorial .rv-pager { border-top-color: var(--border-color); }
.reader-editorial .rv-pager-divider { background: var(--ed-rule); }
.reader-editorial .rv-pager button {
  all: unset;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 26px 40px 26px 24px;
  transition: opacity 0.15s;
}
.reader-editorial .rv-pager button:hover { opacity: 0.62; }
.reader-editorial .rv-pager-next { padding: 26px 24px 26px 40px; text-align: right; align-items: flex-end; }
.reader-editorial .rv-pager-label {
  font-family: 'Outfit', sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ed-muted);
  display: flex;
  align-items: center;
  gap: 7px;
}
.reader-editorial .rv-pager-title {
  font-family: 'Lora', Georgia, serif;
  font-weight: 600;
  font-size: 19px;
  line-height: 1.22;
  color: var(--ed-ink);
}
[data-theme="dark"] .reader-editorial .rv-pager-title { color: var(--text-primary); }

/* Close row */
.reader-editorial .rv-close-row { text-align: center; padding: 40px 0 64px; }
.reader-editorial .rv-close-link {
  all: unset;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ed-green);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.reader-editorial .rv-close-link:hover { color: #455e49; }

/* Reader prev/next floating arrows → editorial squares */
.reader-editorial .rv-nav {
  border-radius: 0;
  background: rgba(255,255,255,0.9);
  box-shadow: none;
  border: 1px solid var(--ed-rule);
  top: 320px;
}
.reader-editorial .rv-nav:hover { background: #fff; transform: translateY(-50%) scale(1.05); }
[data-theme="dark"] .reader-editorial .rv-nav { background: rgba(30,30,30,0.9); border-color: var(--border-color); }


/* ══════════════════════════════════════════════════════════════
   PROFILE PANEL — editorial polish
   ══════════════════════════════════════════════════════════════ */
.side-panel .panel-header h2 { font-family: 'Outfit', sans-serif; font-weight: 700; }
.panel-tabs .tab-btn { font-family: 'Outfit', sans-serif; letter-spacing: 0.02em; }
.panel-tabs .tab-btn.active { color: var(--ed-green); }
.pref-pill.active { background: var(--ed-green); border-color: var(--ed-green); }
.login-scroll-inner h2 { font-family: 'Lora', Georgia, serif; font-weight: 600; }


/* ══════════════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════════════ */
.empty-state h2 { font-family: 'Lora', Georgia, serif; font-weight: 600; }


/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — reader + feed
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  #articleFeed { grid-template-columns: 1fr 1fr; gap: 28px; }
  .hero-card { grid-column: span 2; grid-template-columns: 1fr; max-height: none; }
  .hero-content { padding: 14px 0 0; }
  .reader-editorial .rv-prose p,
  .reader-editorial .rv-prose .rv-rich-content { font-size: 18px; }
}

@media (max-width: 600px) {
  #articleFeed { grid-template-columns: 1fr; }
  .hero-card { grid-column: span 1; }
  .category-header { padding: 32px 0 22px; }
  .reader-editorial .rv-article { padding: 0 18px; }
  .reader-editorial .rv-prose--dropcap > p:first-of-type::first-letter { font-size: 60px; }
  .reader-editorial .rv-pager { grid-template-columns: 1fr; }
  .reader-editorial .rv-pager-divider { display: none; }
  .reader-editorial .rv-pager-next { padding: 26px 0; text-align: left; align-items: flex-start; }
  .reader-editorial .rv-pager button { padding: 22px 0; border-top: 1px solid var(--ed-rule); }
}


/* RC band: never clip the cry (it shows in full, no Read-more toggle) */
#editorialRCBand .rallying-cry-wrapper { max-height: none !important; overflow: visible !important; }
#editorialRCBand .rallying-cry-wrapper::after { display: none !important; }


/* ══════════════════════════════════════════════════════════════
   FEED LAYOUT v2 — three across, then one full-width feature
   ══════════════════════════════════════════════════════════════ */
#articleFeed {
  grid-template-columns: repeat(3, 1fr);
  gap: 46px 40px;
  grid-auto-flow: row;
}

/* equal-thirds card */
.medium-card { grid-column: span 1; background: transparent; box-shadow: none; border-radius: 0; }
.medium-image { height: auto; aspect-ratio: 3 / 2; border-radius: 0; }
.medium-content { padding: 16px 0 0; }

/* full-width feature (every 4th) */
.hero-card {
  grid-column: 1 / -1;
  grid-template-columns: 1.25fr 1fr;
  gap: 40px;
  min-height: 320px;
  max-height: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  border-top: 1px solid var(--ed-rule);
  border-bottom: 1px solid var(--ed-rule);
  padding: 34px 0;
}
.hero-image { height: 100%; min-height: 280px; border-radius: 0; }
.hero-content { padding: 0; justify-content: center; }
.hero-title { font-size: 32px; }
.hero-description { font-size: 16px; }

[data-theme="dark"] .hero-card { border-color: var(--border-color); }


/* ══════════════════════════════════════════════════════════════
   CAROUSEL — square corners, hairline frame
   ══════════════════════════════════════════════════════════════ */
.featured-carousel,
.featured-carousel .featured-card {
  border-radius: 0 !important;
}
.featured-carousel { border: 1px solid var(--ed-rule); box-shadow: none; }
.featured-carousel .featured-card { box-shadow: none; }
.featured-carousel .featured-card:hover { transform: none; }


/* ══════════════════════════════════════════════════════════════
   NAV v2 — single line + overflow "More" dropdown, no hover chrome
   ══════════════════════════════════════════════════════════════ */
.editorial-nav-inner {
  flex-wrap: nowrap;
  overflow: hidden;
  justify-content: center;
}

/* Text-only pills — never show a border/background on hover, focus or active */
.editorial-nav .cat-pill {
  white-space: nowrap;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.editorial-nav .cat-pill:hover,
.editorial-nav .cat-pill:focus,
.editorial-nav .cat-pill:active,
.editorial-nav .cat-pill.active {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--ed-green) !important;
}

/* Originals keeps its star on every page */
.editorial-nav .cat-pill-originals .cat-icon {
  display: inline-block !important;
  width: 12px;
  height: 12px;
  color: var(--ed-green);
  margin-right: 1px;
}

/* "More" overflow button (reuses #categoriesBtn) */
.editorial-categories-btn {
  position: static !important;
  transform: none !important;
  order: 999;
  margin: 0;
  padding: 0;
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  color: var(--ed-ink);
  font-family: 'Outfit', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  cursor: pointer;
}
.editorial-categories-btn:hover {
  color: var(--ed-green) !important;
  background: none !important;
  border: none !important;
}
[data-theme="dark"] .editorial-categories-btn { color: var(--text-primary); }

/* Overflow dropdown — anchored under the nav, right side */
.editorial-header-wrapper .categories-dropdown {
  left: auto;
  right: 32px;
  top: 100%;
  border-radius: 0;
  border: 1px solid var(--ed-rule);
  box-shadow: var(--shadow-md);
  padding: 8px;
}
.editorial-header-wrapper .cat-dropdown-pill {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 0;
}
.editorial-header-wrapper .cat-dropdown-pill:hover { color: var(--ed-green); background: var(--ed-cream); }


/* ══════════════════════════════════════════════════════════════
   AUTH SLOT — Sign In / Sign Up, avatar when logged in
   ══════════════════════════════════════════════════════════════ */
.editorial-auth-slot { display: inline-flex; align-items: center; gap: 12px; }
.editorial-utility-signup {
  all: unset;
  cursor: pointer;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ed-ink);
  font-weight: 600;
  font-size: 11px;
  font-family: 'Outfit', sans-serif;
  transition: color 0.15s;
}
.editorial-utility-signup:hover { color: var(--ed-green); }
[data-theme="dark"] .editorial-utility-signup { color: var(--text-primary); }

.editorial-auth-avatar {
  all: unset;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ed-green);
  transition: box-shadow 0.15s;
}
.editorial-auth-avatar:hover { box-shadow: 0 0 0 2px var(--ed-green); }
.editorial-auth-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.editorial-auth-avatar-initial { color: #fff; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 13px; }


/* ══════════════════════════════════════════════════════════════
   REGION — dropdown from the header icon (not a centered popup)
   ══════════════════════════════════════════════════════════════ */
.region-popup-overlay { background: transparent; backdrop-filter: none; }
.region-popup-overlay .region-popup {
  border-radius: 0;
  border: 1px solid var(--ed-rule);
  box-shadow: var(--shadow-lg);
  width: 248px;
  max-width: 92vw;
  padding: 16px 16px 12px;
}
.region-popup-overlay .region-popup h3 { font-family: 'Outfit', sans-serif; font-size: 13px; letter-spacing: 0.04em; }
.region-popup-overlay .region-option-btn { border-radius: 0; }
.region-popup-overlay .region-option-btn.active { background: var(--ed-green); border-color: var(--ed-green); color: #fff; }


/* ══════════════════════════════════════════════════════════════
   RALLYING CRY BAND — tighter under the carousel
   ══════════════════════════════════════════════════════════════ */
.content > #editorialRCBand,
#editorialRCBand { margin-top: 36px; }
#editorialRCBand .rallying-cry-info-btn { vertical-align: middle; }


/* ══════════════════════════════════════════════════════════════
   FEED RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  #articleFeed { grid-template-columns: repeat(2, 1fr); gap: 34px 28px; }
  .hero-card { grid-column: 1 / -1; grid-template-columns: 1fr; gap: 16px; }
  .hero-image { min-height: 220px; aspect-ratio: 16 / 9; height: auto; }
}
@media (max-width: 600px) {
  #articleFeed { grid-template-columns: 1fr; gap: 30px; }
}


/* ══════════════════════════════════════════════════════════════
   v3 REFINEMENTS
   ══════════════════════════════════════════════════════════════ */

/* Tighter gap between nav and carousel */
.content { padding-top: 22px; }

/* Pills never shrink (so overflow measurement is reliable) */
.editorial-nav .cat-pill { flex: 0 0 auto; }

/* Hamburger / "More" button is icon-only */
.editorial-categories-btn svg { display: block; }

/* Rallying Cry band — breathing room before the first row of articles */
#editorialRCBand { margin: 30px 0 48px; }
#editorialRCBand .rallying-cry-inbox-link { margin-top: 22px; }
#editorialRCBand .rallying-cry-inbox-link.hidden { display: none; }
.rc-inbox-btn {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ed-green);
  background: none;
  border: 1px solid var(--ed-green);
  padding: 11px 22px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.rc-inbox-btn:hover { background: var(--ed-green); color: #fff; text-decoration: none; }
.rc-inbox-btn.rc-inbox-subscribed { display: inline-flex; align-items: center; gap: 7px; }


/* ── COMPACT / MOBILE HEADER ──────────────────────────────────
   On scroll (desktop) and on narrow screens, collapse to a single bar:
   region (left) · logo (center) · hamburger (right).  Nav + utility hidden. */
.editorial-compact-region,
.editorial-compact-burger {
  display: none;            /* shown only in compact/scrolled/mobile states */
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: var(--ed-ink);
  align-items: center;
  justify-content: center;
}
.editorial-compact-region:hover,
.editorial-compact-burger:hover { color: var(--ed-green); }
[data-theme="dark"] .editorial-compact-region,
[data-theme="dark"] .editorial-compact-burger { color: var(--text-primary); }

.editorial-header-wrapper.scrolled .editorial-utility-strip,
.editorial-header-wrapper.scrolled .editorial-nav { display: none; }
.editorial-header-wrapper.scrolled .editorial-masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 9px 24px;
  border-bottom: 1px solid var(--ed-rule);
}
.editorial-header-wrapper.scrolled .editorial-masthead-lockup { justify-self: center; gap: 9px; }
.editorial-header-wrapper.scrolled .editorial-masthead-mark { height: 26px; }
.editorial-header-wrapper.scrolled .editorial-masthead-wordmark { font-size: 26px; }
.editorial-header-wrapper.scrolled .editorial-compact-region { display: inline-flex; justify-self: start; }
.editorial-header-wrapper.scrolled .editorial-compact-burger { display: inline-flex; justify-self: end; }
[data-theme="dark"] .editorial-header-wrapper.scrolled .editorial-masthead { border-bottom-color: var(--border-color); }

@media (max-width: 860px) {
  .editorial-utility-strip,
  .editorial-nav { display: none; }
  .editorial-masthead {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 10px 18px;
    border-bottom: 1px solid var(--ed-rule);
  }
  .editorial-masthead-lockup { justify-self: center; gap: 9px; }
  .editorial-masthead-mark { height: 30px; }
  .editorial-masthead-wordmark { font-size: 30px; }
  .editorial-compact-region { display: inline-flex; justify-self: start; }
  .editorial-compact-burger { display: inline-flex; justify-self: end; }
  [data-theme="dark"] .editorial-masthead { border-bottom-color: var(--border-color); }
}


/* ── NAV DRAWER (hamburger menu) ──────────────────────────────── */
.nav-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20,19,16,0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 400;
}
.nav-drawer-overlay.open { opacity: 1; pointer-events: auto; }
.nav-drawer {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 312px;
  max-width: 84vw;
  background: var(--bg-main, #fff);
  box-shadow: -8px 0 30px rgba(27,26,23,0.18);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  padding: 18px 22px 24px;
  font-family: 'Outfit', sans-serif;
}
.nav-drawer-overlay.open .nav-drawer { transform: none; }
.nav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ed-rule);
  padding-bottom: 14px;
  margin-bottom: 8px;
}
.nav-drawer-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ed-muted);
}
.nav-drawer-close { all: unset; cursor: pointer; font-size: 26px; line-height: 1; color: var(--ed-ink); }
[data-theme="dark"] .nav-drawer-close { color: var(--text-primary); }
.nav-drawer-links { display: flex; flex-direction: column; padding: 6px 0; overflow-y: auto; flex: 1; }
.nav-drawer-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 4px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ed-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ed-rule-h);
}
[data-theme="dark"] .nav-drawer-link { color: var(--text-primary); border-bottom-color: var(--border-color); }
.nav-drawer-link svg { color: var(--ed-green); }
.nav-drawer-link:hover { color: var(--ed-green); }
.nav-drawer-link.active { color: var(--ed-green); }
.nav-drawer-auth { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; }
.nav-drawer-user { font-size: 13px; font-weight: 600; color: var(--ed-ink); padding-bottom: 4px; }
[data-theme="dark"] .nav-drawer-user { color: var(--text-primary); }
.nav-drawer-btn {
  all: unset;
  cursor: pointer;
  text-align: center;
  padding: 13px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.nav-drawer-btn-solid { background: var(--ed-green); color: #fff; }
.nav-drawer-btn-solid:hover { background: #455e49; }
.nav-drawer-btn-outline { border: 1px solid var(--ed-ink); color: var(--ed-ink); }
[data-theme="dark"] .nav-drawer-btn-outline { border-color: var(--text-primary); color: var(--text-primary); }
.nav-drawer-btn-outline:hover { background: var(--ed-cream); }
[data-theme="dark"] .nav-drawer-btn-outline:hover { background: var(--bg-card); }
.nav-drawer-btn-ghost { color: var(--ed-soft); }
.nav-drawer-btn-ghost:hover { color: var(--ed-ink); }


/* ── NEWSLETTER — taller, full-width subscribe + opt-out checkbox ── */
.newsletter-card .newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 460px;
  margin: 0 auto;
}
.newsletter-card .newsletter-form-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: none;
}
.newsletter-card .newsletter-email-input {
  width: 100%;
  border: 1px solid var(--ed-ink);
  border-radius: 0;
  padding: 15px 16px;
  font-family: 'Lora', serif;
  font-size: 15px;
}
[data-theme="dark"] .newsletter-card .newsletter-email-input { border-color: var(--border-color); }
.newsletter-card .newsletter-submit-btn {
  width: 100%;
  border-radius: 0;
  padding: 15px 24px;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--ed-ink);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.newsletter-card .newsletter-submit-btn:hover { background: var(--ed-green); }
.newsletter-opt-out-label {
  display: flex;
  align-items: center;
  gap: 9px;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 12.5px;
  color: var(--ed-soft);
  cursor: pointer;
}
[data-theme="dark"] .newsletter-opt-out-label { color: var(--text-secondary); }
.newsletter-opt-out-label input { accent-color: var(--ed-green); width: 15px; height: 15px; }


/* ── GIFT GOOD NEWS PILL — editorial (solid green, square) ────── */
.floating-badge {
  background: var(--ed-green);
  border: none;
  border-radius: 0;
  color: #fff;
  box-shadow: 0 6px 22px rgba(27,26,23,0.22);
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 13px 18px;
  gap: 8px;
}
.floating-badge:hover { background: #455e49; transform: translateY(-2px); box-shadow: 0 8px 26px rgba(27,26,23,0.28); }
.floating-badge .gift-pill-label { display: inline-flex; align-items: center; }
.floating-badge.copied { background: #455e49; border: none; color: #fff; }
.floating-badge.copied:hover { background: #455e49; }
/* Ensure the Copied! state can override any inline display on the span */
.floating-badge .gift-pill-copied { display: none; }
.floating-badge.copied .gift-pill-label,
.floating-badge.copied .gift-icon { display: none !important; }
.floating-badge.copied .gift-pill-copied { display: inline-flex !important; align-items: center; gap: 5px; }


/* ── DARK MODE CONTRAST FIXES (homepage) ─────────────────────── */
[data-theme="dark"] .editorial-nav .cat-pill { color: var(--text-primary); }
[data-theme="dark"] .editorial-nav .cat-pill:hover,
[data-theme="dark"] .editorial-nav .cat-pill.active { color: var(--rally-green) !important; }
[data-theme="dark"] .editorial-masthead-wordmark { color: var(--rally-green); }
[data-theme="dark"] .editorial-utility-region,
[data-theme="dark"] .editorial-utility-signin,
[data-theme="dark"] .editorial-utility-left { color: var(--text-secondary); }
[data-theme="dark"] .hero-description,
[data-theme="dark"] .medium-description { color: var(--text-secondary); }
[data-theme="dark"] .article-source { color: var(--text-primary); }
[data-theme="dark"] .editorial-rc-band { background: #1e1c18; }
[data-theme="dark"] .editorial-rc-text,
[data-theme="dark"] #editorialRCBand .rallying-cry-text { color: #e8e4d8; }

/* B5 — no light frame around carousel images in dark mode */
[data-theme="dark"] .featured-carousel { border-color: var(--border-color); }

/* B1 — keep the article category pill above sibling controls */
.meta-left { position: relative; z-index: 2; }
.article-cat-pill { position: relative; z-index: 2; }


/* ── MASTHEAD TAGLINE ("Only Good News") ─────────────────────── */
.editorial-masthead-tagline {
  grid-column: 1 / -1;          /* full-width row in the compact grid */
  text-align: center;
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ed-green);
  margin-top: 9px;
  max-height: 22px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease, margin-top 0.25s ease;
}
[data-theme="dark"] .editorial-masthead-tagline { color: var(--rally-green); }
/* Tuck it up into the logo on scroll (desktop + mobile) */
.editorial-header-wrapper.scrolled .editorial-masthead-tagline {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}


/* ══════════════════════════════════════════════════════════════
   v6 REFINEMENTS
   ══════════════════════════════════════════════════════════════ */

/* ── Profile panel — editorial (square sides, rectangular controls) ── */
.side-panel { border-radius: 0; }
.side-panel .panel-header {
  justify-content: flex-end;          /* "Profile" title removed */
  padding: 12px 16px;
  border-bottom: 1px solid var(--ed-rule);
  min-height: 0;
}
[data-theme="dark"] .side-panel .panel-header { border-bottom-color: var(--border-color); }
.side-panel .close-btn { border-radius: 0; }

.side-panel h2,
.side-panel h3,
.login-scroll-inner h2 { font-family: 'Lora', Georgia, serif; font-weight: 600; }
.login-intro,
.login-free-text,
.login-note,
.login-legal,
.pref-description,
.signup-subtitle { font-family: 'Outfit', sans-serif; }

/* Square, rectangular buttons / inputs throughout the panel */
.login-btn,
.login-btn-google,
.login-btn-mastodon,
.login-signup-btn,
.signup-done-btn,
.newsletter-skip-btn,
.pref-save-btn,
.pref-pill,
.tab-btn,
.newsletter-email-input,
.region-selector select,
.login-feature-card,
.newsletter-email-card,
.auth-signout-btn {
  border-radius: 0 !important;
}
.login-btn { font-family: 'Outfit', sans-serif; font-weight: 600; }
.pref-pill { font-family: 'Outfit', sans-serif; }
.pref-pill.active { background: var(--ed-green); border-color: var(--ed-green); color: #fff; }
.login-signup-btn,
.pref-save-btn { background: var(--ed-green); }
.login-signup-btn:hover,
.pref-save-btn:hover { background: #455e49; }
.tab-btn.active { color: var(--ed-green); }
.auth-avatar-initial { background: var(--ed-green); }

/* ── Rallying Cry inbox area (logged out: text + two buttons) ── */
.rc-inbox-text {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ed-soft);
  margin: 0 0 12px;
}
[data-theme="dark"] .rc-inbox-text { color: var(--text-secondary); }
.rc-inbox-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.rc-inbox-btn-solid { background: var(--ed-green); color: #fff; border-color: var(--ed-green); }
.rc-inbox-btn-solid:hover { background: #455e49; color: #fff; }

/* ── Category masthead — tighter under the nav ── */
.category-header { padding: 14px 0 28px; }

/* ── Toast — square edges, Lora ── */
.toast {
  border-radius: 0;
  font-family: 'Lora', Georgia, serif;
}

/* ── Share popover (anchored to the share button) ── */
.share-popover {
  position: fixed;
  z-index: 500;
  background: #fff;
  border: 1px solid var(--ed-rule);
  box-shadow: var(--shadow-lg);
  min-width: 184px;
  display: flex;
  flex-direction: column;
  padding: 6px;
}
[data-theme="dark"] .share-popover { background: var(--bg-card); border-color: var(--border-color); }
.share-pop-item {
  all: unset;
  display: block;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ed-ink);
  padding: 10px 12px;
}
[data-theme="dark"] .share-pop-item { color: var(--text-primary); }
.share-pop-item:hover { background: var(--ed-cream); color: var(--ed-green); }
[data-theme="dark"] .share-pop-item:hover { background: var(--bg-main); }


/* ══════════════════════════════════════════════════════════════
   v7 — category line removal + popup/modals editorial restyle
   ══════════════════════════════════════════════════════════════ */

/* Category pages: drop the rule under the masthead */
.category-header { border-bottom: none; }

/* ── "Not Good News" flag popup ── */
.flag-popup { border-radius: 0; }
.flag-popup h2 { font-family: 'Lora', Georgia, serif; font-weight: 600; }
.flag-popup p { font-family: 'Outfit', sans-serif; }
.flag-popup-nevermind,
.flag-popup-report { border-radius: 0; font-family: 'Outfit', sans-serif; }
.flag-popup-report { background: var(--ed-green); }
.flag-popup-report:hover { background: #455e49; }

/* ── RSS popup ── */
.rss-popup { border-radius: 0; }
.rss-popup h2 { font-family: 'Lora', Georgia, serif; font-weight: 600; }
.rss-url-input { border-radius: 0; font-family: 'Outfit', sans-serif; }
.rss-copy-btn { border-radius: 0; background: var(--ed-green); font-family: 'Outfit', sans-serif; }
.rss-copy-btn:hover { background: #455e49; }

/* ── Sign Up / onboarding modal ── */
.signup-modal { border-radius: 0; }
.signup-modal h2 { font-family: 'Lora', Georgia, serif; font-weight: 600; }
.signup-subtitle { font-family: 'Outfit', sans-serif; }
.signup-region-btn,
.signup-cat-pill { border-radius: 0 !important; font-family: 'Outfit', sans-serif; }
.signup-region-btn.active,
.signup-cat-pill.active { background: var(--ed-green); border-color: var(--ed-green); color: #fff; }
.signup-progress-dot.active,
.signup-progress-dot.completed { background: var(--ed-green); }
.signup-progress-line.completed { background: var(--ed-green); }


/* ══════════════════════════════════════════════════════════════
   v8 — beta UI tweaks
     · Rallying Cry band legibility (info "?" + inbox buttons)
     · Save button text contrast
     · Profile buttons use Lora
     · Stories I've Flagged in the new style
     · Settings popup (Dark Mode / Reset / Delete)
   ══════════════════════════════════════════════════════════════ */

/* ── Rallying Cry band: the base styles colour these controls white for the
   old dark hero; inside the light cream band they need ink/green instead ── */
#editorialRCBand .rallying-cry-info-btn {
  border-color: var(--ed-green);
  color: var(--ed-green);
}
#editorialRCBand .rallying-cry-info-btn:hover,
#editorialRCBand .rallying-cry-info:focus-within .rallying-cry-info-btn {
  border-color: var(--ed-green);
  background: var(--ed-green);
  color: #fff;
}
#editorialRCBand .rc-inbox-btn {
  color: var(--ed-green);
  font-family: 'Outfit', sans-serif;
}
#editorialRCBand .rc-inbox-btn:hover { color: var(--ed-ink); }
#editorialRCBand .rc-inbox-btn.rc-inbox-subscribed { color: var(--ed-green); }
#editorialRCBand .rc-inbox-btn.rc-inbox-subscribed:hover { color: var(--ed-ink); }
#editorialRCBand .rc-inbox-btn-solid,
#editorialRCBand .rc-inbox-btn-solid:hover { color: #fff; }

/* Dark mode — restore light-on-dark legibility inside the band */
[data-theme="dark"] #editorialRCBand .rallying-cry-info-btn {
  border-color: rgba(255, 255, 255, 0.55);
  color: rgba(255, 255, 255, 0.75);
}
[data-theme="dark"] #editorialRCBand .rallying-cry-info-btn:hover,
[data-theme="dark"] #editorialRCBand .rallying-cry-info:focus-within .rallying-cry-info-btn {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
[data-theme="dark"] #editorialRCBand .rc-inbox-btn { color: var(--text-secondary); }
[data-theme="dark"] #editorialRCBand .rc-inbox-btn:hover { color: var(--text-primary); }
[data-theme="dark"] #editorialRCBand .rc-inbox-btn.rc-inbox-subscribed { color: var(--text-secondary); }
[data-theme="dark"] #editorialRCBand .rc-inbox-btn.rc-inbox-subscribed:hover { color: var(--text-primary); }

/* ── Save button: green fill needs light text to read ── */
.pref-save-btn,
.pref-save-btn:hover,
.pref-save-btn.saved {
  color: #fff;
  border-color: var(--ed-green);
}
.pref-save-btn.saved { border-color: var(--ed-green); }

/* ── Profile panel buttons: square (done above) + Lora type ── */
#profilePanel .tab-btn,
#profilePanel .pref-pill,
#profilePanel .pref-save-btn,
#profilePanel .login-btn,
#profilePanel .login-signup-btn,
#profilePanel .newsletter-submit-btn,
#profilePanel .unsave-btn,
#profilePanel .flagged-articles-link,
#profilePanel .auth-signin-prompt {
  font-family: 'Lora', Georgia, serif !important;
}
#profilePanel .unsave-btn,
#profilePanel .flagged-articles-link { border-radius: 0 !important; }

/* ── Stories I've Flagged (saved-tab footer) ── */
.saved-tab-footer {
  border-top: 1px solid var(--ed-rule);
  margin-top: 10px;
  padding-top: 2px;
}
[data-theme="dark"] .saved-tab-footer { border-top-color: var(--border-color); }
.flagged-articles-link { color: var(--ed-soft); }
.flagged-articles-link:hover { color: var(--ed-green); }
[data-theme="dark"] .flagged-articles-link { color: var(--text-secondary); }
[data-theme="dark"] .flagged-articles-link:hover { color: var(--text-primary); }
.flagged-list-unflag { border-radius: 0 !important; font-family: 'Outfit', sans-serif; }
.flagged-list-unflag:hover { border-color: var(--ed-green); color: var(--ed-green); }

/* ── Settings gear button (sits before sign-out in the auth header) ── */
.auth-settings-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: all 0.2s;
}
.auth-settings-btn:hover { background: var(--ed-cream); color: var(--ed-green); }
[data-theme="dark"] .auth-settings-btn:hover { background: var(--bg-main); color: var(--text-primary); }
.auth-user .auth-settings-btn + .auth-signout-btn { margin-left: -6px; }

/* ── Settings popup ── */
.settings-popup { max-width: 440px; }
.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.settings-header h2 { margin: 0; font-family: 'Lora', Georgia, serif; font-weight: 600; }
.settings-section { margin-bottom: 26px; }
.settings-section:last-child { margin-bottom: 0; }
.settings-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ed-green);
  margin: 0 0 12px;
}
[data-theme="dark"] .settings-section-title { color: var(--rally-green); }

.settings-darkmode-opts { display: flex; flex-direction: column; gap: 8px; }
.settings-darkmode-opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--ed-rule);
  border-radius: 0;
  transition: border-color 0.15s, background 0.15s;
}
[data-theme="dark"] .settings-darkmode-opt { border-color: var(--border-color); }
.settings-darkmode-opt:hover { border-color: var(--ed-green); }
.settings-darkmode-opt.active { border-color: var(--ed-green); background: rgba(90, 119, 94, 0.06); }
.settings-darkmode-check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 1.5px solid var(--ed-rule);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: transparent;
  transition: all 0.15s;
}
[data-theme="dark"] .settings-darkmode-check { border-color: var(--border-color); }
.settings-darkmode-opt.active .settings-darkmode-check { background: var(--ed-green); border-color: var(--ed-green); }
.settings-darkmode-check svg { opacity: 0; transition: opacity 0.15s; }
.settings-darkmode-opt.active .settings-darkmode-check svg { opacity: 1; }
.settings-darkmode-label { display: flex; flex-direction: column; gap: 3px; }
.settings-darkmode-title { font-family: 'Lora', Georgia, serif; font-size: 15px; font-weight: 500; color: var(--text-primary); }
.settings-darkmode-desc { font-family: 'Outfit', sans-serif; font-size: 12.5px; color: var(--text-secondary); line-height: 1.4; }

.settings-danger-btn {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--ed-rule);
  border-radius: 0;
  margin-bottom: 8px;
  transition: border-color 0.15s, background 0.15s;
}
[data-theme="dark"] .settings-danger-btn { border-color: var(--border-color); }
.settings-danger-btn:last-child { margin-bottom: 0; }
.settings-danger-btn:hover { border-color: #c0392b; }
.settings-danger-title { font-family: 'Lora', Georgia, serif; font-size: 15px; font-weight: 500; color: var(--text-primary); }
.settings-danger-btn-strong .settings-danger-title { color: #c0392b; }
.settings-danger-desc { font-family: 'Outfit', sans-serif; font-size: 12.5px; color: var(--text-secondary); line-height: 1.4; }

/* ── Confirmation popups (Reset / Delete) ── */
.settings-confirm-popup h2 { font-family: 'Lora', Georgia, serif; font-weight: 600; }
.settings-confirm-danger { background: #c0392b !important; }
.settings-confirm-danger:hover { background: #a93226 !important; }
