/*
Theme Name: History Plus+
Theme URI: https://historyplus.net
Author: History Plus+
Description: Dark cinematic documentary theme for History Plus+. Roman Empire edition.
Version: 3.0.0
License: GNU General Public License v2 or later
Text Domain: historyplus
*/

/* =============================================
   LIGHT THEME (default)
   Warm parchment — easy to read, still cinematic
   ============================================= */
:root {
  /* Backgrounds */
  --bg:          #F7F2E8;
  --bg-2:        #EDE5D4;
  --bg-3:        #E2D8C6;
  --bg-header:   rgba(247,242,232,0.97);

  /* Borders */
  --border:      #C8B898;
  --border-light:#D8CDB0;

  /* Accents */
  --gold:        #8A6010;
  --gold-light:  #B07820;
  --gold-dim:    #9A7428;

  --red:         #8B1A1A;
  --red-light:   #A02020;

  /* Text */
  --text:        #1A1208;
  --text-body:   #2E2416;
  --text-muted:  #4A3A26;
  --text-faint:  #7A6848;

  /* Grain opacity */
  --grain-opacity: 0.025;

  /* Hero glow */
  --hero-glow:   rgba(138,96,16,0.08);
  --hero-wm:     rgba(138,96,16,0.04);

  /* Fonts */
  --serif:   'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --display: 'Cinzel', Georgia, serif;
  --mono:    'Courier Prime', 'Courier New', monospace;
  --ease:    all 0.25s ease;
}

/* =============================================
   DARK THEME
   ============================================= */
[data-theme="dark"] {
  --bg:          #080604;
  --bg-2:        #0F0D0A;
  --bg-3:        #161310;
  --bg-header:   rgba(8,6,4,0.97);

  --border:      #2A2520;
  --border-light:#3A3428;

  --gold:        #C4A44A;
  --gold-light:  #E0C068;
  --gold-dim:    #7A6428;

  --red:         #8B1A1A;
  --red-light:   #B02222;

  --text:        #F2EBD9;
  --text-body:   #C8BAA4;
  --text-muted:  #B0A090;
  --text-faint:  #7A7060;

  --grain-opacity: 0.04;
  --hero-glow:   rgba(196,164,74,0.07);
  --hero-wm:     rgba(196,164,74,0.025);
}

/* =============================================
   THEME TRANSITION — smooth switch
   ============================================= */
body,
body * {
  transition:
    background-color 0.35s ease,
    border-color     0.35s ease,
    color            0.35s ease;
}
/* Don't transition transforms/opacity (breaks animations) */
.episode-card,
.article-card,
.episode-card__thumb img,
.article-card__image img {
  transition:
    background-color 0.35s ease,
    border-color     0.35s ease,
    color            0.35s ease,
    transform        0.25s ease,
    opacity          0.25s ease;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.75;
  min-height: 100vh;
}

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.1;
  color: var(--text);
  letter-spacing: 0.02em;
}

p { margin-bottom: 1.25rem; color: var(--text-body); }

/* =============================================
   UTILITIES
   ============================================= */
.container { max-width: 1160px; margin: 0 auto; padding: 0 32px; }
.mono { font-family: var(--mono); }
.label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.label--gold { color: var(--gold); }
.label--red  { color: var(--red-light); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* =============================================
   ROMAN ORNAMENTS
   ============================================= */
.roman-ornament {
  text-align: center;
  padding: 8px 0;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.6em;
  color: var(--gold-dim);
  user-select: none;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-block;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 12px 28px;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  background: transparent;
  cursor: pointer;
  position: relative;
}
.btn::before, .btn::after {
  content: '';
  position: absolute;
  width: 6px; height: 6px;
  border-color: var(--gold);
  border-style: solid;
}
.btn::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.btn::after  { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }
.btn:hover   { background: var(--bg-2); border-color: var(--gold); color: var(--gold-light); }

.btn--red {
  border-color: var(--red);
  color: #F0E8D8;
  background: var(--red);
}
.btn--red::before, .btn--red::after { border-color: var(--red-light); }
.btn--red:hover { background: var(--red-light); color: #F0E8D8; }

.btn--ghost {
  border-color: var(--border);
  color: var(--text-muted);
}
.btn--ghost::before, .btn--ghost::after { border-color: var(--border); }
.btn--ghost:hover { border-color: var(--text-muted); color: var(--text); background: transparent; }

/* =============================================
   HEADER / NAV
   ============================================= */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  gap: 24px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.site-logo {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo span { color: var(--text); font-weight: 400; }
.site-logo:hover { color: var(--gold-light); }

#primary-nav ul { list-style: none; display: flex; gap: 28px; padding: 0; margin: 0; }
#primary-nav ul li a {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}
#primary-nav ul li a:hover,
#primary-nav ul li.current-menu-item > a { color: var(--gold); }

/* ── THEME TOGGLE BUTTON ────────────────── */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 1px solid var(--border);
  padding: 5px 10px;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 999px;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--gold); color: var(--gold); }
.theme-toggle__sun,
.theme-toggle__moon {
  display: flex;
  align-items: center;
  line-height: 1;
}
.theme-toggle__sun  { color: var(--gold); }
.theme-toggle__moon { color: var(--text-faint); }
[data-theme="dark"] .theme-toggle__sun  { color: var(--text-faint); }
[data-theme="dark"] .theme-toggle__moon { color: var(--gold); }
.theme-toggle__track {
  width: 32px;
  height: 16px;
  background: var(--border);
  border-radius: 999px;
  position: relative;
  flex-shrink: 0;
}
.theme-toggle__thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold);
  transition: transform 0.3s ease;
}
[data-theme="dark"] .theme-toggle__thumb { transform: translateX(16px); }
[data-theme="dark"] .theme-toggle__track { background: var(--gold-dim); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-toggle span {
  display: block; width: 22px; height: 0.5px;
  background: var(--text-muted);
}

/* =============================================
   TICKER
   ============================================= */
.ticker-strip {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 7px 0;
  overflow: hidden;
  white-space: nowrap;
}
.ticker-inner {
  display: inline-block;
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.35em;
  color: var(--gold-dim);
  animation: ticker 35s linear infinite;
}
@keyframes ticker { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

/* =============================================
   IMPERIAL HERO
   ============================================= */
.hp-hero {
  position: relative;
  padding: 100px 0 88px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  overflow: hidden;
}
.hp-hero::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -60%);
  width: 700px; height: 400px;
  background: radial-gradient(ellipse, var(--hero-glow) 0%, transparent 70%);
  pointer-events: none;
}
.hp-hero__watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 220px;
  font-weight: 900;
  color: var(--hero-wm);
  letter-spacing: 0.15em;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}
.hp-hero__eyebrow {
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.5em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.hp-hero__eyebrow::before,
.hp-hero__eyebrow::after {
  content: '';
  flex: 0 0 60px;
  height: 0.5px;
  background: var(--gold-dim);
  opacity: 0.5;
}
.hp-hero h1 {
  font-family: var(--display);
  font-size: clamp(36px, 6vw, 78px);
  font-weight: 400;
  line-height: 1.05;
  color: var(--text);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  position: relative;
}
.hp-hero h1 em { font-style: italic; color: var(--gold); font-weight: 400; }
.hp-hero__laurel { font-size: 18px; color: var(--gold-dim); letter-spacing: 0.3em; margin: 20px 0 24px; user-select: none; }
.hp-hero__sub {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 44px;
  text-transform: uppercase;
}
.hp-hero__cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* =============================================
   ROMAN SECTION HEADER
   ============================================= */
.roman-section-header { text-align: center; padding: 60px 0 48px; }
.roman-section-header__label {
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.5em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.roman-section-header h2 {
  font-size: clamp(22px, 3.5vw, 38px);
  font-weight: 400;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.roman-section-header__rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--gold-dim);
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.4em;
}
.roman-section-header__rule::before,
.roman-section-header__rule::after {
  content: '';
  flex: 0 0 80px;
  height: 0.5px;
  background: var(--border);
}

/* Pillars frame */
.pillars-frame { position: relative; }
.pillars-frame::before,
.pillars-frame::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--border) 20%, var(--border) 80%, transparent);
  opacity: 0.5;
}
.pillars-frame::before { left: 0; }
.pillars-frame::after  { right: 0; }

/* =============================================
   FEATURED ARTICLE
   ============================================= */
.featured-article {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  margin-bottom: 24px;
  overflow: hidden;
}
.featured-article__image { position: relative; min-height: 360px; overflow: hidden; }
.featured-article__image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.featured-article:hover .featured-article__image img { transform: scale(1.03); }

.featured-article__body {
  background: var(--bg-2);
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--border);
}
.featured-article__cat {
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--red-light);
  margin-bottom: 16px;
  margin-top: 20px;
}
.featured-article__title {
  font-family: var(--display);
  font-size: clamp(20px, 2.5vw, 30px);
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 16px;
  font-weight: 400;
  letter-spacing: 0.02em;
}
.featured-article__title a { color: var(--text); }
.featured-article__title a:hover { color: var(--gold); }
.featured-article__excerpt {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: 28px;
}
.featured-article__meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
}

/* =============================================
   ARTICLE GRID CARDS
   ============================================= */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-bottom: 40px;
}
.article-card {
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
}
.article-card:hover { background: var(--bg-3); }
.article-card__image { aspect-ratio: 16/9; overflow: hidden; }
.article-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.article-card:hover .article-card__image img { transform: scale(1.04); }
.article-card__no-image {
  aspect-ratio: 16/9;
  background: var(--bg-3);
  display: flex; align-items: center; justify-content: center;
}
.article-card__no-image span { font-family: var(--display); font-size: 32px; color: var(--gold-dim); opacity: 0.4; }
.article-card__body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.article-card__cat {
  font-family: var(--display); font-size: 9px; letter-spacing: 0.35em;
  text-transform: uppercase; color: var(--red-light); margin-bottom: 10px;
}
.article-card__title {
  font-family: var(--display); font-size: 18px; font-weight: 400;
  line-height: 1.25; letter-spacing: 0.02em; margin-bottom: 12px; flex: 1;
}
.article-card__title a { color: var(--text); }
.article-card__title a:hover { color: var(--gold); }
.article-card__excerpt {
  font-family: var(--serif); font-size: 14px; color: var(--text-body); line-height: 1.65; margin-bottom: 16px;
}
.article-card__footer {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 0.5px solid var(--border); padding-top: 12px; margin-top: auto;
}
.article-card__date { font-family: var(--mono); font-size: 10px; letter-spacing: 0.15em; color: var(--text-faint); }
.article-card__read { font-family: var(--display); font-size: 10px; letter-spacing: 0.2em; color: var(--gold-dim); text-transform: uppercase; }
.article-card__read:hover { color: var(--gold); }

/* =============================================
   SINGLE ARTICLE
   ============================================= */
.single-article { padding: 72px 0; }
.single-article__inner { max-width: 800px; margin: 0 auto; }
.single-article__header { margin-bottom: 56px; text-align: center; }
.single-article__eyebrow {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-bottom: 28px;
}
.single-article__eyebrow span {
  font-family: var(--display); font-size: 9px; letter-spacing: 0.4em;
  text-transform: uppercase; color: var(--text-faint);
}
.single-article__eyebrow::before,
.single-article__eyebrow::after { content: ''; flex: 0 0 40px; height: 0.5px; background: var(--border); }
.single-article__cat {
  font-family: var(--display); font-size: 10px; letter-spacing: 0.4em;
  text-transform: uppercase; color: var(--red-light); margin-bottom: 20px;
}
.single-article h1 {
  font-size: clamp(28px, 5vw, 56px); font-weight: 400; letter-spacing: 0.03em; margin-bottom: 28px;
}
.single-article__lede {
  font-family: var(--serif); font-size: 20px; font-style: italic;
  color: var(--text-body); line-height: 1.65;
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
  padding: 24px 0; margin-bottom: 48px;
}
.single-article__featured { margin: 0 -40px 56px; }
.single-article__featured img { width: 100%; max-height: 520px; object-fit: cover; }
.single-article__featured figcaption {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.15em;
  color: var(--text-faint); text-align: center; margin-top: 10px;
}

/* Article body */
.article-content { font-family: var(--serif); font-size: 18px; line-height: 1.85; color: var(--text-body); }
.article-content p  { margin-bottom: 1.5rem; }
.article-content h2 { font-size: 26px; margin: 2.5rem 0 1rem; color: var(--text); letter-spacing: 0.04em; }
.article-content h3 { font-size: 20px; margin: 2rem 0 0.75rem; color: var(--text); }
.article-content strong { color: var(--text); font-weight: 500; }
.article-content em { font-style: italic; color: var(--text); }
.article-content a  { color: var(--gold); border-bottom: 0.5px solid var(--gold-dim); }
.article-content a:hover { color: var(--gold-light); border-color: var(--gold); }
.article-content blockquote {
  position: relative;
  padding: 28px 36px; margin: 2.5rem 0;
  background: var(--bg-2); border: none;
}
.article-content blockquote::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(to bottom, transparent, var(--gold) 20%, var(--gold) 80%, transparent);
}
.article-content blockquote p { font-size: 20px; font-style: italic; color: var(--text); line-height: 1.6; margin: 0; }
.article-content ul, .article-content ol { margin: 1.5rem 0; padding-left: 2rem; color: var(--text-body); }
.article-content li { margin-bottom: 0.5rem; }
.article-content img { margin: 2rem auto; max-height: 520px; object-fit: cover; width: 100%; }
.article-content hr { border: none; border-top: 0.5px solid var(--border); margin: 2.5rem 0; }

/* Drop cap */
.article-content > p:first-of-type::first-letter {
  font-family: var(--display);
  font-size: 5.5rem; font-weight: 600;
  float: left; line-height: 0.75;
  margin: 6px 12px 0 0; color: var(--gold);
}

/* =============================================
   EPISODE CARDS
   ============================================= */
.section { padding: 0 0 60px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.episode-card {
  border: 1px solid var(--border);
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
}
.episode-card:hover { border-color: var(--gold-dim); transform: translateY(-2px); }

.episode-card__thumb { position: relative; aspect-ratio: 9/14; overflow: hidden; background: var(--bg-3); }
.episode-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.episode-card:hover .episode-card__thumb img { transform: scale(1.04); }
.episode-card__thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--bg-3); }
.episode-card__thumb-placeholder span { font-family: var(--display); font-size: 28px; color: var(--gold-dim); opacity: 0.4; }
.episode-card__dispatch {
  position: absolute; top: 10px; left: 10px;
  font-family: var(--mono); font-size: 8px; letter-spacing: 0.2em;
  color: var(--text); background: rgba(247,242,232,0.92); padding: 4px 8px;
  border: 1px solid var(--border-light);
  text-shadow: 0 1px 0 rgba(255,255,255,0.35);
}
[data-theme="dark"] .episode-card__dispatch {
  color: var(--text-faint);
  background: rgba(8,6,4,0.85);
  border-color: rgba(58,52,40,0.85);
  text-shadow: none;
}

.episode-card__body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.episode-card__cat {
  font-family: var(--display); font-size: 9px; letter-spacing: 0.35em;
  text-transform: uppercase; color: var(--red-light); margin-bottom: 10px;
}
.episode-card__title {
  font-family: var(--display); font-size: 15px; line-height: 1.3;
  font-weight: 400; letter-spacing: 0.02em; color: var(--text); margin-bottom: 10px; flex: 1;
}
.episode-card__title a { color: var(--text); }
.episode-card__title a:hover { color: var(--gold); }
.episode-card__desc {
  font-family: var(--serif); font-size: 13px; color: var(--text-body);
  line-height: 1.6; margin-bottom: 14px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.episode-card__footer {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 0.5px solid var(--border); padding-top: 12px; margin-top: auto;
}
.episode-card__platform {
  font-family: var(--mono); font-size: 8px; letter-spacing: 0.2em;
  color: var(--text-faint); border: 0.5px solid var(--border); padding: 3px 8px;
}
.episode-card__arrow { font-size: 13px; color: var(--gold-dim); }

/* =============================================
   SINGLE EPISODE
   ============================================= */
.episode-single { padding: 64px 0; }
.episode-single__back {
  font-family: var(--display); font-size: 10px; letter-spacing: 0.3em;
  color: var(--text-faint); text-transform: uppercase; margin-bottom: 40px; display: inline-block;
}
.episode-single__header { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.episode-single__dispatch { font-family: var(--mono); font-size: 10px; letter-spacing: 0.3em; color: var(--gold); margin-bottom: 10px; }
.episode-single__cat { font-family: var(--display); font-size: 10px; letter-spacing: 0.4em; text-transform: uppercase; color: var(--red-light); margin-bottom: 18px; }
.episode-single h1 { font-size: clamp(26px, 4vw, 48px); margin-bottom: 0; }
.episode-embed { max-width: 400px; margin: 0 auto 48px; }
.episode-embed iframe { width: 100%; min-height: 700px; border: none; display: block; }
.episode-description { max-width: 720px; margin: 0 auto; font-family: var(--serif); font-size: 18px; line-height: 1.85; color: var(--text-body); }
.episode-description p { margin-bottom: 1.4rem; }
.episode-description p:first-of-type { font-size: 20px; font-style: italic; }

/* =============================================
   ARCHIVE
   ============================================= */
.archive-header { padding: 72px 0 48px; text-align: center; border-bottom: 1px solid var(--border); }
.archive-header h1 { font-size: clamp(28px, 4vw, 52px); }
.filter-bar {
  padding: 24px 0; border-bottom: 1px solid var(--border);
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 48px;
}
.filter-label { font-family: var(--display); font-size: 9px; letter-spacing: 0.3em; color: var(--text-faint); margin-right: 8px; text-transform: uppercase; }
.filter-btn {
  font-family: var(--display); font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 7px 16px; border: 0.5px solid var(--border); color: var(--text-muted);
  background: transparent; cursor: pointer;
}
.filter-btn:hover, .filter-btn.active { border-color: var(--gold); color: var(--gold); }

/* =============================================
   NEWSLETTER
   ============================================= */
.newsletter-section { padding: 80px 0; border-top: 1px solid var(--border); }
.newsletter-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.nl-stamp {
  width: 60px; height: 60px; border: 1.5px solid var(--red); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 8px; letter-spacing: 0.15em;
  color: var(--red); text-align: center; line-height: 1.4;
  margin-bottom: 24px; transform: rotate(-8deg);
}
.newsletter-section h2 { font-size: 30px; letter-spacing: 0.04em; font-weight: 400; margin-bottom: 14px; }
.newsletter-section p { font-family: var(--mono); font-size: 12px; line-height: 1.8; color: var(--text-body); }
.nl-form { display: flex; flex-direction: column; gap: 12px; }
.nl-form input {
  background: var(--bg); border: 1px solid var(--border);
  padding: 13px 16px; color: var(--text); font-family: var(--mono); font-size: 13px;
  outline: none; width: 100%;
}
.nl-form input:focus { border-color: var(--gold); }
.nl-form input::placeholder { color: var(--text-faint); }
.nl-form button {
  background: var(--red); border: none; color: #F0E0D0;
  font-family: var(--display); font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase;
  padding: 14px; cursor: pointer;
}
.nl-form button:hover { background: var(--red-light); }

/* =============================================
   PAGE & FOOTER
   ============================================= */
.page-content { padding: 72px 0; max-width: 760px; }
.page-content h1 { font-size: clamp(26px, 4vw, 48px); margin-bottom: 36px; }
.page-content h2 { font-size: 24px; margin: 2.5rem 0 1rem; }
.page-content p  { line-height: 1.9; color: var(--text-body); }

.manifesto-quote { border-left: 2px solid var(--gold); padding: 16px 28px; margin: 36px 0; font-size: 22px; line-height: 1.5; color: var(--text); font-style: italic; }

#site-footer { border-top: 1px solid var(--border); padding: 56px 0 32px; background: var(--bg-2); }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand .site-logo { display: inline-block; margin-bottom: 16px; }
.footer-brand p { font-family: var(--mono); font-size: 11px; color: var(--text-faint); line-height: 1.7; max-width: 260px; margin: 0; }
.footer-col h4 { font-family: var(--display); font-size: 10px; letter-spacing: 0.35em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 18px; }
.footer-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-col ul li a { font-family: var(--mono); font-size: 12px; color: var(--text-muted); }
.footer-col ul li a:hover { color: var(--gold); }
.footer-bottom { border-top: 0.5px solid var(--border); padding-top: 22px; display: flex; justify-content: space-between; align-items: center; }
.footer-bottom p { font-family: var(--mono); font-size: 10px; letter-spacing: 0.15em; color: var(--text-faint); margin: 0; }

/* 404 */
.error-404 { padding: 120px 0; text-align: center; }
.error-404__code { font-family: var(--mono); font-size: 10px; letter-spacing: 0.4em; color: var(--red); margin-bottom: 24px; }
.error-404 h1 { font-size: clamp(32px, 5vw, 60px); margin-bottom: 16px; }
.error-404 p  { font-family: var(--mono); color: var(--text-body); margin-bottom: 36px; font-size: 12px; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .featured-article { grid-template-columns: 1fr; }
  .featured-article__image { min-height: 240px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .newsletter-inner { grid-template-columns: 1fr; gap: 36px; }
  .single-article__featured { margin: 0 0 40px; }
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  #primary-nav {
    display: none; position: absolute; top: 62px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 24px 20px; z-index: 200;
  }
  #primary-nav.open { display: block; }
  #primary-nav.open ul { flex-direction: column; gap: 16px; }
  .nav-toggle { display: flex; }
  .theme-toggle__label { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
  .hp-hero { padding: 64px 0; }
  .hp-hero__watermark { font-size: 100px; }
  .articles-grid { grid-template-columns: 1fr; }
}

/* =============================================
   EPISODE ACTION BUTTONS (Like / Share / Subscribe)
   ============================================= */

.ep-actions {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 40px;
  max-width: 480px;
  margin: 0 auto 52px;
  padding: 32px 0;
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
  position: relative;
}

/* ── Shared action button base ── */
.ep-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  background: none;
  border: none;
  padding: 0;
  position: relative;
  font-family: inherit;
}

/* Outer animated ring */
.ep-action__ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% - 13px));
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  transition: border-color 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

/* Inner circle */
.ep-action__circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
  position: relative;
  z-index: 1;
}

.ep-action__circle svg {
  width: 22px;
  height: 22px;
  color: var(--gold-dim);
  transition: color 0.25s ease, transform 0.3s ease;
}

/* Label */
.ep-action__label {
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-faint);
  transition: color 0.25s ease;
  position: relative;
  z-index: 1;
}

/* ── Like hover ── */
.ep-action--like:hover .ep-action__ring {
  border-color: var(--gold);
  transform: translate(-50%, calc(-50% - 13px)) scale(1.08);
}
.ep-action--like:hover .ep-action__circle {
  background: var(--bg-3);
  border-color: var(--gold);
  transform: translateY(-3px);
}
.ep-action--like:hover .ep-action__circle svg { color: var(--gold); transform: scale(1.15); }
.ep-action--like:hover .ep-action__label      { color: var(--gold); }

/* ── Share hover ── */
.ep-action--share:hover .ep-action__ring,
.ep-action--share.open  .ep-action__ring {
  border-color: var(--gold-dim);
  transform: translate(-50%, calc(-50% - 13px)) scale(1.08);
}
.ep-action--share:hover .ep-action__circle,
.ep-action--share.open  .ep-action__circle {
  background: var(--bg-3);
  border-color: var(--gold-dim);
  transform: translateY(-3px);
}
.ep-action--share:hover .ep-action__circle svg,
.ep-action--share.open  .ep-action__circle svg { color: var(--gold); transform: rotate(20deg) scale(1.1); }
.ep-action--share:hover .ep-action__label,
.ep-action--share.open  .ep-action__label      { color: var(--gold); }

/* ── Subscribe hover ── */
.ep-action--subscribe:hover .ep-action__ring {
  border-color: var(--red-light);
  transform: translate(-50%, calc(-50% - 13px)) scale(1.08);
}
.ep-action--subscribe:hover .ep-action__circle {
  background: rgba(139,26,26,0.08);
  border-color: var(--red-light);
  transform: translateY(-3px);
}
.ep-action--subscribe:hover .ep-action__circle svg { color: var(--red-light); transform: scale(1.15); }
.ep-action--subscribe:hover .ep-action__label      { color: var(--red-light); }

/* ── Share dropdown menu ── */
.ep-share-menu {
  position: absolute;
  bottom: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--bg-2);
  border: 1px solid var(--border);
  min-width: 160px;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.ep-action--share.open .ep-share-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Arrow pointing down */
.ep-share-menu::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px; height: 10px;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ep-share-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  border-bottom: 0.5px solid var(--border);
  transition: background 0.15s ease, color 0.15s ease;
}
.ep-share-option:last-child { border-bottom: none; }
.ep-share-option:hover { background: var(--bg-3); color: var(--gold); }
.ep-share-option svg { flex-shrink: 0; color: var(--gold-dim); }

/* ── Subscribe iframe overlay ── */
.ep-subscribe-wrap {
  position: absolute;
  bottom: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 12px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  z-index: 50;
}
.ep-subscribe-wrap::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px; height: 10px;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.ep-action--subscribe:hover .ep-subscribe-wrap { opacity: 1; pointer-events: auto; }

@media (max-width: 520px) {
  .ep-actions { gap: 24px; }
  .ep-action__circle { width: 54px; height: 54px; }
  .ep-action__circle svg { width: 18px; height: 18px; }
  .ep-action__ring { width: 62px; height: 62px; }
  .ep-share-menu { min-width: 140px; }
}
