/* ─── Signal Fire Page ──────────────────────────────────────────────── */

/* Two-column layout: latest edition left, archive sidebar right */
.sf-layout {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 32px;
  align-items: start;
}

.sf-main {
  min-width: 0;
}

.sf-sidebar {
  position: sticky;
  top: 32px;
  border-left: 1px solid var(--rule);
  padding-left: 20px;
}

.sidebar-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}

.sf-sidebar .edition-list {
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.sf-sidebar .edition-link {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px 0;
}

.sf-sidebar .edition-date {
  font-size: 14px;
}

.sf-sidebar .edition-meta {
  font-size: 9px;
}

/* Stack on narrow screens */
@media (max-width: 860px) {
  .sf-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .sf-sidebar {
    position: static;
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--rule);
    padding-top: 24px;
  }

  .sf-sidebar .edition-list {
    max-height: none;
  }
}

/* Pixel Bonfire */
.bonfire-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.bonfire {
  image-rendering: pixelated;
  filter: drop-shadow(0 0 12px rgba(201, 150, 59, 0.4))
          drop-shadow(0 0 24px rgba(201, 150, 59, 0.15));
}

/* Flame flicker */
.flame { animation: flicker 0.6s ease-in-out infinite alternate; }
.flame.f1 { animation-delay: 0s; }
.flame.f2 { animation-delay: 0.1s; }
.flame.f3 { animation-delay: 0.15s; }
.flame.f4 { animation-delay: 0.2s; }
.flame.f5 { animation-delay: 0.25s; }
.flame.f6 { animation-delay: 0.05s; }
.flame.f7 { animation-delay: 0.3s; }
.flame.f8 { animation-delay: 0.18s; }

@keyframes flicker {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0.6; transform: translateY(-1px); }
}

/* Ember glow */
.ember { animation: glow 1.2s ease-in-out infinite alternate; }
.ember.e1 { animation-delay: 0s; }
.ember.e2 { animation-delay: 0.4s; }
.ember.e3 { animation-delay: 0.8s; }

@keyframes glow {
  0%   { opacity: 1; }
  100% { opacity: 0.4; }
}

/* Floating sparks */
.spark { animation: rise 2s ease-out infinite; }
.spark.s1 { animation-delay: 0s; }
.spark.s2 { animation-delay: 0.5s; }
.spark.s3 { animation-delay: 1s; }
.spark.s4 { animation-delay: 1.5s; }

@keyframes rise {
  0%   { opacity: 1; transform: translateY(0); }
  50%  { opacity: 0.8; }
  100% { opacity: 0; transform: translateY(-8px); }
}

.digest-dateline {
  margin-bottom: 48px;
}

.digest-dateline .datestamp {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--cream);
  margin-bottom: 4px;
}

.digest-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--iron);
}

/* Executive Summary */
.exec-summary {
  border-left: 2px solid var(--amber);
  padding-left: 24px;
  margin-bottom: 56px;
}

.exec-summary p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--cream-dim);
}

/* Sections */
.digest-section {
  margin-bottom: 48px;
}

.digest-section .section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}

/* Articles */
.digest-article {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}

.digest-article:last-child {
  border-bottom: none;
}

.article-score {
  flex-shrink: 0;
  width: 40px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--bg);
  background: var(--amber);
  border-radius: 2px;
  margin-top: 2px;
}

.article-body {
  flex: 1;
  min-width: 0;
}

.article-title {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--cream);
  line-height: 1.3;
  border-bottom: none;
}

.article-title:hover {
  color: var(--amber-glow);
  border-bottom: none;
}

.article-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--iron);
  margin-top: 4px;
}

.article-summary {
  font-size: 15px;
  line-height: 1.7;
  color: var(--cream-dim);
  margin-top: 8px;
  margin-bottom: 0;
}

/* Deep Reads */
.deep-reads {
  background: var(--surface);
  padding: 24px;
  border-radius: 2px;
}

.deep-reads .section-title {
  border-bottom-color: var(--amber-dim);
}

/* Digest Footer */
.digest-footer {
  margin-top: 56px;
}

.digest-footer p {
  font-size: 14px;
  color: var(--iron);
}

/* Edition Header */
.edition-header-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.kindle-download {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 16px;
  border: 1px solid var(--amber-dim);
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid var(--amber-dim);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.kindle-download:hover {
  background: var(--amber);
  color: var(--bg);
  border-color: var(--amber);
  border-bottom-color: var(--amber);
}

.kindle-icon {
  font-size: 14px;
}

.footer-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Reading Picks */
.reading-picks {
  list-style: none;
  padding: 0;
  margin: 0;
}

.reading-picks li {
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
  line-height: 1.7;
  color: var(--cream-dim);
}

.reading-picks li:last-child {
  border-bottom: none;
}

.reading-picks li strong {
  color: var(--cream);
}

.reading-picks li a {
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid var(--amber-dim);
}

.reading-picks li a:hover {
  color: var(--amber-glow);
  border-bottom-color: var(--amber-glow);
}

/* Edition Archive */
.edition-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.edition-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  border-bottom-style: solid;
}

.edition-link:hover {
  border-bottom-color: var(--amber);
}

.edition-date {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--cream);
}

.edition-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--iron);
}

/* No Digest */
.no-digest {
  text-align: center;
  padding: 96px 0;
}

.no-digest p {
  color: var(--iron);
  font-size: 17px;
}
