/* ============================================================
   WorldLens — Demo story page (shared by all 4 story pages)
   ============================================================ */

body { background: #000000; }
main { padding-bottom: 0; }

/* --------- Wrapper --------- */
.story-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

/* --------- Back button --------- */
.story-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #555555;
  font-family: var(--font-body);
  font-size: 12px;
  text-decoration: none;
  margin-bottom: 18px;
  transition: color 0.2s ease;
}
.story-back:hover { color: #EF9F27; }

/* --------- Header row --------- */
.story-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.story-head .read-mode-toggle { margin-left: auto; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.badge-critical   { background: rgba(239, 68, 68, 0.15); color: #EF4444; border-color: rgba(239, 68, 68, 0.3); }
.badge-major      { background: rgba(186, 117, 23, 0.15); color: #EF9F27; border-color: rgba(186, 117, 23, 0.3); }
.cat-geopolitics  { background: rgba(239, 68, 68, 0.12); color: #EF4444; border-color: rgba(239, 68, 68, 0.25); }
.cat-politics     { background: rgba(167, 139, 250, 0.12); color: #a78bfa; border-color: rgba(167, 139, 250, 0.25); }
.cat-health       { background: rgba(63, 185, 80, 0.12); color: #3fb950; border-color: rgba(63, 185, 80, 0.25); }
.cat-technology   { background: rgba(55, 138, 221, 0.12); color: #378ADD; border-color: rgba(55, 138, 221, 0.25); }

/* Meta: source count / time / dot */
.source-count,
.time-ago {
  color: #666666;
  font-family: var(--font-body);
  font-size: 11px;
}
.meta-dot {
  color: #333333;
  font-size: 11px;
  margin: 0 -2px;
}

/* Source pills */
.source-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.source-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  background: #1a1a1a;
  border: 1px solid #333333;
  border-radius: 20px;
  color: #888888;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
}
.pill-count-mobile { display: none; }

/* Read-mode toggle */
.read-mode-toggle {
  display: inline-flex;
  padding: 3px;
  background: #111111;
  border: 1px solid #333333;
  border-radius: 999px;
  flex-shrink: 0;
}
.read-mode-btn {
  background: transparent;
  border: none;
  color: #888888;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 6px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.read-mode-btn:hover { color: #E0D5C5; }
.read-mode-btn.active {
  background: #1a1a1a;
  color: #EF9F27;
  border: 1px solid #333333;
}

/* --------- Title --------- */
.story-title {
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}

/* --------- Plain English toggle --------- */
.pe-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #0a0a0a;
  border: 1px solid #222222;
  border-radius: 8px;
  margin-bottom: 18px;
}
.pe-label {
  color: #E0D5C5;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
}
.pe-sub {
  color: #555555;
  font-family: var(--font-body);
  font-size: 11px;
  margin-left: auto;
  margin-right: 10px;
}
.pe-switch {
  position: relative;
  width: 40px;
  height: 22px;
  background: #333333;
  border: none;
  border-radius: 11px;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.25s ease;
  flex-shrink: 0;
}
.pe-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  transition: left 0.25s ease;
}
.pe-switch.on { background: #EF9F27; }
.pe-switch.on::after { left: 20px; }

/* --------- Divergence bar --------- */
.divergence { margin-bottom: 24px; }
.divergence-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.divergence-name {
  color: #555555;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.divergence-score {
  color: #EF4444;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
}
.divergence-bar {
  width: 100%;
  height: 4px;
  background: #1a1a1a;
  border-radius: 2px;
  overflow: hidden;
}
.divergence-fill {
  height: 100%;
  background: #EF4444;
  border-radius: 2px;
}

/* --------- Section heading --------- */
.section-heading {
  color: #EF9F27;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 32px 0 14px;
}

/* --------- Summary blocks (read-mode variants) --------- */
.summary-30s,
.summary-2min,
.summary-deep { display: none; }

.story-wrap.mode-30s  .summary-30s  { display: block; }
.story-wrap.mode-2min .summary-2min { display: block; }
.story-wrap.mode-deep .summary-deep { display: block; }

/* 30s — numbered amber bullets */
.bullets-30s {
  list-style: none;
  padding: 0;
  margin: 0;
}
.bullets-30s li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #1a1a1a;
  align-items: flex-start;
}
.bullets-30s li:last-child { border-bottom: none; }
.bullet-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: rgba(239, 159, 39, 0.12);
  border: 1px solid rgba(239, 159, 39, 0.3);
  border-radius: 4px;
  color: #EF9F27;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.bullets-30s p {
  margin: 0;
  color: #888888;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.65;
}

/* 2min — paragraph with red left border */
.summary-2min-box {
  background: #111111;
  border: 1px solid #333333;
  border-left: 2px solid #EF4444;
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
}
.summary-2min-box p {
  color: #E0D5C5;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.75;
  font-weight: 300;
  margin: 0;
}

/* --------- Intel Brief (Deep mode) --------- */
.intel-brief {
  position: relative;
  border: 1px solid #333333;
  border-radius: 10px;
  overflow: hidden;
  background: #000000;
}
.intel-brief::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, #EF9F27, #EF4444);
}
.intel-brief-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid #1a1a1a;
}
.intel-brief-label {
  color: #EF9F27;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.intel-brief-time {
  color: #333333;
  font-family: var(--font-body);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.intel-brief-body { padding: 20px; }

.intel-section { margin-bottom: 22px; }
.intel-section:last-child { margin-bottom: 0; }
.intel-section-label {
  color: #EF9F27;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-left: 2px solid #EF9F27;
  padding-left: 10px;
  margin-bottom: 10px;
}
.intel-section p {
  color: #888888;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
}

/* Key actor pills + rows */
.actor-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.actor-item {
  color: #888888;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.65;
}
.actor-name {
  display: inline-block;
  background: rgba(239, 159, 39, 0.12);
  border: 1px solid rgba(239, 159, 39, 0.25);
  color: #EF9F27;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-right: 6px;
  vertical-align: middle;
}

/* Watch list (► prefix) */
.watch-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.watch-list li {
  position: relative;
  padding: 6px 0 6px 18px;
  color: #888888;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.65;
}
.watch-list li::before {
  content: '\25BA';
  position: absolute;
  left: 0;
  top: 8px;
  color: #EF9F27;
  font-size: 9px;
}

/* Bottom line box */
.bottom-line-box {
  background: rgba(239, 159, 39, 0.07);
  border: 1px solid rgba(239, 159, 39, 0.2);
  border-radius: 8px;
  padding: 14px 16px;
}
.bottom-line-box p {
  color: #E0D5C5;
  font-style: italic;
  font-size: 13px;
  line-height: 1.7;
}

.intel-brief-footer {
  text-align: center;
  padding: 10px 20px;
  border-top: 1px solid #1a1a1a;
  color: #333333;
  font-family: var(--font-body);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* --------- Plain English toggle content swap --------- */
.pe-plain { display: none; }
.story-wrap.plain-english .pe-normal { display: none; }
.story-wrap.plain-english .pe-plain  { display: block; }

/* --------- Impact grid (2x2) --------- */
.impact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.impact-card {
  background: #111111;
  border: 1px solid #333333;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.impact-cat {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}
.impact-cat.cat-amber  { color: #EF9F27; }
.impact-cat.cat-green  { color: #3fb950; }
.impact-cat.cat-blue   { color: #378ADD; }
.impact-cat.cat-purple { color: #a78bfa; }
.impact-cat.cat-red    { color: #EF4444; }
.impact-headline {
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
}
.impact-desc {
  color: #888888;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.65;
  margin: 0;
}
.impact-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  width: fit-content;
  margin-top: auto;
}
.impact-badge.direct   { background: rgba(239, 68, 68, 0.15); color: #EF4444; border-color: rgba(239, 68, 68, 0.3); }
.impact-badge.indirect { background: rgba(239, 159, 39, 0.15); color: #EF9F27; border-color: rgba(239, 159, 39, 0.3); }
.impact-badge.watch    { background: rgba(55, 138, 221, 0.12); color: #378ADD; border-color: rgba(55, 138, 221, 0.25); }

/* --------- Perspectives (grouped by region) --------- */
.region-group { margin-bottom: 24px; }
.region-group:last-child { margin-bottom: 0; }
.region-label {
  display: block;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-bottom: 6px;
  margin-bottom: 12px;
}
.region-western     { color: #378ADD; border-bottom: 1px solid rgba(55, 138, 221, 0.3); }
.region-middle-east { color: #1D9E75; border-bottom: 1px solid rgba(29, 158, 117, 0.3); }
.region-russian     { color: #EF4444; border-bottom: 1px solid rgba(239, 68, 68, 0.3); }
.region-asian       { color: #EF9F27; border-bottom: 1px solid rgba(239, 159, 39, 0.3); }

.perspective-card {
  background: #111111;
  border: 1px solid #333333;
  border-left: 2px solid #555555;
  border-radius: 0 10px 10px 0;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.perspective-card:last-child { margin-bottom: 0; }
.pc-western     { border-left-color: #378ADD; }
.pc-middle-east { border-left-color: #1D9E75; }
.pc-russian     { border-left-color: #EF4444; }
.pc-asian       { border-left-color: #EF9F27; }

.perspective-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.perspective-source {
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
}
.sentiment-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sentiment-dot.neg { background: #EF4444; }
.sentiment-dot.neu { background: #555555; }
.sentiment-dot.pos { background: #3fb950; }
.perspective-summary {
  color: #888888;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.65;
  margin: 0 0 6px;
}
.perspective-emphasis {
  color: #555555;
  font-family: var(--font-body);
  font-size: 11px;
  font-style: italic;
  margin: 0;
}

/* --------- Articles list --------- */
.articles-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: articles;
}
.articles-list li {
  counter-increment: articles;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #1a1a1a;
  align-items: baseline;
}
.articles-list li:last-child { border-bottom: none; }
.articles-list li::before {
  content: counter(articles);
  color: #555555;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
}
.article-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.article-source {
  color: #555555;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.article-title {
  color: #888888;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
}
.article-time {
  color: #555555;
  font-family: var(--font-body);
  font-size: 11px;
  white-space: nowrap;
}

/* --------- Related stories --------- */
.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.related-card {
  background: #111111;
  border: 1px solid #333333;
  border-radius: 10px;
  padding: 16px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.related-card:hover {
  border-color: #444444;
  background: #141414;
}
.related-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.related-title {
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
}
.related-sources {
  color: #555555;
  font-family: var(--font-body);
  font-size: 11px;
  margin-top: auto;
}

/* --------- Bottom CTA (same as demo.html) --------- */
.demo-bottom-cta {
  background: #111111;
  border-top: 1px solid #333333;
  padding: 40px 20px;
  text-align: center;
}
.demo-bottom-cta h2 {
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 400;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.demo-bottom-cta p {
  color: #888888;
  font-family: var(--font-body);
  font-size: 14px;
  margin: 0 auto 20px;
  max-width: 520px;
}
.demo-bottom-cta .btn-cta {
  display: inline-block;
  background: #EF9F27;
  color: #000000;
  padding: 14px 32px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.demo-bottom-cta .btn-cta:hover {
  background: #F8B238;
  transform: translateY(-1px);
}

/* ============================================================
   RESPONSIVE — Mobile (max-width 767px)
   ============================================================ */
@media (max-width: 767px) {
  .story-wrap { padding: 16px 16px 32px; }

  .story-head { gap: 6px; }
  .read-mode-btn { padding: 5px 10px; font-size: 10px; }

  .story-title { font-size: 18px; }

  /* Source pills: first 2 + mobile count */
  .pill-desktop        { display: none; }
  .pill-count-desktop  { display: none; }
  .pill-count-mobile   { display: inline-flex; }

  .impact-grid   { grid-template-columns: 1fr; }
  .related-grid  { grid-template-columns: 1fr; }

  .intel-brief-body { padding: 16px; }
  .intel-brief-head { padding: 10px 16px; }

  .demo-bottom-cta { padding: 32px 16px 40px; }
  .demo-bottom-cta h2 { font-size: 18px; }
}
