/* Lore OS — Mobile-First Intelligence Surface — v=20260418m */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Light theme (default) */
  --bg: #FAFAFA;
  --bg-card: #FFFFFF;
  --text: #1A1A2E;
  --text-muted: #6B7280;
  --text-faint: #9CA3AF;
  --border: #E5E7EB;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --card-border: none;
  --scoreboard-bg: #F3F4F6;
  --pill-bg: #F3F4F6;
  --pill-active-bg: #0A7E8C;
  --pill-active-text: #FFFFFF;
  --nav-bg: #FFFFFF;
  --nav-border: #E5E7EB;
  --nav-text: #9CA3AF;
  --nav-active: #0A7E8C;
  --overlay-bg: rgba(0,0,0,0.4);
  --login-bg: #FFFFFF;
  --divider: #E5E7EB;

  /* Accent */
  --accent: #0A7E8C;
  --accent-light: rgba(10, 126, 140, 0.1);

  /* Domain colors */
  --domain-geopolitics: #E53935;
  --domain-economics: #43A047;
  --domain-technology-ai: #00ACC1;
  --domain-energy-transition: #FF8F00;
  --domain-capital-investment: #7CB342;
  --domain-uae-domestic: #FFB300;
  --domain-africa: #8E24AA;
  --domain-global-south: #795548;
  --domain-sports: #1E88E5;
  --domain-history: #6D4C41;
  --domain-urban-development: #546E7A;
  --domain-gaming-ai: #AB47BC;
  --domain-humor-absurd: #F06292;

  /* Signal levels */
  --signal-now: #E53935;
  --signal-watch: #FF8F00;
  --signal-context: #1E88E5;
}

body.dark {
  --bg: #0F0F1A;
  --bg-card: #1A1A2E;
  --text: #E0E0E8;
  --text-muted: #9CA3AF;
  --text-faint: #6B7280;
  --border: #2D2D44;
  --card-shadow: none;
  --card-border: 1px solid #2D2D44;
  --scoreboard-bg: #16162A;
  --pill-bg: #1E1E35;
  --pill-active-bg: #0A7E8C;
  --pill-active-text: #FFFFFF;
  --nav-bg: #12121F;
  --nav-border: #2D2D44;
  --nav-text: #6B7280;
  --nav-active: #0A7E8C;
  --overlay-bg: rgba(0,0,0,0.7);
  --login-bg: #1A1A2E;
  --divider: #2D2D44;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: 70px;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* ── Top Bar ── */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  padding: 12px 16px 0;
  border-bottom: 1px solid var(--border);
}

.top-bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.top-bar-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
}

.top-bar-title span {
  color: var(--accent);
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--text-muted);
  transition: background 0.2s;
}

.theme-toggle:hover {
  background: var(--pill-bg);
}

/* ── Scoreboard Strip ── */
.scoreboard-strip {
  background: var(--scoreboard-bg);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 0 0 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.scoreboard-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.scoreboard-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.2s;
}

.scoreboard-pill .pill-emoji {
  font-size: 13px;
  flex-shrink: 0;
}

.scoreboard-pill .pill-value {
  color: var(--accent);
  font-weight: 600;
}

.scoreboard-pill .pill-direction {
  font-size: 11px;
}

.pill-direction.up { color: var(--signal-now); }
.pill-direction.down { color: var(--domain-economics); }
.pill-direction.stable { color: var(--text-muted); }

/* Expanded scoreboard */
.scoreboard-expanded {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.scoreboard-strip.expanded .scoreboard-expanded {
  display: block;
}

.tracker-detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.tracker-detail:last-child {
  border-bottom: none;
}

.tracker-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tracker-name {
  font-size: 13px;
  font-weight: 500;
}

.tracker-sparkline {
  width: 80px;
  height: 24px;
}

.tracker-sparkline canvas {
  width: 100%;
  height: 100%;
}

.tracker-prob {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  min-width: 40px;
  text-align: right;
}

/* ── Domain Filter Pills ── */
.domain-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 0 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.domain-filters::-webkit-scrollbar {
  display: none;
}

.domain-pill {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  background: var(--pill-bg);
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.domain-pill.active {
  background: var(--pill-active-bg);
  color: var(--pill-active-text);
}

.domain-pill:not(.active):hover {
  background: var(--border);
}

/* ── Feed ── */
.feed {
  padding: 12px 16px;
}

/* Since last visit marker */
.last-visit-marker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  color: var(--text-faint);
  font-size: 12px;
}

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

.last-visit-badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 4px;
  text-align: center;
}

.last-visit-wrapper {
  text-align: center;
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: var(--card-border);
  border-left: 4px solid var(--card-accent, var(--accent));
  cursor: pointer;
  transition: all 0.2s ease;
}

.card:active {
  transform: scale(0.995);
}

.card-header {
  padding: 14px 14px 12px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.signal-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.signal-badge.now {
  background: rgba(229, 57, 53, 0.12);
  color: var(--signal-now);
}

.signal-badge.watch {
  background: rgba(255, 143, 0, 0.12);
  color: var(--signal-watch);
}

.signal-badge.context {
  background: rgba(30, 136, 229, 0.12);
  color: var(--signal-context);
}

.domain-tag {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--pill-bg);
  color: var(--text-muted);
}

.card-timestamp {
  font-size: 11px;
  color: var(--text-faint);
  margin-left: auto;
}

.card-headline {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

/* Card expanded states */
.card-analysis {
  display: none;
  padding: 0 14px 14px;
  animation: fadeSlideIn 0.25s ease;
}

.card.expanded .card-analysis {
  display: block;
}

.card-analysis p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.card-analysis p:last-child {
  margin-bottom: 0;
}

.full-signal-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.full-signal-btn:hover {
  background: var(--accent);
  color: white;
}

/* Full signal expanded */
.card-full-signal {
  display: none;
  padding: 0 14px 14px;
  animation: fadeSlideIn 0.25s ease;
}

.card.full-expanded .card-full-signal {
  display: block;
}

.full-signal-section {
  margin-bottom: 14px;
}

.full-signal-section:last-child {
  margin-bottom: 0;
}

.full-signal-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.source-list {
  list-style: none;
}

.source-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 3px 0;
  color: var(--text-muted);
}

.source-item a {
  color: var(--accent);
  text-decoration: none;
}

.source-lang {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--pill-bg);
  color: var(--text-faint);
  text-transform: uppercase;
}

.narrative-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.narrative-item {
  padding: 8px;
  border-radius: 8px;
  background: var(--pill-bg);
}

.narrative-perspective {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: capitalize;
  margin-bottom: 2px;
}

.narrative-text {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}

.divergence-score {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--signal-now);
  margin-top: 6px;
}

.precedent-item {
  padding: 8px;
  border-radius: 8px;
  background: var(--pill-bg);
  margin-bottom: 6px;
}

.precedent-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.precedent-match {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
}

.precedent-diff {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.45;
}

.archie-gap {
  display: inline-block;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 143, 0, 0.1);
  color: var(--signal-watch);
  margin-right: 6px;
  margin-bottom: 4px;
}

.quiet-signal-box {
  padding: 10px;
  border-radius: 8px;
  background: rgba(10, 126, 140, 0.08);
  border-left: 3px solid var(--accent);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ── Trackers View ── */
.trackers-view {
  padding: 16px;
}

.tracker-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--card-shadow);
  border: var(--card-border);
}

.tracker-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tracker-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
}

.tracker-card-prob {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}

.tracker-chart {
  height: 60px;
  margin-bottom: 14px;
  position: relative;
}

.tracker-chart canvas {
  width: 100%;
  height: 100%;
}

.sub-prob-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.sub-prob-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--pill-bg);
  font-size: 12px;
}

.sub-prob-name {
  color: var(--text-muted);
}

.sub-prob-value {
  font-weight: 600;
  color: var(--text);
}

/* ── Placeholder Views ── */
.placeholder-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  color: var(--text-muted);
  text-align: center;
  padding: 24px;
}

.placeholder-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.placeholder-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.placeholder-text {
  font-size: 14px;
  color: var(--text-faint);
}

/* ── Bottom Navigation ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--nav-bg);
  border-top: 1px solid var(--nav-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--nav-text);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.2s;
  cursor: pointer;
  background: none;
  border: none;
}

.nav-item.active {
  color: var(--nav-active);
}

.nav-icon {
  font-size: 20px;
  line-height: 1;
}

/* ── Login Screen ── */
.login-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.login-box {
  background: var(--login-bg);
  border-radius: 16px;
  padding: 32px 24px;
  width: 90%;
  max-width: 360px;
  text-align: center;
  box-shadow: var(--card-shadow);
  border: var(--card-border);
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.login-title span {
  color: var(--accent);
}

.lore-wordmark {
  display: block;
  margin: 0 auto;
  height: 72px;
  width: auto;
  mix-blend-mode: screen;
}

/* Light mode: invert so cream text shows on white background */
body:not(.dark) .lore-wordmark {
  mix-blend-mode: normal;
  filter: invert(1);
}

.lore-wordmark-nav {
  display: inline-block;
  height: 32px;
  width: auto;
  vertical-align: middle;
  mix-blend-mode: screen;
}

body:not(.dark) .lore-wordmark-nav {
  mix-blend-mode: normal;
  filter: invert(1);
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.login-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  margin-bottom: 12px;
  outline: none;
  transition: border-color 0.2s;
}

.login-input:focus {
  border-color: var(--accent);
}

.login-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: inherit;
}

.login-btn:hover {
  opacity: 0.9;
}

.login-error {
  color: var(--signal-now);
  font-size: 13px;
  margin-top: 8px;
  display: none;
}

/* ── Animations ── */
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Utilities ── */
.hidden {
  display: none !important;
}

/* ── Responsive ── */
@media (min-width: 768px) {
  .feed, .trackers-view {
    max-width: 640px;
    margin: 0 auto;
  }
  
  .top-bar {
    max-width: 640px;
    margin: 0 auto;
    left: 0;
    right: 0;
  }
}

/* Safe area for iOS */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }
  .bottom-nav {
    height: calc(60px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ── Tracker Dashboard Cards ── */
.tracker-dashboard {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--card-shadow);
}

.tracker-dash-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.tracker-dash-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tracker-dash-emoji { font-size: 20px; }
.tracker-dash-name { font-size: 16px; font-weight: 600; color: var(--text); }

.tracker-dash-prob-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.tracker-dash-prob {
  font-size: 28px;
  font-weight: 700;
}
.tracker-dash-prob.up { color: #E53935; }
.tracker-dash-prob.down { color: #43A047; }
.tracker-dash-prob.stable { color: var(--text-muted); }

.tracker-dash-arrow {
  font-size: 20px;
  font-weight: 700;
}
.tracker-dash-arrow.up { color: #E53935; }
.tracker-dash-arrow.down { color: #43A047; }
.tracker-dash-arrow.stable { color: var(--text-muted); }

.prob-delta {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 4px;
}

.tracker-dash-state {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 16px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}

.tracker-dash-chart {
  height: 60px;
  margin-bottom: 16px;
}
.tracker-dash-chart canvas {
  width: 100%;
  height: 100%;
}

.tracker-dash-section {
  margin-bottom: 14px;
}

.tracker-dash-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.tracker-dash-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

/* Sub-probability bars */
.sub-prob-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.sub-prob-label {
  font-size: 13px;
  color: var(--text);
  min-width: 120px;
  flex-shrink: 0;
}

.sub-prob-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
}

.sub-prob-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.sub-prob-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  min-width: 36px;
  text-align: right;
}

/* Benchmarks */
.benchmark-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.benchmark-item {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
}

.benchmark-item.internal {
  background: var(--accent);
  color: white;
  font-weight: 600;
}

/* Recent signals in tracker */
.tracker-recent-card {
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  line-height: 1.4;
}
.tracker-recent-card:last-child { border-bottom: none; }

/* Connected lenses */
.connection-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.connection-item {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--bg);
  color: var(--text-muted);
}

/* ── Question Probability Rows ── */
.question-row {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.question-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.question-text {
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 8px;
}

.question-prob-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.question-bar-wrap {
  flex: 1;
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
}

.question-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}
.question-bar.up { background: #E53935; }
.question-bar.down { background: #43A047; }
.question-bar.stable { background: var(--accent); }

.question-pct {
  font-size: 16px;
  font-weight: 700;
  min-width: 42px;
  text-align: right;
}
.question-pct.up { color: #E53935; }
.question-pct.down { color: #43A047; }
.question-pct.stable { color: var(--accent); }

.question-arrow {
  font-size: 14px;
  font-weight: 700;
}
.question-arrow.up { color: #E53935; }
.question-arrow.down { color: #43A047; }
.question-arrow.stable { color: var(--text-muted); }

.question-deadline {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Adjust tracker header for direction-only (no big probability number) */
.tracker-dash-direction {
  display: flex;
  align-items: center;
}
.tracker-dash-direction .tracker-dash-arrow {
  font-size: 24px;
}

/* ── Redesigned Scoreboard Pills (color dots) ── */
.scoreboard-pill {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 20px;
  background: var(--card-bg);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.scoreboard-pill:active { transform: scale(0.95); }

.pill-dot { font-size: 10px; }
.pill-emoji { font-size: 16px; }

/* Remove old pill elements */
.pill-name, .pill-value, .pill-direction { display: none; }

/* Expanded tracker detail — lead question */
.tracker-detail-expanded {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.tracker-detail-expanded:last-child { border-bottom: none; }

.expanded-emoji { font-size: 16px; flex-shrink: 0; }

.expanded-question {
  flex: 1;
  font-size: 13px;
  line-height: 1.3;
  color: var(--text);
}

.expanded-prob {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.expanded-prob.up { color: #E53935; }
.expanded-prob.down { color: #43A047; }
.expanded-prob.stable { color: var(--accent); }


/* ── Scoreboard Pills — Single Row Horizontal Scroll ── */
#scoreboard-pills {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  gap: 6px;
  padding: 8px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#scoreboard-pills::-webkit-scrollbar { display: none; }

.scoreboard-pill {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 6px 8px;
  border-radius: 16px;
  background: var(--card-bg);
  min-width: fit-content;
}

.pill-emoji { font-size: 14px; }
.pill-dot { font-size: 8px; }

/* ── Deep Dive Teaser (inside expanded card) ── */
.deep-dive-teaser {
  margin-top: 16px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(10, 126, 140, 0.08), rgba(10, 126, 140, 0.03));
  border: 1px solid rgba(10, 126, 140, 0.2);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.deep-dive-teaser:active {
  transform: scale(0.98);
  background: linear-gradient(135deg, rgba(10, 126, 140, 0.15), rgba(10, 126, 140, 0.06));
}

.deep-dive-teaser-line {
  width: 40px;
  height: 2px;
  background: var(--accent);
  margin: 0 auto 10px;
  border-radius: 1px;
}

.deep-dive-teaser-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-align: center;
  margin-bottom: 4px;
}

.deep-dive-teaser-stats {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 6px;
}

.deep-dive-teaser-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-align: center;
}

/* ── Cluster Prompt (feed interruption) ── */
.cluster-prompt {
  display: flex;
  gap: 12px;
  padding: 16px;
  margin: 8px 0;
  background: linear-gradient(135deg, rgba(10, 126, 140, 0.06), rgba(10, 126, 140, 0.02));
  border: 1px dashed rgba(10, 126, 140, 0.3);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cluster-prompt:active {
  transform: scale(0.98);
  border-style: solid;
}

.cluster-prompt-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.cluster-prompt-body { flex: 1; }

.cluster-prompt-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.cluster-prompt-meta {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 6px;
}

.cluster-prompt-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}


/* ── Deep Dive Inline (part of the card, not a separate box) ── */
.deep-dive-inline {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.deep-dive-inline-stats {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.deep-dive-inline-cta {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

/* ── Cluster Prompt Headline ── */
.cluster-prompt-headline {
  font-size: 13px;
  color: var(--text);
  font-style: italic;
  line-height: 1.4;
  margin-bottom: 4px;
}

/* ── Pull to Refresh ── */
.pull-refresh-indicator {
  text-align: center;
  padding: 12px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  transition: opacity 0.2s ease;
}

/* ── Systems Map ── */
.systems-container {
  width: 100%;
  height: calc(100vh - 120px);
  position: relative;
  overflow: hidden;
}

#systems-canvas {
  width: 100%;
  height: 100%;
  touch-action: none;
}

.systems-tooltip {
  display: none;
  position: absolute;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 100;
  min-width: 140px;
}

.tooltip-header {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.tooltip-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.tooltip-hint {
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
}

/* ── WIP Banner ── */
.wip-banner {
  text-align: center;
  padding: 8px 16px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
}

/* ── Deep Dive — Immersive Reading ── */
#view-dives {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.deepdive-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

.dd-header {
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.dd-back-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.dd-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin: 0 0 8px;
}

.dd-date {
  font-size: 13px;
  color: var(--text-muted);
}

.dd-version {
  font-size: 11px;
  color: var(--accent);
  margin-top: 4px;
}

.dd-section {
  margin-bottom: 36px;
}

.dd-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.dd-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
}

.dd-body p {
  margin: 0 0 16px;
}

.dd-body strong {
  color: var(--text);
  font-weight: 600;
}

/* Precedents */
.dd-precedent {
  padding: 16px;
  background: var(--card-bg);
  border-radius: 10px;
  margin-bottom: 12px;
  border-left: 3px solid var(--accent);
}

.dd-precedent-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.dd-precedent-match {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.dd-precedent-detail {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 6px;
}

/* Narrative cards */
.dd-narratives {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dd-narrative-card {
  padding: 12px;
  background: var(--card-bg);
  border-radius: 8px;
}

.dd-narrative-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.dd-narrative-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
}

.dd-narrative-tone {
  font-size: 10px;
  font-weight: 600;
}
.dd-narrative-tone.positive { color: #43A047; }
.dd-narrative-tone.negative { color: #E53935; }
.dd-narrative-tone.neutral { color: var(--text-muted); }

.dd-narrative-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.dd-narrative-source {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Contrarian */
.dd-contrarian {
  background: rgba(229, 57, 53, 0.04);
  border-left: 3px solid #E53935;
  padding: 20px;
  border-radius: 0 10px 10px 0;
}

/* Quiet signal */
.dd-quiet {
  background: rgba(10, 126, 140, 0.04);
  border-left: 3px solid var(--accent);
  padding: 20px;
  border-radius: 0 10px 10px 0;
}

/* Connections */
.dd-connections {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dd-connection {
  padding: 8px 12px;
  background: var(--card-bg);
  border-radius: 8px;
  flex-basis: calc(50% - 4px);
}

.dd-connection-type {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 2px;
}

.dd-connection-name {
  font-size: 13px;
  color: var(--text);
}

.dd-connection-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Sources */
.dd-source-list {
  padding-left: 20px;
}

.dd-source-item {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.dd-source-item a {
  color: var(--accent);
  text-decoration: none;
}

.dd-source-lang {
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg);
  padding: 1px 6px;
  border-radius: 4px;
}

/* Footer */
.dd-footer {
  padding: 24px 0;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.dd-back-btn {
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

/* Empty state */
.dd-empty {
  text-align: center;
  padding: 80px 20px;
}

.dd-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.dd-empty-text {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.dd-back {
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

/* ── Deep Dive Card Link ── */
.dd-card-link {
  margin-top: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  cursor: pointer;
}

.dd-card-link-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

/* ── Dives Listing ── */
.dives-list-header {
  padding: 24px 16px 16px;
}
.dives-list-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}
.dives-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.dives-list {
  padding: 0 16px;
}

.dives-list-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.dives-list-item:active {
  opacity: 0.7;
}

.dives-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 4px;
}

.dives-item-preview {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 6px;
}

.dives-item-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Tiered Dives Listing ── */
.dives-section {
  padding: 16px;
  margin-bottom: 8px;
}

.dives-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.dives-section-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.dives-section-empty {
  font-size: 13px;
  color: var(--text-muted);
  padding: 20px 0;
  font-style: italic;
}

/* Dive cards (active + reports) */
.dive-card {
  padding: 16px;
  background: var(--card-bg);
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.dive-card:active { transform: scale(0.98); }

.dive-card.active {
  border-left: 3px solid var(--accent);
}

.dive-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 6px;
}

.dive-card-preview {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.dive-card-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
}

/* Knowledge Library categories */
.library-category {
  border-bottom: 1px solid var(--border);
}

.library-category-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.library-count {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 10px;
}

.library-items {
  display: none;
  padding: 0 0 12px;
}

.library-category.expanded .library-items {
  display: block;
}

.library-item {
  padding: 8px 0;
  font-size: 14px;
  color: var(--accent);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.library-item:last-child { border-bottom: none; }
.library-item:active { opacity: 0.7; }


/* ── Theme Toggle in Header ── */
#theme-toggle {
  position: static !important;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 18px;
  padding: 6px 10px;
  cursor: pointer;
  margin-left: auto;
}

.top-bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
}


/* ── PWA Safe Area — push below status bar ── */
.top-bar {
  padding-top: env(safe-area-inset-top, 44px) !important;
}

.top-bar-header {
  padding-top: 8px !important;
}

/* ── Archive ── */
.archive-container { padding: 0 0 80px; }

.archive-header {
  padding: 24px 16px 16px;
}
.archive-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}
.archive-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.archive-section {
  padding: 0 16px;
  margin-bottom: 24px;
}

.archive-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.archive-letter {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.archive-letter:active { opacity: 0.7; }
.archive-letter-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.archive-letter-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.archive-day {
  border-bottom: 1px solid var(--border);
}

.archive-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  cursor: pointer;
}

.archive-day-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.archive-day-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.archive-day-cards {
  display: none;
  padding: 0 0 12px;
}

.archive-day.expanded .archive-day-cards {
  display: block;
}

.archive-card-item {
  font-size: 13px;
  color: var(--text);
  padding: 6px 0;
  line-height: 1.4;
  border-bottom: 1px solid var(--border);
}
.archive-card-item:last-child { border-bottom: none; }

/* Language groups */
.lang-group {
  margin-bottom: 16px;
}
.lang-group-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.lang-source {
  font-size: 13px;
  color: var(--text);
  padding: 4px 0;
}

/* Gaps */
.actors-gaps {
  background: rgba(229, 57, 53, 0.04);
  border-radius: 10px;
  padding: 16px !important;
}
.actors-gap-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.actors-gap-item {
  font-size: 13px;
  color: #E53935;
  padding: 4px 0;
}

/* ── 6-item nav ── */
.nav-item {
  font-size: 10px !important;
  padding: 6px 2px !important;
}
.nav-icon {
  font-size: 16px !important;
}

/* ── Actors (Photo-Centric) ── */
.actors-container { padding: 0 0 80px; }

.shaping-section {
  padding: 24px 16px;
  background: linear-gradient(180deg, var(--card-bg), var(--bg));
}

.shaping-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.shaping-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.shaping-grid::-webkit-scrollbar { display: none; }

.shaping-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
  cursor: pointer;
}

.shaping-card .actor-photo {
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
}

.shaping-card .actor-initials {
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shaping-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-top: 6px;
  text-align: center;
}

.shaping-count {
  font-size: 10px;
  color: var(--accent);
}

.shaping-empty {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

/* Watch list */
.watch-list { padding: 0; }

.watch-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.watch-item .actor-photo {
  border-radius: 50%;
  object-fit: cover;
}

.watch-item .actor-initials {
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.watch-info { flex: 1; }
.watch-name { font-size: 14px; font-weight: 600; color: var(--text); }
.watch-role { font-size: 12px; color: var(--text-muted); }

/* Roster */
.roster-grid { }

.roster-card {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.roster-photo-wrap { flex-shrink: 0; }

.roster-card .actor-photo {
  border-radius: 50%;
  object-fit: cover;
}

.roster-card .actor-initials {
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.roster-info { flex: 1; }
.roster-name { font-size: 15px; font-weight: 600; color: var(--text); }
.roster-role { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.roster-domains {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.roster-domain {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg);
  color: var(--text-muted);
}

.roster-mentions {
  font-size: 11px;
  color: var(--accent);
  margin-top: 4px;
}

.actors-section {
  padding: 16px;
  margin-bottom: 8px;
}

.actors-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.actors-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

.actors-gaps {
  background: rgba(229, 57, 53, 0.04);
  border-radius: 10px;
  margin: 0 16px;
  padding: 16px !important;
}
.actors-gap-text { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.actors-gap-item { font-size: 13px; color: #E53935; padding: 4px 0; text-transform: capitalize; }

/* ── Roster card expand ── */
.roster-recent-cards {
  display: none;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.roster-card.expanded .roster-recent-cards {
  display: block;
}
.roster-recent-item {
  font-size: 12px;
  color: var(--text);
  padding: 4px 0;
  line-height: 1.4;
}

.roster-dives {
  display: none;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.roster-card.expanded .roster-dives { display: block; }
.roster-dives-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
}
.roster-dive-link {
  font-size: 13px;
  color: var(--accent);
  padding: 4px 0;
  cursor: pointer;
  text-transform: capitalize;
}

/* ── Actor Profile in Deep Dive ── */
.dd-actor-photo {
  text-align: center;
  margin-bottom: 16px;
}
.dd-actor-photo img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
}
.dd-actor-role {
  text-align: center;
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

/* ── Deep Dive Rich Format ── */
.dd-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  font-style: italic;
  padding: 0 16px 8px;
}
.dd-verdict {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  padding: 12px 16px;
  margin: 0 16px 16px;
  border-left: 3px solid var(--accent);
  background: rgba(37, 99, 235, 0.04);
  border-radius: 0 8px 8px 0;
  line-height: 1.5;
}

/* ── Map (Network View) ── */
.map-legend {
  display: flex;
  gap: 12px;
  padding: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}
.map-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: capitalize;
}
.map-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.map-clusters { padding: 0 0 80px; }

.map-cluster {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.map-cluster-label {
  font-size: 14px;
  font-weight: 700;
  text-transform: capitalize;
  margin-bottom: 12px;
}
.map-cluster-count {
  font-weight: 400;
  font-size: 12px;
  opacity: 0.6;
}
.map-cluster-nodes {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.map-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  border-radius: 12px;
  padding: 8px;
  border: 2px solid transparent;
  transition: background 0.2s;
}
.map-node:active { background: var(--bg); }

.map-node-small .map-node-photo,
.map-node-small .map-node-initials { width: 36px; height: 36px; font-size: 12px; }
.map-node-medium .map-node-photo,
.map-node-medium .map-node-initials { width: 44px; height: 44px; font-size: 14px; }
.map-node-large .map-node-photo,
.map-node-large .map-node-initials { width: 52px; height: 52px; font-size: 16px; }

.map-node-photo {
  border-radius: 50%;
  object-fit: cover;
}
.map-node-initials {
  border-radius: 50%;
  color: white;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-node-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  margin-top: 4px;
  text-align: center;
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-node-conn {
  font-size: 9px;
  color: var(--text-muted);
}

.map-section {
  padding: 16px;
}
.map-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.map-edges { }
.map-edge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.map-edge-names {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  min-width: 120px;
  flex-shrink: 0;
}
.map-edge-bar-bg {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.map-edge-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}
.map-edge-count {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Systems Map ── */
.sysmap-header {
  padding: 20px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.sysmap-title { font-size: 20px; font-weight: 700; color: var(--text); }
.sysmap-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.sysmap-section { padding: 16px; }
.sysmap-section-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.sysmap-count { font-weight: 400; font-size: 12px; color: var(--text-muted); }

.sysmap-chain {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--card-bg);
  cursor: pointer;
  transition: transform 0.15s;
}
.sysmap-chain:active { transform: scale(0.98); }

.sysmap-chain-accent {
  width: 4px;
  flex-shrink: 0;
}

.sysmap-chain-body {
  padding: 12px 14px;
  flex: 1;
}

.sysmap-chain-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.sysmap-chain-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 4px;
}

.sysmap-chain-verdict {
  font-size: 13px;
  color: var(--text);
  margin-top: 8px;
  line-height: 1.4;
}

.sysmap-chain-tags {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.sysmap-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.sysmap-signal-count {
  font-size: 10px;
  color: var(--text-muted);
}

.sysmap-chain-badges {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.sysmap-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg);
  color: var(--text-muted);
}

/* Stress signals */
.sysmap-stress-note { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.sysmap-stress-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}
.sysmap-stress-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.sysmap-stress-text { font-size: 13px; color: var(--text); }

/* Domain activity */
.sysmap-domains { }
.sysmap-domain-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.sysmap-domain-name {
  font-size: 12px;
  font-weight: 600;
  min-width: 100px;
  text-transform: capitalize;
}
.sysmap-domain-bar-bg {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.sysmap-domain-bar {
  height: 100%;
  border-radius: 2px;
}
.sysmap-domain-count {
  font-size: 11px;
  color: var(--text-muted);
  min-width: 20px;
  text-align: right;
}

/* Systems Map — semantic position graph */
.sysmap-graph-wrap {
  width: 100%;
  padding: 0;
  overflow: hidden;
}
.smap-active-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 4px 16px 4px;
  text-transform: uppercase;
}
.smap-status-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 12px;
}
.smap-status-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255,255,255,0.03);
  transition: background 0.15s;
}
.smap-status-chip:active { background: rgba(255,255,255,0.07); }
.sysmap-key {
  padding: 8px 16px 20px;
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  line-height: 1.6;
}
.smap-key-item { display: flex; align-items: center; }

/* Actors tabs */
.actors-tabs {
  display: flex;
  gap: 0;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
}
.actors-tab {
  flex: 1;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  text-align: center;
}
.actors-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Actors — Activity Grouped ── */
.actors-filters {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
}
.actors-filters::-webkit-scrollbar { display: none; }

.actors-filter-chip {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 16px;
  border: 1px solid;
  background: none;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
  text-transform: capitalize;
}
.actors-filter-chip.active { color: white !important; }
.actors-filter-clear {
  border-color: var(--text-muted) !important;
  color: var(--text-muted) !important;
}
.actors-filter-count { font-weight: 400; opacity: 0.7; }

.actors-group { padding: 16px; }
.actors-group-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.actors-group-count { font-weight: 400; font-size: 12px; color: var(--text-muted); }

.actors-hero-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.actors-hero-grid::-webkit-scrollbar { display: none; }

.actors-hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  cursor: pointer;
}
.actors-hero-card .actor-photo { border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
.actors-hero-card .actor-initials { border-radius: 50%; background: var(--accent); color: white; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.actors-hero-name { font-size: 12px; font-weight: 600; color: var(--text); margin-top: 6px; text-align: center; }
.actors-hero-signals { font-size: 10px; color: var(--accent); }
.actors-hero-domains { display: flex; gap: 4px; margin-top: 2px; flex-wrap: wrap; justify-content: center; }

.actors-domain-tag { font-size: 9px; font-weight: 600; text-transform: uppercase; }

.actors-list { }
.actors-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.actors-row .actor-photo { border-radius: 50%; object-fit: cover; }
.actors-row .actor-initials { border-radius: 50%; background: var(--accent); color: white; font-weight: 600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.actors-row-info { flex: 1; min-width: 0; }
.actors-row-name { font-size: 14px; font-weight: 600; color: var(--text); }
.actors-row-role { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actors-row-domains { display: flex; gap: 4px; margin-top: 2px; flex-wrap: wrap; }
.actors-row-count { font-size: 14px; font-weight: 700; color: var(--accent); flex-shrink: 0; }

.archive-card-item[onclick] { cursor: pointer; }
.archive-card-item[onclick]:active { opacity: 0.7; }
.archive-dive-arrow { color: var(--accent); font-size: 12px; }

/* ── Deep Dive Button ── */
.dd-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: white;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.dd-card-btn:active { opacity: 0.8; }
.dd-card-btn-sm {
  padding: 4px 10px;
  font-size: 11px;
  margin-top: 4px;
}

/* Override button to pill */
.dd-card-btn {
  padding: 5px 14px !important;
  border-radius: 20px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  background: var(--accent) !important;
}
.dd-card-btn-sm {
  padding: 3px 10px !important;
  font-size: 10px !important;
  border-radius: 16px !important;
}

/* ── Deep Dive Pill — refined ── */
.dd-card-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin-top: 10px !important;
  padding: 6px 14px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: var(--accent) !important;
  background: transparent !important;
  border: 1.5px solid var(--accent) !important;
  border-radius: 20px !important;
  cursor: pointer !important;
  transition: all 0.15s !important;
  letter-spacing: 0.02em !important;
}
.dd-card-btn:active {
  background: var(--accent) !important;
  color: white !important;
}
.dd-card-btn-sm {
  padding: 3px 10px !important;
  font-size: 10px !important;
  margin-top: 6px !important;
}

/* ── Triggering Card in Deep Dive ── */
.dd-trigger {
  margin: 0 16px 16px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 8px;
  border-left: 3px solid var(--text-muted);
}
.dd-trigger-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.dd-trigger-card {
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
}
.dd-trigger-signal { font-size: 12px; }
.dd-trigger-headline { font-weight: 500; }

/* ── Map Node Bottom Sheet ── */
.map-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 900;
  opacity: 0;
  transition: opacity 200ms ease;
}
.map-sheet-overlay.visible { opacity: 1; }

.map-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 901;
  background: var(--bg-card);
  border-radius: 20px 20px 0 0;
  padding: 12px 20px 32px;
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 320ms cubic-bezier(0.32, 0.72, 0, 1);
  -webkit-overflow-scrolling: touch;
  will-change: transform;
}
.map-sheet.visible { transform: translateY(0); }

.map-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 20px;
}

.map-sheet-domain {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.map-sheet-emoji {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}

.map-sheet-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}

.map-sheet-direction {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 10px;
  background: rgba(0,0,0,0.06);
  white-space: nowrap;
}

.map-sheet-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  margin-top: 4px;
}

.map-sheet-section {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.map-sheet-section::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.map-sheet-question {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.4;
}

.map-sheet-bar-bg {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.map-sheet-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 400ms ease;
}

.map-sheet-pct {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.map-sheet-signals {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.map-sheet-signal-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  background: var(--pill-bg);
}
.map-sheet-signal-pill.now   { background: rgba(229,57,53,0.12);  color: #E53935; }
.map-sheet-signal-pill.watch { background: rgba(255,143,0,0.12);  color: #FF8F00; }
.map-sheet-signal-pill.context { background: rgba(30,136,229,0.12); color: #1E88E5; }

.map-sheet-btn {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.15s;
  margin-top: 4px;
}
.map-sheet-btn:active { opacity: 0.8; }

/* ── Card Detail Bottom Sheet ── */
.card-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 900;
  opacity: 0;
  transition: opacity 200ms ease;
}
.card-sheet-overlay.visible { opacity: 1; }

.card-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 901;
  background: var(--bg-card);
  border-radius: 20px 20px 0 0;
  max-height: 88vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 340ms cubic-bezier(0.32, 0.72, 0, 1);
  -webkit-overflow-scrolling: touch;
  will-change: transform;
  padding-bottom: 32px;
}
.card-sheet.visible { transform: translateY(0); }

.card-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px auto 0;
}

/* Image header */
.card-sheet-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  object-position: center;
  display: block;
  margin-top: 0;
}

.card-sheet-image-wrap {
  position: relative;
  height: 160px;
  overflow: hidden;
  margin-top: 0;
}

.card-sheet-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.card-sheet-image-fallback {
  width: 100%;
  height: 160px;
}

.card-sheet-image-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, #0D1521 100%);
  pointer-events: none;
}

/* Body padding */
.card-sheet-body {
  padding: 16px 20px 0;
}

/* Meta row */
.card-sheet-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.card-sheet-signal {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 10px;
}
.card-sheet-signal.now     { background: rgba(229,57,53,0.12);  color: #E53935; }
.card-sheet-signal.watch   { background: rgba(255,143,0,0.12);  color: #FF9800; }
.card-sheet-signal.context { background: rgba(96,125,139,0.12); color: #607D8B; }

.card-sheet-domain-tag {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

.card-sheet-time {
  font-size: 11px;
  color: var(--text-faint);
  margin-left: auto;
}

/* Headline */
.card-sheet-headline {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Analysis */
.card-sheet-analysis {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.card-sheet-analysis p {
  margin-bottom: 10px;
}
.card-sheet-analysis p:last-child {
  margin-bottom: 0;
}

/* Watch For block */
.card-sheet-watch {
  border-left: 3px solid var(--card-accent, var(--accent));
  background: rgba(10,126,140,0.06);
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  margin-bottom: 20px;
}

.card-sheet-watch-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 5px;
}

.card-sheet-watch-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

/* Collapsible sections */
.card-sheet-collapsible {
  border-top: 1px solid var(--border);
  margin-top: 0;
}

.card-sheet-collapsible:last-of-type {
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.card-sheet-collapsible-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 0;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.card-sheet-collapsible-chevron {
  font-size: 11px;
  color: var(--text-faint);
  transition: transform 250ms ease;
  display: inline-block;
  flex-shrink: 0;
}
.card-sheet-collapsible.open .card-sheet-collapsible-chevron {
  transform: rotate(90deg);
}

.card-sheet-collapsible-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.card-sheet-collapsible-count {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 8px;
  background: var(--pill-bg);
  color: var(--text-faint);
}

.card-sheet-collapsible-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 250ms ease;
}
.card-sheet-collapsible.open .card-sheet-collapsible-body {
  max-height: 500px;
}

.card-sheet-collapsible-inner {
  padding-bottom: 14px;
}

/* Source items */
.card-sheet-source-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.card-sheet-source-item:last-child { border-bottom: none; }

.card-sheet-source-lang {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--pill-bg);
  color: var(--text-faint);
  flex-shrink: 0;
  letter-spacing: 0.04em;
}

.card-sheet-source-item a {
  color: var(--accent);
  text-decoration: none;
}
.card-sheet-source-item a:hover { text-decoration: underline; }

/* Narrative divergence grid */
.card-sheet-narrative-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.card-sheet-narrative-item {
  background: var(--pill-bg);
  border-radius: 8px;
  padding: 8px 10px;
}

.card-sheet-perspective {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 4px;
}

.card-sheet-narrative-text {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
}

.card-sheet-divergence {
  font-size: 12px;
  font-weight: 600;
  color: var(--signal-now);
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* Precedents */
.card-sheet-precedent-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.card-sheet-precedent-item:last-child { border-bottom: none; }

.card-sheet-precedent-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 3px;
}

.card-sheet-precedent-meta {
  font-size: 11px;
  color: var(--text-faint);
}

.card-sheet-precedent-diff {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  font-style: italic;
}

/* Deep Dive CTA */
.card-sheet-dive-btn {
  display: block;
  width: calc(100% - 40px);
  margin: 4px 20px 0;
  padding: 0 20px;
  height: 48px;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  background: var(--card-accent, var(--accent));
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  line-height: 48px;
  transition: opacity 0.15s;
  letter-spacing: 0.01em;
}
.card-sheet-dive-btn:active { opacity: 0.8; }

/* ── Actor Intelligence Sheet ── v=20260418m */

/* Overlay (reused pattern from card sheet) */
#actor-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 900;
  opacity: 0;
  transition: opacity 200ms ease;
  display: none;
}
#actor-sheet-overlay.visible { opacity: 1; }

/* Sheet container */
.actor-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 901;
  background: var(--bg-card);
  border-radius: 20px 20px 0 0;
  max-height: 88vh;
  max-height: 88dvh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 340ms cubic-bezier(0.32, 0.72, 0, 1);
  -webkit-overflow-scrolling: touch;
  will-change: transform;
  padding-bottom: 40px;
}
.actor-sheet.visible { transform: translateY(0); }

/* Drag handle */
.actor-sheet .sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px auto 0;
  cursor: pointer;
}

/* Photo header — 180px tall, image fills, gradient overlay */
.actor-sheet-photo {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: var(--scoreboard-bg);
  margin-top: 8px;
}
.actor-sheet-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.actor-sheet-photo-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0%, #0d6e7c 100%);
}
.actor-sheet-initials-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  background: linear-gradient(135deg, var(--accent) 0%, #0d6e7c 100%);
}
.actor-sheet-initials-large {
  font-size: 64px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  z-index: 2;
}

/* Dark gradient over photo bottom */
.actor-sheet-photo-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 100%);
  pointer-events: none;
}

/* Name + role overlay on photo */
.actor-sheet-photo-meta {
  position: absolute;
  bottom: 12px;
  left: 16px;
  right: 16px;
  z-index: 2;
}
.actor-sheet-name {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.actor-sheet-flag {
  font-size: 18px;
  line-height: 1;
}
.actor-sheet-role {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.actor-sheet-domain-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid currentColor;
  background: rgba(255,255,255,0.1);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Sheet body */
.actor-sheet-body {
  padding: 16px 20px 0;
}

/* Intel block */
.actor-intel {
  margin-bottom: 4px;
}
.actor-intel-no-signals {
  margin-bottom: 8px;
}
.actor-intel-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-top: 14px;
  margin-bottom: 4px;
}
.actor-intel-label:first-child {
  margin-top: 0;
}
.actor-intel-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}
.actor-intel-watch {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

/* Divider */
.actor-sheet-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* Collapsible sections */
.actor-collapsible {
  margin-bottom: 4px;
}
.actor-collapsible:last-of-type {
  margin-bottom: 0;
}
.actor-collapsible-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.actor-collapsible-chevron {
  font-size: 9px;
  color: var(--text-faint);
  transition: transform 200ms ease;
  flex-shrink: 0;
}
.actor-collapsible.open .actor-collapsible-chevron {
  transform: rotate(90deg);
}
.actor-collapsible-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  flex: 1;
}
.actor-collapsible-count {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: 10px;
  padding: 1px 7px;
  min-width: 20px;
  text-align: center;
}
.actor-collapsible-body {
  display: none;
  overflow: hidden;
}
.actor-collapsible.open .actor-collapsible-body {
  display: block;
}
.actor-collapsible-inner {
  padding-bottom: 8px;
}
.actor-collapsible-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Signal mini-cards */
.actor-signal-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.actor-signal-card:last-child {
  border-bottom: none;
}
.actor-signal-card:active {
  opacity: 0.7;
}
.actor-signal-domain {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid currentColor;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 1px;
}
.actor-signal-headline {
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
}
