/* ============================================
   IDA INVESTIGATION REPORT — BASE DESIGN SYSTEM
   Reusable components for all Ida reports
   ============================================ */

/* --- Reset & Variables --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #08080d;
  --bg-alt: #0c0c14;
  --bg-card: #111119;
  --bg-elevated: #181822;
  --text: #e8e4dc;
  --text-dim: #a09b8f;
  --text-muted: #5e5a52;
  --red: #c41e3a;
  --red-glow: rgba(196,30,58,0.25);
  --gold: #d4a017;
  --gold-glow: rgba(212,160,23,0.2);
  --blue: #4a7c9b;
  --blue-glow: rgba(74,124,155,0.2);
  --purple: #8b45a6;
  --orange: #e67e22;
  --green: #2d8659;
  --border: rgba(232,228,220,0.07);
  --border-bright: rgba(232,228,220,0.14);
  --serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --sans: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --max-width: 900px;
  --wide-width: 1100px;
}
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.72;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--red); color: #fff; }

/* --- Vignette overlay --- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0,0,0,0.5) 100%);
  pointer-events: none;
  z-index: 9999;
}

/* --- Typography --- */
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
p { margin-bottom: 1.2em; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: var(--mono); }
.red { color: var(--red); }
.gold { color: var(--gold); }
.blue { color: var(--blue); }
.dim { color: var(--text-dim); }
.muted { color: var(--text-muted); }
.small { font-size: 0.85em; }
.uppercase { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75em; }

/* --- Progress Bar --- */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--gold);
  z-index: 10001;
  width: 0;
  transition: width 80ms linear;
}

/* --- Chapter Navigation Dots --- */
.act-nav {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 1000;
}
.act-nav a {
  display: block;
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1px solid var(--text-muted);
  background: transparent;
  transition: all 0.3s;
  text-decoration: none;
}
.act-nav a.active {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 8px var(--gold-glow);
}
.act-nav a:hover { border-color: var(--text-dim); }

/* --- Layout --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: var(--wide-width); margin: 0 auto; padding: 0 24px; }
.chapter { padding: 100px 0 80px; border-bottom: 1px solid var(--border); }
.chapter:last-of-type { border-bottom: none; }

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 60px 24px;
  position: relative;
}
.hero-label {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72em;
  color: var(--gold);
  margin-bottom: 24px;
}
.hero h1 { margin-bottom: 20px; }
.hero-subtitle {
  font-family: var(--serif);
  font-style: italic;
  color: var(--text-dim);
  font-size: 1.15em;
  max-width: 700px;
  margin: 0 auto 48px;
  line-height: 1.6;
}

/* --- Hero Stats Row --- */
.stats-row {
  display: flex;
  gap: 48px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 48px 0;
}
.stat {
  text-align: center;
}
.stat-value {
  font-family: var(--mono);
  font-size: 2.4em;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  display: block;
}
.stat-label {
  font-size: 0.78em;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 6px;
  display: block;
}

/* --- Chapter Headers --- */
.chapter-label {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.72em;
  color: var(--red);
  margin-bottom: 12px;
  font-family: var(--mono);
}
.chapter-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 16px;
}
.chapter-opener {
  font-family: var(--serif);
  font-style: italic;
  color: var(--text-dim);
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 700px;
}

/* --- Evidence Box --- */
.evidence-box {
  background: var(--bg-card);
  border-left: 3px solid var(--gold);
  padding: 24px 28px;
  margin: 32px 0;
  border-radius: 0 4px 4px 0;
}
.evidence-box.red-border { border-left-color: var(--red); }
.evidence-box.blue-border { border-left-color: var(--blue); }
.evidence-box-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.7em;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-family: var(--mono);
}
.evidence-box blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05em;
  line-height: 1.65;
  color: var(--text);
}
.evidence-box .source {
  margin-top: 12px;
  font-size: 0.8em;
  color: var(--text-muted);
  font-family: var(--mono);
}

/* --- Pull Quote --- */
.pull-quote {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-style: italic;
  color: var(--text);
  text-align: center;
  padding: 48px 24px;
  margin: 48px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
}
.pull-quote .attribution {
  display: block;
  font-size: 0.55em;
  font-style: normal;
  color: var(--text-muted);
  margin-top: 16px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- Data Tables --- */
.data-table-wrapper {
  overflow-x: auto;
  margin: 32px 0;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88em;
}
.data-table thead {
  background: var(--bg-elevated);
  position: sticky;
  top: 0;
}
.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-bright);
  white-space: nowrap;
}
.data-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.data-table tbody tr:hover { background: rgba(212,160,23,0.03); }
.data-table .highlight { color: var(--gold); font-weight: 600; }
.data-table .tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.8em;
  font-family: var(--mono);
  background: rgba(74,124,155,0.15);
  color: var(--blue);
}
.data-table .tag-red { background: rgba(196,30,58,0.12); color: var(--red); }
.data-table .tag-gold { background: rgba(212,160,23,0.12); color: var(--gold); }
.data-table .tag-green { background: rgba(45,134,89,0.12); color: var(--green); }

/* --- Timeline --- */
.timeline {
  position: relative;
  padding-left: 40px;
  margin: 40px 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border-bright);
}
.timeline-event {
  position: relative;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.timeline-event:last-child { border-bottom: none; margin-bottom: 0; }
.timeline-event::before {
  content: '';
  position: absolute;
  left: -33px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  border: 2px solid var(--bg);
}
.timeline-event.major::before { background: var(--gold); box-shadow: 0 0 6px var(--gold-glow); }
.timeline-event.alert::before { background: var(--red); box-shadow: 0 0 6px var(--red-glow); }
.timeline-date {
  font-family: var(--mono);
  font-size: 0.78em;
  color: var(--gold);
  margin-bottom: 4px;
}
.timeline-title {
  font-weight: 600;
  margin-bottom: 4px;
}
.timeline-detail {
  font-size: 0.9em;
  color: var(--text-dim);
}
.timeline-engagement {
  font-family: var(--mono);
  font-size: 0.75em;
  color: var(--text-muted);
  margin-top: 6px;
}

/* --- Card Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 32px 0;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 24px;
  transition: border-color 0.3s;
}
.card:hover { border-color: var(--border-bright); }
.card-label {
  font-family: var(--mono);
  font-size: 0.7em;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.card-title {
  font-family: var(--serif);
  font-size: 1.15em;
  font-weight: 700;
  margin-bottom: 8px;
}
.card-body {
  font-size: 0.9em;
  color: var(--text-dim);
  line-height: 1.6;
}
.card-footer {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 0.75em;
  color: var(--text-muted);
}

/* --- Network / Co-authorship Table --- */
.coauth-table { margin: 32px 0; }
.coauth-edge {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9em;
}
.coauth-edge:last-child { border-bottom: none; }
.coauth-person {
  flex: 1;
  font-weight: 600;
}
.coauth-count {
  font-family: var(--mono);
  color: var(--gold);
  font-size: 1.4em;
  font-weight: 700;
  width: 40px;
  text-align: center;
}
.coauth-arrow {
  color: var(--text-muted);
  margin: 0 12px;
}

/* --- Silence Inventory (empty cells) --- */
.silence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 32px 0;
}
.silence-cell {
  background: var(--bg-card);
  border: 1px dashed var(--border-bright);
  border-radius: 4px;
  padding: 20px;
  text-align: center;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.silence-name {
  font-weight: 600;
  margin-bottom: 4px;
}
.silence-role {
  font-size: 0.8em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.silence-zero {
  font-family: var(--mono);
  font-size: 2em;
  color: var(--red);
  opacity: 0.5;
}

/* --- Footer --- */
.report-footer {
  padding: 60px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85em;
  border-top: 1px solid var(--border);
}
.report-footer .ida-sig {
  font-family: var(--mono);
  font-size: 0.75em;
  margin-top: 16px;
  color: var(--text-muted);
}

/* --- Fade-in Animation --- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .stats-row { gap: 24px; }
  .stat-value { font-size: 1.8em; }
  .act-nav { right: 10px; gap: 10px; }
  .act-nav a { width: 6px; height: 6px; }
  .timeline { padding-left: 30px; }
  .card-grid { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
}
@media (max-width: 480px) {
  body { font-size: 15px; }
  .hero { min-height: 80vh; }
  .chapter { padding: 60px 0 50px; }
}
