/* ═══════════════════════════════════════════════
   GAZZETTA DI KYIV v22.5 — Crossed Bulavas Purple · Invisible Gold · Gradients
   Background: #FFFFFF (pure white including masthead)
   Cards: #FFFFFF with #E5E7EB borders
   Sharp Blue: #2563EB | Casino Green: #059669
   Casino Red: #DC2626 | Gold accent: #D4AF37
   Text: #111827 | Secondary: #6B7280
   Masthead name: Shimmering Tyrian gradient with 0.4px translucent gold stroke
   ═══════════════════════════════════════════════ */

:root {
  --bg:        #FFFFFF;   /* Pure white everywhere */
  --white:     #FFFFFF;
  --card-bg:   #FFFFFF;

  --blue:      #2563EB;   /* Sharp blue — links, interactive */
  --green:     #059669;   /* Casino green — buy signals, inflows */
  --red:       #DC2626;   /* Casino red — sell signals, outflows */
  --gold:      #D4AF37;   /* 24K gold — accents, masthead name */
  --gold-light: rgba(212,175,55,0.10);

  --ink:       #111827;   /* Near-black — all body text */
  --ink-light: #6B7280;   /* Grey — secondary text */
  --ink-muted: #9CA3AF;   /* Muted grey */

  --divider:   #E5E7EB;   /* Light divider */
  --card-border: #E5E7EB;

  --display: 'Playfair Display', Georgia, serif;
  --body:    'Source Serif 4', Georgia, serif;
  --sans:    'Inter', -apple-system, sans-serif;

  --φ: 1.618;
  --φ-sm: calc(1rem / var(--φ));
  --φ-md: 1.618rem;
  --φ-lg: calc(1rem * var(--φ) * var(--φ));
  --φ-xl: calc(1rem * var(--φ) * var(--φ) * var(--φ));
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #FFFFFF;
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* ── Masthead ── */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  background: #FFFFFF;
  border-bottom: 2px solid var(--gold);
  border-radius: 0 0 calc(var(--φ-sm) * 0.618) calc(var(--φ-sm) * 0.618);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 12px;
}
.masthead-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.masthead-bulava {
  position: relative;
  display: inline-flex;
  width: 28px;
  height: 40px;
  color: var(--gold);
  vertical-align: middle;
  flex-shrink: 0;
}
.masthead-bulava svg {
  position: absolute;
  width: 20px;
  height: 40px;
  top: 0;
  left: 4px;
  transform-origin: 50% 62%;
  display: block;
}
.masthead-bulava svg:first-child {
  transform: rotate(-32deg);
}
.masthead-bulava svg:last-child {
  transform: scaleX(-1) rotate(-32deg);
}
.masthead-caduceus {
  display: inline-flex;
  align-items: center;
  width: 28px;
  height: 40px;
  color: var(--gold);
  vertical-align: middle;
  flex-shrink: 0;
}
.masthead-caduceus svg {
  display: block;
  width: 28px;
  height: 40px;
}
.masthead-name {
  font-family: var(--display);
  font-size: var(--φ-lg);
  /* Shimmering Tyrian purple — gradient with lustre */
  background: linear-gradient(
    135deg,
    #990024 0%,
    #B8305A 28%,
    #990024 50%,
    #7B2D5E 72%,
    #990024 100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Hairline gold — only the greedy eye catches it */
  -webkit-text-stroke: 0.4px rgba(245, 215, 110, 0.45);
  text-stroke: 0.4px rgba(245, 215, 110, 0.45);
  white-space: nowrap;
  animation: shimmer 8s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.masthead-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.masthead-tagline {
  font-family: var(--body);
  font-style: italic;
  font-size: 12px;
  color: var(--ink-light);
}
.masthead-meta {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ── Hero Section ── */
.hero {
  text-align: center;
  padding: 16px 20px 10px;
  border-bottom: 1px solid var(--divider);
  background: #FFFFFF;
}
.hero-content { max-width: 600px; margin: 0 auto; }
.hero-headline {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 6px;
}
.hero-subtitle {
  font-family: var(--body);
  font-size: 12px;
  color: var(--ink-light);
  margin-bottom: 10px;
}
.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 10px;
}
.hero-btn {
  background: var(--ink);
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  padding: 8px 20px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.hero-btn:hover { background: #374151; }
.hero-link {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--blue);
  text-decoration: none;
}
.hero-link:hover { text-decoration: underline; }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 28px;
}
.hero-stat { text-align: center; }
.hero-stat-value {
  display: block;
  font-family: var(--display);
  font-size: 18px;
  color: var(--ink);
  line-height: 1.2;
}
.hero-stat-label {
  display: block;
  font-family: var(--sans);
  font-size: 8px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 1px;
}
/* Confidence tier tag */
.confidence-tier {
  display: inline-block;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 5px;
  border-radius: 2px;
  vertical-align: middle;
  margin-left: 4px;
  line-height: 1.4;
}
.confidence-tier.tier-high {
  color: var(--green);
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.2);
}
.confidence-tier.tier-medium {
  color: #B45309;
  background: rgba(180, 83, 9, 0.08);
  border: 1px solid rgba(180, 83, 9, 0.2);
}
.confidence-tier.tier-low {
  color: var(--red);
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.2);
}
@media (max-width: 600px) {
  .hero { padding: 32px 16px 24px; }
  .hero-headline { font-size: 22px; }
  .hero-stats { gap: 20px; flex-wrap: wrap; justify-content: center; }
  .hero-stat { flex: 0 0 auto; min-width: 80px; }
}
@media (max-width: 480px) {
  .hero-stats { flex-direction: column; align-items: center; gap: 14px; }
  .hero-stat { display: flex; align-items: baseline; gap: 6px; min-width: unset; }
  .hero-stat-value { font-size: 16px; }
  .hero-stat-label { font-size: 7px; }
}

/* ── Severity Badges ── */
.severity {
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
}
.severity.critical {
  color: var(--red);
  background: rgba(220,38,38,0.08);
  border: 1px solid rgba(220,38,38,0.2);
}
.severity.high {
  color: #D97706;
  background: rgba(217,119,6,0.08);
  border: 1px solid rgba(217,119,6,0.2);
}
.severity.elevated {
  color: var(--blue);
  background: rgba(37,99,235,0.06);
  border: 1px solid rgba(37,99,235,0.15);
}

/* ── Contradiction Tier Badge ── self-explanatory, no hover needed */
.tier-badge {
  font-family: var(--sans);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 2px 6px;
  border-radius: 3px;
  line-height: 1.2;
  cursor: default;
}
.tier-score {
  font-weight: 400;
  opacity: 0.5;
  margin-left: 2px;
}
/* CONTRADICTED: narrative inverts reality — red */
.tier-badge.contradicted {
  color: #DC2626;
  background: rgba(220,38,38,0.08);
  border: 1px solid rgba(220,38,38,0.15);
}
/* DIVERGENT: material gap — amber */
.tier-badge.divergent {
  color: #B45309;
  background: rgba(217,119,6,0.07);
  border: 1px solid rgba(217,119,6,0.12);
}
/* ALIGNED: narrative ≈ reality — muted */
.tier-badge.aligned {
  color: var(--ink-muted);
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.06);
}
/* DEVELOPING: early tension — blue-gray */
.tier-badge.developing {
  color: #4B6B8A;
  background: rgba(75,107,138,0.06);
  border: 1px solid rgba(75,107,138,0.1);
}

/* ── Layout — single column ── */
.layout {
  max-width: 1000px;
  margin: 0 auto;
  padding: 10px;
}
.main-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sidebar-spacer { display: none; }

/* ── Collapsible Container ── */
.container {
  background: var(--white);
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* Subtle divider between containers */
.container + .container {
  border-top: 1px solid var(--divider);
}

/* THE SIGNAL — synthesis container, visually distinct */
.signal-container {
  border-left: 3px solid var(--gold);
  background: linear-gradient(135deg, rgba(212,175,55,0.06) 0%, rgba(212,175,55,0.01) 60%, rgba(255,255,255,1) 100%);
}
.signal-container .container-header {
  border-bottom-color: rgba(212,175,55,0.25);
}
.signal-container .container-title {
  color: var(--gold);
}

.container-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(var(--φ-sm) * 0.8) var(--φ-md);
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid var(--divider);
  transition: background 0.15s;
}
.container-header:hover {
  background: #F3F4F6;
}
.container-header:active {
  background: #E5E7EB;
}
.container-title {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}
.container-count {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 500;
  color: var(--ink-muted);
  margin-left: 4px;
}
.container-subtitle {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 500;
  color: var(--ink-muted);
  margin-left: 4px;
  flex: 1;
}
.container-arrow {
  margin-left: auto;
  font-size: 10px;
  color: var(--ink-muted);
  transition: transform 0.3s ease;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}
.container.expanded .container-arrow {
  transform: rotate(180deg);
}
.container.expanded .container-hint {
  display: none;
}
.container-desc {
  font-family: var(--body);
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-light);
  padding: 8px 12px 0 12px;
  font-style: italic;
  max-width: 680px;
}
.container.expanded .container-desc {
  display: none;
}

/* ── Container Body (collapsible) ── */
.container-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.3s ease;
  padding: 0 12px;
}
.container.expanded .container-body {
  max-height: 4000px;
  opacity: 1;
  padding: 8px 12px 12px 12px;
}

/* ── Story Cards ── */
.news-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--φ-md);
}

/* Lead story card */
.card.lead {
  grid-column: 1 / -1;
  border-left: 3px solid var(--gold);
}
.card.lead:nth-child(odd) { margin-top: 0; }
.card.lead:nth-child(even) { margin-top: 0; }
/* Constellation stagger */
.card:nth-child(odd):not(.lead) { margin-top: calc(var(--φ-md) * 1.5); }
.card:nth-child(even):not(.lead) { margin-top: 0; }

/* Non-lead story cards — colored borders by sector */
.card {
  background: var(--card-bg);
  border: none;
  border-left: 3px solid var(--ink-muted);
  border-radius: 0;
  box-shadow: none;
  margin-bottom: var(--φ-sm);
  cursor: default;
  transition: border-color 0.12s, background 0.15s;
}
.card:hover {
  background: #F9FAFB;
}
.card.geopolitics { border-left-color: var(--gold); }
.card.tech { border-left-color: var(--blue); }
.card.macro { border-left-color: var(--green); }
.card.markets { border-left-color: var(--red); }

.card-collapsed {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  padding: 5px 10px;
}
.card-collapsed .card-head {
  flex: 1;
  min-width: 0;
}
.card h3 {
  font-family: var(--display);
  font-size: calc(var(--φ-sm) * 1.6);
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
}
.card.lead h3 { font-size: 1.25rem; }
.card .summary {
  font-size: 13px;
  line-height: 1.3;
  color: var(--ink-light);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail, .summary { font-size: 1rem; }
.labels, .meta, .category-tag { font-size: var(--φ-sm); }
.cf-claim {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
  line-height: 1.3;
}

/* Capital flow hint chip — tiny magnitude indicator in collapsed cards */
.cf-hint {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0.65;
  line-height: 1;
  align-self: center;
  flex-shrink: 0;
}

/* Category Tag Pills */
.category-tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1px 5px;
  line-height: 1.3;
  margin-bottom: 3px;
  white-space: nowrap;
  border: 1px solid;
  border-radius: 2px;
}
.category-tag.geopolitics {
  color: var(--gold);
  border-color: var(--gold-light);
}
.category-tag.tech {
  color: var(--blue);
  border-color: rgba(37,99,235,0.2);
}
.category-tag.macro {
  color: var(--green);
  border-color: rgba(5,150,105,0.2);
}
.category-tag.markets {
  color: var(--red);
  border-color: rgba(220,38,38,0.2);
}

/* Expand hint */
.expand-hint {
  font-size: 12px;
  color: var(--ink-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-top: 3px;
  display: inline-flex;
  align-items: center;
}
.card.expanded .expand-hint {
  transform: rotate(180deg);
}

/* ── Share Buttons — conventional visible row (X, FB, Telegram, Reddit, Copy) ── */
.share-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.share-row .share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: none;
  border: 1px solid #E5E7EB;
  border-radius: 4px;
  padding: 0;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.share-row .share-btn:hover {
  background: var(--ink);
  color: #FFFFFF;
  border-color: var(--ink);
}
.share-row .share-btn svg {
  flex-shrink: 0;
}

/* ── Story date timestamp ── */
.story-date {
  font-family: var(--sans);
  font-size: 9px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ── Triangulation Signal ── */
.triangulation-item {
  padding: 10px 12px;
  border-bottom: 1px solid #F3F4F6;
}
.triangulation-item:last-child { border-bottom: none; }
.triangulation-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.triangulation-score {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 700;
  min-width: 40px;
  text-align: center;
}
.triangulation-score.aligned { color: var(--green); }
.triangulation-score.divergent { color: var(--red); }
.triangulation-score.neutral { color: var(--ink-muted); }
.triangulation-headline {
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  flex: 1;
}
.triangulation-verdict {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.triangulation-verdict.max { color: var(--green); }
.triangulation-verdict.high { color: var(--green); }
.triangulation-verdict.moderate { color: #D97706; }
.triangulation-verdict.watch { color: var(--ink-muted); }
.triangulation-detail {
  display: flex;
  gap: 10px;
  font-family: var(--sans);
  font-size: 9px;
  color: var(--ink-muted);
  margin-top: 4px;
  flex-wrap: wrap;
}
.triangulation-detail .tri-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.triangulation-detail .tri-label.event { color: var(--gold); }
.triangulation-detail .tri-label.flow { color: var(--blue); }
.triangulation-detail .tri-label.bet { color: var(--green); }
.triangulation-detail .tri-align.aligned { color: var(--green); font-weight: 600; }
.triangulation-detail .tri-align.divergent { color: var(--red); font-weight: 600; }

/* Expanded body */
.card-expanded-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.3s ease;
  padding: 0 10px;
}
.card.expanded .card-expanded-body {
  max-height: 800px;
  opacity: 1;
  padding: 0 10px 8px 10px;
}

/* Detail (They Say / Reality) */
.card .detail {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.2s, margin 0.2s;
  margin-top: 0;
  border-top: 1px solid transparent;
  font-size: 13px;
  line-height: 1.45;
}
.card.expanded .detail {
  max-height: 400px;
  opacity: 1;
  margin-top: 8px;
  padding-top: 8px;
  border-top-color: var(--divider);
}
.card .detail .con-they {
  color: var(--ink-light);
  font-style: italic;
  margin-bottom: 6px;
  padding: 4px 8px;
  font-size: 12px;
}
.card .detail .con-real {
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 6px;
  padding: 4px 8px;
  font-size: 12px;
}
.con-label {
  font-family: var(--sans);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 2px;
}
.card .detail .con-they .con-label { color: var(--ink-muted); }
.card .detail .con-real .con-label { color: var(--blue); }

/* Capital Flow Block */
.capital-flow-block {
  margin-top: 8px;
  padding: 6px 8px;
  border-left: 2px solid var(--blue);
  background: rgba(37,99,235,0.03);
  border-radius: var(--φ-sm);
  font-size: 11px;
  line-height: 1.4;
  color: var(--ink-light);
}
.capital-flow-block .cf-label {
  font-family: var(--sans);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
  color: var(--blue);
}
.cf-line {
  display: block;
  font-size: 11px;
  line-height: 1.5;
}

/* THE PLAY block */
.the-play {
  margin-top: 6px;
  padding: 6px 10px;
  border-left: 3px solid var(--gold);
  border-radius: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink);
}
.the-play .pi-label {
  font-family: var(--sans);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 2px;
  color: var(--gold);
}
.the-play .pi-text {
  font-style: italic;
  font-size: 11px;
  color: var(--ink-light);
}

/* ── Extremum Line ── */
.card-extremum {
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: var(--φ-sm);
  background: rgba(0,0,0,0.015);
  font-family: var(--sans);
  font-size: 10px;
  line-height: 1.6;
  border-left: 2px solid var(--divider);
}
.ex-label {
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 3px;
  color: var(--ink-muted);
}
.ex-win { color: var(--green); font-weight: 700; margin-right: 8px; }
.ex-lose { color: var(--red); font-weight: 700; margin-right: 8px; }
.ex-idiot { color: #B45309; font-weight: 700; margin-right: 8px; }
.ex-genius { color: var(--blue); font-weight: 700; }

/* Card photo */
.card-photo {
  flex-shrink: 0;
  margin-top: 6px;
  text-align: right;
}
.card-photo img {
  width: 80px;
  height: 56px;
  object-fit: cover;
  border: 1px solid var(--divider);
}

/* ── PDR Gauge ── */
.pdr-gauge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  margin-bottom: 8px;
  background: rgba(37,99,235,0.04);
  border: 1px solid var(--divider);
}
.pdr-label {
  font-family: var(--sans);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-light);
}
.pdr-value {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
}
.pdr-regime {
  font-family: var(--sans);
  font-size: 7px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 5px;
  margin-left: auto;
}
.pdr-regime.passive   { background: rgba(5,150,105,0.12); color: var(--green); }
.pdr-regime.contested { background: rgba(220,38,38,0.10); color: var(--red); }
.pdr-regime.active    { background: rgba(37,99,235,0.10); color: var(--blue); }
.pdr-trend {
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--ink-light);
  font-family: var(--sans);
}

/* ── Asset Panel ── */
.asset-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.asset-row {
  display: flex;
  flex-direction: column;
  padding: 3px 0;
  border-bottom: 1px solid var(--divider);
  gap: 2px;
}
.asset-row:last-child { border-bottom: none; }
.asset-info {
  display: flex;
  align-items: center;
  gap: 4px;
}
.asset-symbol {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
}
.asset-price {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
}
.asset-change {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
}
.asset-change.up { color: var(--green); }
.asset-change.down { color: var(--red); }

.asset-trade {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 10px;
}
.anchor-pill {
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 6px;
}
.anchor-pill.buy   { background: rgba(5,150,105,0.12); color: var(--green); }
.anchor-pill.sell  { background: rgba(220,38,38,0.10); color: var(--red); }
.anchor-pill.watch { background: var(--gold-light); color: var(--gold); }
.asset-zone { color: var(--ink); }
.asset-stop  { color: var(--red); font-size: 9px; }
.anchor-badge {
  font-size: 7px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 5px;
  margin-left: auto;
}
.anchor-badge.high { background: rgba(5,150,105,0.15); color: var(--green); }
.anchor-badge.med  { background: var(--gold-light); color: var(--gold); }
.anchor-badge.low  { background: rgba(0,0,0,0.05); color: var(--ink-muted); }

.asset-note {
  font-family: var(--sans);
  font-size: 8px;
  color: var(--ink-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 10px;
  padding-top: 6px;
  border-top: 1px solid var(--divider);
  font-style: italic;
}

/* ── Anchor Crypto Signals ── */
.anchor-crypto {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--divider);
}
.anchor-crypto-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
  font-family: var(--sans);
  font-size: 10px;
}
.anchor-crypto-label {
  color: var(--ink-light);
  font-size: 9px;
}
.anchor-crypto-value {
  font-weight: 600;
  color: var(--ink);
}
.anchor-crypto-sub {
  font-size: 9px;
  color: var(--ink-muted);
}

/* ── Capital Flows List ── */
.flows-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.flow-item {
  padding: 6px 8px;
  border-left: 2px solid var(--blue);
  background: rgba(37,99,235,0.03);
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.4;
  margin-bottom: 4px;
}
.flow-item.inflow { border-left-color: var(--green); background: rgba(5,150,105,0.04); }
.flow-item.outflow { border-left-color: var(--red); background: rgba(220,38,38,0.04); }

/* Expandable flow header */
.expandable-flow-header {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}
.expandable-flow-header:hover { opacity: 0.85; }
.flow-headline-text { flex: 1; }

/* Linked story hint — tiny ↳ icon on flow items */
.flow-linked-story-hint {
  font-size: 10px;
  color: var(--ink-muted);
  opacity: 0.4;
  margin: 0 2px;
  flex-shrink: 0;
  line-height: 1;
}

/* Bet pill inside flow header */
.cf-bet-pill {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.03em;
}
.cf-bet-pill.buy { background: rgba(5,150,105,0.12); color: var(--green); }
.cf-bet-pill.sell { background: rgba(220,38,38,0.10); color: var(--red); }
.cf-bet-pill.watch { background: rgba(107,114,128,0.10); color: var(--ink-muted); }

/* Catalyst badge — shows when multiple stories drive same flow */
.catalyst-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
  background: rgba(212,175,55,0.10);
  border: 1px solid rgba(212,175,55,0.25);
  padding: 1px 5px;
  border-radius: 2px;
  margin-left: 6px;
  flex-shrink: 0;
}

/* Expand icon */
.flow-expand-icon {
  display: flex;
  align-items: center;
  color: var(--ink-muted);
  transition: transform 0.2s;
}

/* Expanded section */
.flow-expanded {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--divider);
}

/* Bet detail pill */
.cf-bet-detail-pill {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
  white-space: nowrap;
}
.cf-bet-detail-pill.buy { background: rgba(5,150,105,0.12); color: var(--green); }
.cf-bet-detail-pill.sell { background: rgba(220,38,38,0.10); color: var(--red); }
.cf-bet-detail-pill.watch { background: rgba(107,114,128,0.10); color: var(--ink-muted); }

.flow-headline-text {
  font-weight: 700;
  color: var(--ink);
}
.flow-detail {
  color: var(--ink-light);
  font-size: 10px;
}
.flow-detail .highlight {
  font-weight: 600;
}
.flow-detail .pos { color: var(--green); }
.flow-detail .neg { color: var(--red); }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #111827;
  color: white;
  padding: 8px 20px;
  border-radius: var(--φ-sm);
  font-family: var(--sans);
  font-size: 12px;
  z-index: 1000;
  animation: toastIn 0.3s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── Track Record ── */
.tr-empty {
  text-align: center;
  padding: 20px;
  color: var(--ink-muted);
  font-family: var(--serif);
  font-style: italic;
  font-size: 11px;
}
.tr-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 6px;
}
.tr-stat {
  text-align: center;
  padding: 8px 4px;
  background: #F9FAFB;
  border-radius: 0;
  border: 1px solid #E5E7EB;
}
.tr-val {
  display: block;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 400;
  color: var(--ink);
}
.tr-label {
  display: block;
  font-family: var(--sans);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin-top: 2px;
}
.tr-detail {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-family: var(--sans);
  font-size: 10px;
  color: var(--ink-muted);
  padding: 4px 0;
}
.tr-methodology {
  text-align: center;
  padding: 6px 0 0;
  font-family: var(--sans);
  font-size: 9px;
}
.tr-methodology a {
  color: var(--gold);
  text-decoration: none;
}
.tr-methodology a:hover { text-decoration: underline; }

/* ── Footer ── */
.footer {
  text-align: center;
  padding: 10px;
  font-family: var(--sans);
  font-size: 10px;
  color: var(--ink-muted);
  border-top: 1px solid var(--divider);
  background: #FFFFFF;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.footer a { color: var(--blue); min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */

/* Tablet (≤800px) */
@media (max-width: 800px) {
  .masthead-tagline { font-size: 9px; }
  .masthead-name { font-size: 17px; }
  .container-body { padding: 0 10px; }
  .container.expanded .container-body { padding: 6px 10px 10px 10px; }
}

@media (max-width: 768px) {
  .news-col { grid-template-columns: 1fr; }
  .card:nth-child(odd):not(.lead) { margin-top: 0; }
}

/* Phone (≤600px) */
@media (max-width: 600px) {
  .masthead { padding: 5px 10px; }
  .masthead-bulava { width: 12px; height: 20px; }
  .masthead-bulava svg { width: 10px; height: 20px; left: 1px; }
  .masthead-caduceus svg { width: 14px; height: 22px; }
  .masthead-name { font-size: 15px; }
  .container-header { padding: 8px 10px; }
  .container-title { font-size: 10px; }
  .card h3 { font-size: 16px; }
  .card.lead h3 { font-size: 17px; }
  .card .summary { font-size: 11px; }
  .card-collapsed { padding: 4px 8px; }
  .card-expanded-body { padding: 0 8px; }
  .card.expanded .card-expanded-body { padding: 0 8px 6px 8px; }
}

/* Small phone (≤400px) */
@media (max-width: 400px) {
  .masthead { padding: 4px 8px; gap: 6px; }
  .masthead-left { gap: 4px; }
  .masthead-caduceus svg { width: 12px; height: 18px; }
  .masthead-name { font-size: 14px; }
  .masthead-meta { font-size: 7px; }
  .container-header { padding: 6px 8px; }
  .container-title { font-size: 9px; }
  .card { padding: 0; }
  .card h3 { font-size: 14px; }
  .card.lead h3 { font-size: 15px; }
  .card .summary { font-size: 12px; }
  .card .detail { font-size: 12px; }
  .card .detail .con-they,
  .card .detail .con-real { font-size: 10px; }
  .card-photo img { width: 60px; height: 42px; }
  .footer { font-size: 9px; }
}

/* ═══════════════════════════════════════════════
   TIMELINE & LIVING STORIES — preserved from v18
   ═══════════════════════════════════════════════ */

/* Update badge */
.story-update-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 700;
  line-height: 1.2;
  padding: 2px 6px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Story status dot */
.story-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.story-status-dot.gold { background: var(--gold); }
.story-status-dot.sky { background: var(--blue); }
.story-status-dot.grey { background: var(--ink-muted); }
.story-status-dot.pulse {
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}

/* Updated-ago timestamp */
.updated-ago {
  font-family: var(--sans);
  font-size: 9px;
  color: var(--ink-muted);
  display: inline-block;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 2px;
}

/* Evolution timeline */
.story-evolution-timeline {
  display: none;
  margin-top: 10px;
  padding: 10px 0 8px 14px;
  border-left: 2px solid var(--gold);
  margin-left: 2px;
  font-family: var(--body);
}
.card.expanded .story-evolution-timeline {
  display: block;
  animation: fadeInTimeline 0.25s ease;
}
@keyframes fadeInTimeline {
  from { opacity: 0; max-height: 0; }
  to { opacity: 1; max-height: 600px; }
}

.timeline-loading,
.timeline-empty {
  font-family: var(--sans);
  font-size: 10px;
  color: var(--ink-muted);
  font-style: italic;
  padding: 12px 0;
}

/* Update entry */
.update-entry {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  position: relative;
  border-left: 1px solid var(--divider);
  margin-left: 4px;
  padding-left: 14px;
}
.update-entry:last-child {
  border-left-color: var(--gold);
}
.update-entry:last-child::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 0;
  bottom: 50%;
  width: 1px;
  background: var(--divider);
}

.timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-muted);
  flex-shrink: 0;
  margin-top: 4px;
  position: absolute;
  left: -5px;
  top: 10px;
  z-index: 1;
}
.timeline-dot.gold { background: var(--gold); }
.timeline-dot.gold.pulse {
  animation: pulse-dot 2s ease-in-out infinite;
}
.timeline-content {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-light);
}
.update-timestamp {
  font-family: var(--sans);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  display: inline-block;
  margin-right: 6px;
}
.update-type-badge {
  font-family: var(--sans);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-light);
  padding: 1px 5px;
  display: inline-block;
  vertical-align: middle;
}
.update-delta {
  margin: 3px 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink);
}
.update-spawn {
  display: inline-block;
  margin-top: 3px;
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 600;
  color: var(--gold);
  font-style: italic;
}

.timeline-state {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--divider);
  font-family: var(--sans);
  font-size: 9px;
  color: var(--ink-muted);
}
.timeline-state-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.timeline-state-text {
  text-transform: capitalize;
  font-weight: 600;
}
.timeline-source-count {
  margin-left: auto;
  color: var(--ink-light);
}

/* Thread navigation */
.thread-nav {
  display: flex;
  gap: 6px;
  padding: 4px 0 0 0;
  flex-wrap: wrap;
  margin-top: 6px;
}
.thread-pill {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 500;
  padding: 3px 8px;
  border: 1px solid var(--divider);
  cursor: pointer;
  color: var(--ink-muted);
  transition: all 0.15s;
  background: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.thread-pill.active {
  background: var(--gold-light);
  border-color: var(--gold);
  color: var(--gold);
  font-weight: 600;
}
.thread-pill:hover {
  border-color: var(--gold);
  background: var(--gold-light);
}

/* Resolved banner */
.resolved-banner {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  margin-top: 8px;
  color: var(--blue);
  font-weight: bold;
  font-size: 12px;
}
.resolved-icon {
  font-size: 14px;
}

/* Recently updated flash */
.card.recently-updated {
  animation: flash-update 0.8s ease-out;
  border-color: var(--gold);
}
@keyframes flash-update {
  0% { background: var(--gold-light); box-shadow: 0 0 0 2px rgba(212,175,55,0.3); }
  100% { background: #FFFFFF; box-shadow: 0 0 0 0 transparent; }
}

/* Responsive timeline mobile overlay */
@media (max-width: 600px) {
  .story-evolution-timeline {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 300;
    background: #FFFFFF;
    border-left: none;
    border-top: 2px solid var(--gold);
    margin: 0;
    padding: 16px;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
    animation: slideUpTimeline 0.3s ease;
  }
  @keyframes slideUpTimeline {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  .card.expanded .story-evolution-timeline {
    display: block;
  }
  .update-entry { padding: 6px 0 6px 12px; }
  .update-delta { font-size: 11px; }
  .timeline-content { font-size: 12px; }
  .thread-pill { font-size: 8px; padding: 2px 6px; max-width: 120px; }
}

/* ═══════════════════════════════════════════════════════════════
   GLOSSARY TOOLTIPS — inline explanations for finance acronyms
   ═══════════════════════════════════════════════════════════════ */

.glossary-tip {
  border-bottom: 1px dashed var(--ink-muted);
  cursor: help;
  position: relative;
  color: inherit;
}

.glossary-tip:hover::after,
.glossary-tip:focus::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  line-height: 1.4;
  padding: 6px 10px;
  border-radius: 2px;
  white-space: normal;
  max-width: 220px;
  z-index: 1000;
  pointer-events: none;
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.01em;
}

/* Flows loading state */
.flows-loading {
  text-align: center;
  color: var(--ink-muted);
  font-style: italic;
  padding: 20px;
  font-size: 12px;
}
