@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400;1,700&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #09090b;
  --surface-1: #111116;
  --surface-2: #17171e;
  --surface-3: #1f1f28;
  --border: #26262f;
  --border-subtle: #1c1c24;
  --accent-gold: #d4a853;
  --accent-gold-dim: #8a6a2a;
  --accent-blue: #6b8afd;
  --accent-red: #f04d4d;
  --text-primary: #f0f0f2;
  --text-secondary: #9898ac;
  --text-muted: #5c5c6e;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --masthead-bg: rgba(9, 9, 11, 0.94);
}

[data-theme="light"] {
  --bg: #f8f9fa;
  --surface-1: #ffffff;
  --surface-2: #f1f3f5;
  --surface-3: #e9ecef;
  --border: #dee2e6;
  --border-subtle: #e9ecef;
  --accent-gold: #c5973e;
  --accent-gold-dim: #a47a27;
  --accent-blue: #335eea;
  --accent-red: #e03131;
  --text-primary: #212529;
  --text-secondary: #495057;
  --text-muted: #868e96;
  --masthead-bg: rgba(255, 255, 255, 0.94);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Ticker ── */
.ticker-wrap {
  background: var(--accent-gold);
  color: #000;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  overflow: hidden;
  padding: 5px 0;
  white-space: nowrap;
  position: relative;
}
.ticker-label {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  background: var(--surface-1);
  color: var(--text-primary);
  padding: 0 20px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.65rem;
  font-weight: 700;
  z-index: 10;
}
.ticker-track {
  display: inline-block;
  padding-left: 120px;
  animation: ticker-scroll 80s linear infinite;
}
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Masthead ── */
.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px 48px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--masthead-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.masthead-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  text-transform: uppercase;
}
.masthead-edition {
  background: var(--accent-gold);
  color: #000;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}
.masthead-date {
  font-family: var(--font-mono);
  font-size: 0.70rem;
  color: var(--text-primary);
  font-weight: 500;
  letter-spacing: 0.08em;
  padding-left: 2px;
}
.masthead-logo {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-align: center;
  cursor: pointer;
  user-select: none;
}
.masthead-logo em { color: var(--accent-gold); font-style: normal; }
.masthead-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: flex-end;
}
.live-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--accent-red);
  border: 1px solid var(--accent-red);
  padding: 2px 8px;
  border-radius: 2px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: live-blink 2s ease-in-out infinite;
}
@keyframes live-blink { 0%,100%{opacity:1}50%{opacity:0.5} }
.btn-icon {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-icon:hover { color: var(--text-primary); border-color: var(--accent-gold-dim); }

/* SVG Icons Toggle */
[data-theme="light"] .icon-moon { display: block; }
[data-theme="light"] .icon-sun { display: none; }
:root:not([data-theme="light"]) .icon-moon { display: none; }
:root:not([data-theme="light"]) .icon-sun { display: block; }

/* ── Category Nav ── */
.category-nav {
  border-bottom: 1px solid var(--border);
  padding: 0 48px;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-nav::-webkit-scrollbar { display: none; }
.categories { display: flex; gap: 0; white-space: nowrap; }
.cat-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 18px;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
  white-space: nowrap;
}
.cat-btn::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-gold);
  transform: scaleX(0);
  transition: transform 0.25s var(--ease-out);
}
.cat-btn:hover { color: var(--text-primary); }
.cat-btn.active { color: var(--text-primary); }
.cat-btn.active::after { transform: scaleX(1); }

/* ── Editorial pipeline band (homepage disclosure) ── */
.editorial-pipeline-band {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-1) 0%, var(--surface-0) 100%);
}
.editorial-pipeline-band-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 48px 32px;
}
.editorial-pipeline-band-head { max-width: 920px; }
.editorial-pipeline-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-gold);
  display: block;
  margin-bottom: 10px;
}
.editorial-pipeline-title {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.editorial-pipeline-lede {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0 0 24px;
}
.editorial-pipeline-flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}
.editorial-pipeline-flow-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1 1 200px;
  max-width: 360px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-1);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted);
}
.editorial-pipeline-flow-item .flow-num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: #000;
  background: var(--accent-gold);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.editorial-pipeline-flow-item .flow-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ── Layout ── */
.main-container { max-width: 1440px; margin: 0 auto; padding: 40px 48px; }

/* ── Status bar ── */
.status-bar {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  padding-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-bar .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-gold);
  animation: live-blink 1.5s ease-in-out infinite;
}

/* ── Hero ── */
.hero-section { margin-bottom: 48px; }
.hero-card {
  display: grid;
  grid-template-columns: 1fr 440px;
  min-height: 400px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.3s, transform 0.25s var(--ease-out);
  background: var(--surface-1);
}
.hero-card:hover { border-color: var(--accent-gold-dim); transform: translateY(-3px); }
.hero-content {
  padding: 52px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
}
.hero-content::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-gold), transparent);
}
.hero-category {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent-gold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero-headline {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.hero-dek {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 28px;
  max-width: 560px;
}
.hero-footer {
  display: flex;
  align-items: center;
  gap: 16px;
}
.hero-source {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}
.read-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-gold);
  color: #000;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}
.read-btn:hover { background: #e8be62; transform: translateX(2px); }
.hero-image {
  background: var(--surface-2);
  overflow: hidden;
  position: relative;
}
.hero-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.75;
  transition: opacity 0.3s, transform 0.5s var(--ease-out);
}
.hero-card:hover .hero-image img { opacity: 0.9; transform: scale(1.02); }
.hero-image-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 5rem;
  color: var(--surface-3);
}

/* ── Content Row ── */
.content-row {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 48px;
  align-items: start;
}

/* ── Article Grid ── */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.article-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface-1);
  cursor: pointer;
  transition: border-color 0.25s, transform 0.25s var(--ease-out), box-shadow 0.25s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  border-color: var(--accent-gold-dim);
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.card-img {
  width: 100%; height: 175px;
  object-fit: cover;
  display: block;
}
.card-img-placeholder {
  width: 100%; height: 175px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}
.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card-cat {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--accent-gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.card-headline {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 10px;
  flex: 1;
}
.card-dek {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}
.card-source, .card-time {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
}

/* ── Skeleton ── */
.skel {
  background: var(--surface-2);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.skel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
  animation: shimmer 1.6s ease-in-out infinite;
}
@keyframes shimmer { 0%{transform:translateX(-100%)} 100%{transform:translateX(100%)} }

/* ── Sidebar ── */
.sidebar { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 16px; }
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.panel-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-1);
}
.panel-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent-gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}
.panel-date {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.panel-header-stack {
  align-items: flex-start;
  gap: 12px;
}
.panel-header-stack .panel-date { margin-top: 2px; }
.panel-sublabel {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0.02em;
  line-height: 1.45;
  margin-top: 6px;
  max-width: 280px;
}
.panel-body { padding: 20px; background: var(--surface-1); }

/* Digest points */
.digest-point {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  animation: fade-slide-in 0.4s var(--ease-out) both;
}
.digest-point:last-child { margin-bottom: 0; }
@keyframes fade-slide-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.digest-num {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--accent-gold);
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 3px;
}
.digest-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Pipeline panel */
.pipeline-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.pipeline-step:last-child { margin-bottom: 0; }
.step-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--border);
  flex-shrink: 0;
  margin-top: 5px;
  transition: background 0.4s, box-shadow 0.4s;
}
.pipeline-step.done .step-dot {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
}
.pipeline-step.active .step-dot {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  box-shadow: 0 0 8px var(--accent-gold);
  animation: step-pulse 1s ease-in-out infinite;
}
@keyframes step-pulse { 0%,100%{box-shadow:0 0 6px var(--accent-gold)}50%{box-shadow:0 0 16px var(--accent-gold)} }
.pipeline-step.done, .pipeline-step.active { color: var(--text-secondary); }

/* ── Search Overlay ── */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(9, 9, 11, 0.96);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 100px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.search-overlay.open { opacity: 1; pointer-events: all; }
.search-wrap { width: 100%; max-width: 600px; padding: 0 24px; }
.search-field {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1.1rem;
  padding: 16px 20px;
  outline: none;
  transition: border-color 0.2s;
}
.search-field:focus { border-color: var(--accent-gold); }
.search-hint {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 12px;
  letter-spacing: 0.06em;
  padding: 0 4px;
}

/* ── Load More ── */
.load-more-wrap { text-align: center; padding: 40px 0 0; }
.load-more-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.load-more-btn:hover { border-color: var(--accent-gold); color: var(--accent-gold); }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 48px 36px;
  background: var(--surface-1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.footer-logo {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.5vw, 1.95rem);
  font-weight: 900;
  color: var(--text-primary);
  margin: 0 0 10px;
}
.footer-logo em { color: var(--accent-gold); font-style: normal; }
.footer-tagline {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 36rem;
  margin: 0 auto 20px;
}
.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 18px;
  margin-top: 2px;
  border-top: 1px solid var(--border-subtle);
  width: 100%;
  max-width: 600px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}
.maker-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
.maker-link:hover { color: var(--accent-gold); }

/* ── Article Page ── */
.article-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-blue));
  z-index: 300;
  width: 0;
  transition: width 0.1s linear;
}
.article-masthead {
  display: flex;
  align-items: center;
  padding: 16px 48px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--masthead-bg);
  backdrop-filter: blur(14px);
  gap: 24px;
}
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}
.back-btn:hover { color: var(--accent-gold); }
.article-masthead-logo {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--text-primary);
  cursor: pointer;
  flex: 1;
  text-align: center;
}
.article-masthead-logo em { color: var(--accent-gold); font-style: normal; }
.article-wrapper { max-width: 760px; margin: 0 auto; padding: 60px 40px 48px; }
.article-cat-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent-gold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.article-h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 20px;
}
.article-dek-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
  font-style: italic;
  border-left: 3px solid var(--accent-gold);
  padding-left: 18px;
}
.article-editorial-note {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 20px;
  padding: 14px 18px;
  border: 1px solid var(--accent-gold-dim);
  border-radius: var(--radius-sm);
  background: rgba(212, 168, 83, 0.06);
}
.article-editorial-note strong {
  color: var(--text-primary);
  font-weight: 600;
}
.article-byline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(212,168,83,0.08);
  border: 1px solid var(--accent-gold-dim);
  color: var(--accent-gold);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 2px;
}
.byline-text {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}
.byline-primary {
  font-weight: 600 !important;
  color: var(--text-primary) !important;
}
.article-stats {
  display: flex;
  gap: 24px;
  padding-bottom: 28px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-subtle);
}
.stat {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stat strong { color: var(--text-secondary); display: block; margin-bottom: 2px; }

/* Article body */
.article-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-secondary);
}
.article-body p { margin-bottom: 1.6em; }
.article-body p:first-child {
  font-size: 1.15rem;
  color: var(--text-primary);
  font-weight: 400;
  line-height: 1.75;
}
.article-body.streaming p:last-child::after {
  content: '▋';
  color: var(--accent-gold);
  animation: blink-cursor 0.8s step-end infinite;
}
@keyframes blink-cursor { 0%,100%{opacity:1}50%{opacity:0} }

/* Key facts */
.key-facts {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 40px 0;
  background: var(--surface-1);
}
.key-facts-title {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--accent-gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.key-fact {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.key-fact::before { content: '→'; color: var(--accent-gold); flex-shrink: 0; }

/* Sources */
.sources-section { border-top: 1px solid var(--border); padding-top: 28px; margin-top: 40px; }
.sources-title {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.source-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--accent-blue);
  text-decoration: none;
  margin-bottom: 6px;
  transition: color 0.2s;
}
.source-link:hover { color: var(--text-primary); }

/* Q&A */
.qa-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 64px;
}
.qa-header {
  background: var(--surface-1);
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.qa-icon { font-size: 1.1rem; }
.qa-title { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); }
.qa-subtitle {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-left: auto;
}
.qa-messages {
  background: var(--bg);
  padding: 24px;
  min-height: 200px;
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.qa-message {
  animation: fade-slide-in 0.3s var(--ease-out);
}
.qa-message.user { align-self: flex-end; max-width: 80%; }
.qa-message.assistant { align-self: flex-start; max-width: 85%; }
.msg-label {
  font-family: var(--font-mono);
  font-size: 0.57rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
  padding: 0 4px;
}
.msg-bubble {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.87rem;
  line-height: 1.65;
}
.qa-message.user .msg-bubble { background: var(--accent-gold); color: #000; font-weight: 500; }
.qa-message.assistant .msg-bubble {
  background: var(--surface-2);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}
.qa-input-area {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  gap: 12px;
  background: var(--surface-1);
}
.qa-input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.87rem;
  padding: 10px 16px;
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}
.qa-input:focus { border-color: var(--accent-gold-dim); }
.qa-send {
  background: var(--accent-gold);
  color: #000;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 20px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.qa-send:hover { background: #e8be62; }
.qa-send:disabled { opacity: 0.45; cursor: not-allowed; }

/* Category image styles */
.bg-tech { background: linear-gradient(135deg, #0a1628 0%, #1a3a6a 100%); }
.bg-business { background: linear-gradient(135deg, #1a1a08 0%, #3a3a14 100%); }
.bg-science { background: linear-gradient(135deg, #081a1a 0%, #0f3030 100%); }
.bg-health { background: linear-gradient(135deg, #1a0814 0%, #350e28 100%); }
.bg-sports { background: linear-gradient(135deg, #0f1a08 0%, #1e3510 100%); }
.bg-entertainment { background: linear-gradient(135deg, #1a0a0a 0%, #3a1010 100%); }
.bg-general { background: linear-gradient(135deg, #111116 0%, #1f1f28 100%); }

/* Generating state */
.generating-state {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-gold);
  letter-spacing: 0.06em;
  padding: 8px 0;
}
.gen-dots { display: flex; gap: 4px; }
.gen-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent-gold);
  animation: dot-bounce 1.2s ease-in-out infinite;
}
.gen-dot:nth-child(2) { animation-delay: 0.15s; }
.gen-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot-bounce {
  0%,80%,100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Responsive */
@media (max-width: 1200px) {
  .content-row { grid-template-columns: 1fr 320px; gap: 32px; }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .masthead, .category-nav, .main-container, .site-footer { padding-left: 24px; padding-right: 24px; }
  .site-footer { padding-top: 32px; padding-bottom: 28px; }
  .editorial-pipeline-band-inner { padding: 22px 24px 26px; }
  .hero-card { grid-template-columns: 1fr; }
  .hero-image { display: none; }
  .content-row { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}
@media (max-width: 640px) {
  .masthead { padding: 12px 16px; }
  .main-container { padding: 20px 16px; }
  .article-grid { grid-template-columns: 1fr; }
  .hero-content { padding: 28px; }
  .masthead-meta { display: none; }
  .article-wrapper { padding: 40px 20px 36px; }
  .site-footer { padding: 28px 20px 24px; }
  .article-masthead { padding: 14px 16px; }
}

/* fade-in util */
.fade-in { animation: fade-slide-in 0.5s var(--ease-out) both; }

/* Error */
.error-msg {
  text-align: center;
  padding: 60px 20px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

/* Related */
.related-section { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--border); }
.related-title {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.related-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  cursor: pointer;
  background: var(--surface-1);
  transition: border-color 0.2s, transform 0.2s;
}
.related-card:hover { border-color: var(--accent-gold-dim); transform: translateY(-2px); }
.related-headline {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.related-source { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-muted); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border); }
