/* ═══════════════════════════════════════════════════════════════════
   THE BUREAU OF PROLEFEED — Main Stylesheet
   ═══════════════════════════════════════════════════════════════════ */

/* ── Reset & Base ───────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.6;
  min-height: 100vh;
}

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

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* ── Typography ─────────────────────────────────────────────────── */

h1, h2, h3, h4 {
  font-family: Georgia, serif;
  line-height: 1.25;
  margin-top: 0;
}

p { margin-top: 0; }

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover { color: var(--link-hover); }

/* ── Layout ─────────────────────────────────────────────────────── */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.container--narrow {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ── Header ─────────────────────────────────────────────────────── */

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 1rem 0;
  text-align: center;
}

.site-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

.site-title {
  font-family: Georgia, serif;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: bold;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
  color: var(--text-primary);
}

.site-title a {
  color: inherit;
}

.site-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.3rem 0 1.25rem;
  font-style: italic;
}

.site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  border-top: 1px solid var(--border);
  padding: 0.5rem 0;
  font-family: Georgia, serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav a {
  padding: 0.35rem 0.75rem;
  color: var(--text-secondary);
  border-radius: 2px;
  transition: color 0.15s;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--accent);
}

.site-nav__divider {
  color: var(--border);
  user-select: none;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0.75rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1;
  border-radius: 2px;
  transition: color 0.15s;
}

.theme-toggle:hover { color: var(--accent); }

/* ── Dateline / Section headers ─────────────────────────────────── */

.page-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 2rem 0 1.5rem;
}

.section-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: Georgia, serif;
  margin: 2.5rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-label::before,
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Article Cards (homepage grid) ──────────────────────────────── */

.featured-card {
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  background: var(--bg-surface);
}

.featured-card__label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  font-family: Georgia, serif;
}

.featured-card__headline {
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-weight: bold;
  line-height: 1.3;
  margin: 0 0 0.75rem;
  color: var(--text-primary);
}

.featured-card__headline a {
  color: inherit;
}

.featured-card__headline a:hover {
  color: var(--accent);
}

.featured-card__summary {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0 0 1rem;
  line-height: 1.55;
}

.featured-card__byline {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.featured-card__byline a {
  color: var(--accent);
  font-size: 0.8rem;
  text-decoration: none;
  letter-spacing: 0.03em;
}

.featured-card__byline a:hover {
  text-decoration: underline;
}

/* ── Article grid (2 columns) ───────────────────────────────────── */

.article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
  .article-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.article-card {
  border: 1px solid var(--border);
  padding: 1.25rem;
  background: var(--bg-surface);
}

.article-card__headline {
  font-size: 1rem;
  font-weight: bold;
  line-height: 1.35;
  margin: 0 0 0.75rem;
  color: var(--text-primary);
}

.article-card__headline a {
  color: inherit;
}

.article-card__headline a:hover {
  color: var(--accent);
}

.article-card__byline {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.article-card__read {
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.03em;
}

.article-card__read:hover {
  color: var(--accent-hover);
}

/* ── Article Page ────────────────────────────────────────────────── */

.article-page {
  padding: 2rem 0 4rem;
}

.article-header {
  margin-bottom: 2rem;
}

.article-header__section {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.article-header__headline {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: bold;
  line-height: 1.2;
  margin: 0 0 1rem;
  color: var(--text-primary);
}

.article-header__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.article-header__meta-sep {
  color: var(--border);
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-primary);
}

@media (min-width: 640px) {
  .article-body { font-size: 1.1rem; }
}

.article-body p {
  margin: 0 0 1.4em;
}

/* ── Sources section ─────────────────────────────────────────────── */

.sources-section {
  margin: 2.5rem 0;
  padding: 1.25rem;
  border: 1px solid var(--border);
  background: var(--bg-surface);
}

.sources-section__label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-family: Georgia, serif;
}

.sources-section__tagline {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  font-style: italic;
}

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

.sources-list__item a {
  font-size: 0.85rem;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

.sources-list__item a:hover {
  border-color: var(--accent);
}

.sources-list__item:not(:last-child)::after {
  content: ' ·';
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.sources-toggle {
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sources-toggle:hover { color: var(--accent); }

.sources-expanded {
  display: none;
  margin-top: 0.75rem;
}

.sources-expanded.open { display: block; }

.source-link-item {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.source-link-item a {
  color: var(--accent);
}

/* ── Related section ─────────────────────────────────────────────── */

.related-section {
  margin: 2rem 0;
}

.related-section__label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-family: Georgia, serif;
}

.related-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-list__item {
  padding: 0.5rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.related-list__item::before {
  content: '•';
  color: var(--text-muted);
  flex-shrink: 0;
}

.related-list__item a {
  color: var(--text-primary);
}

.related-list__item a:hover {
  color: var(--accent);
}

/* ── Topics / Tags ───────────────────────────────────────────────── */

.topics-section {
  margin: 2rem 0;
}

.topics-section__label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  font-family: Georgia, serif;
}

.topics-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.topics-list__item {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: capitalize;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ── Article Navigation ──────────────────────────────────────────── */

.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 3rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.article-nav__prev,
.article-nav__next {
  font-size: 0.8rem;
}

.article-nav__next {
  text-align: right;
}

.article-nav__direction {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.article-nav__title {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.article-nav__title:hover {
  color: var(--accent);
}

/* ── Breadcrumb ──────────────────────────────────────────────────── */

.breadcrumb {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 1.25rem 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb__sep {
  color: var(--border);
}

/* ── Archive Page ─────────────────────────────────────────────────── */

.archive-page {
  padding: 2rem 0 4rem;
}

.archive-title {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.archive-year {
  font-size: 1.1rem;
  font-weight: bold;
  margin: 2.5rem 0 0.5rem;
  color: var(--text-primary);
  letter-spacing: 0.03em;
}

.archive-month {
  margin-bottom: 2rem;
}

.archive-month__header {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 1.25rem 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.archive-month__header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.archive-day {
  margin-bottom: 1.25rem;
}

.archive-day__date {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.archive-day__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.archive-day__item {
  padding: 0.2rem 0;
  font-size: 0.9rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.archive-day__item::before {
  content: '•';
  color: var(--text-muted);
  flex-shrink: 0;
}

.archive-day__item a {
  color: var(--text-secondary);
}

.archive-day__item a:hover {
  color: var(--accent);
}

/* ── About Page ──────────────────────────────────────────────────── */

.about-page {
  padding: 2rem 0 4rem;
}

.about-page h2 {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 2.5rem 0 0.75rem;
  font-weight: normal;
}

.about-page p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 600px;
}

/* ── Footer ──────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1rem;
  margin-top: 3rem;
  text-align: center;
}

.site-footer__title {
  font-size: 0.85rem;
  font-weight: bold;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
  color: var(--text-primary);
}

.site-footer__tagline {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1rem;
}

.site-footer__nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.1rem;
  margin-bottom: 1.25rem;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.site-footer__nav a {
  padding: 0.2rem 0.5rem;
  color: var(--text-muted);
}

.site-footer__nav a:hover { color: var(--accent); }

.site-footer__legal {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.site-footer__legal a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── UX Satire Elements ──────────────────────────────────────────── */

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-secondary);
  z-index: 100;
  text-align: center;
}

.cookie-banner.hidden { display: none; }

.cookie-banner__text { flex: 1; min-width: 200px; }

.cookie-banner__buttons {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn {
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  font-family: Georgia, serif;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.15s;
  letter-spacing: 0.02em;
}

.btn--primary {
  background: var(--accent);
  color: #000;
  border: 1px solid var(--accent);
}

.btn--primary:hover { background: var(--accent-hover); }

.btn--secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn--secondary:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

/* Newsletter popup */
.newsletter-popup {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: min(320px, calc(100vw - 2rem));
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  z-index: 99;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.newsletter-popup.hidden { display: none; }

.newsletter-popup__close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 0.2rem;
}

.newsletter-popup__close:hover { color: var(--text-primary); }

.newsletter-popup__title {
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Fake video box */
.fake-video {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 2rem 0;
}

/* Articles remaining counter */
.articles-remaining {
  border: 1px solid var(--accent);
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 1.5rem 0;
  background: var(--bg-surface);
  display: none;
}

.articles-remaining.visible { display: block; }

/* ── 404 Page ─────────────────────────────────────────────────────── */

.error-page {
  padding: 4rem 1rem;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.error-page__code {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.error-page__title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.error-page__body {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* ── Responsive Helpers ───────────────────────────────────────────── */

@media (min-width: 640px) {
  .container { padding: 0 2rem; }
  .container--narrow { padding: 0 2rem; }
  .article-body { line-height: 1.8; }
}

@media (min-width: 1024px) {
  .container { padding: 0 3rem; }
}
