@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&family=Roboto:wght@400;600&display=swap');

:root {
  --color-bg: #ffffff; /* White background */
  --color-surface: #f5f5f5; /* Light gray surface */
  --color-border: #e0e0e0; /* Light border */
  --color-text: #333333; /* Dark text */
  --color-text-secondary: #666666; /* Secondary text */
  --color-hover: #f0f0f0; /* Light hover */
  --color-accent-yellow: #facc15; /* Investigative Yellow */
  --color-accent-red: #ef4444; /* Action Red */
  --color-funding: #22c55e; /* Green for funding_flows */
  --color-intermediaries: #3b82f6;
  --color-accountability: #f59e0b;
  --color-effectiveness: #10b981;
  --color-structural: #8b5cf6;
  --color-tax: #ef4444; /* Red for tax_shelter */
  --color-education: #06b6d4;
  --color-ecosystem: #f97316;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Inter', sans-serif; /* Clean sans-serif for interface */
  background: var(--color-bg);
  color: var(--color-text);
}

.container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* Header */
.header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.header h1 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--color-accent-yellow);
}

.header p {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.header-filters {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.header-filters select {
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 12px;
}

/* Main Layout */
.main {
  display: grid;
  grid-template-columns: 240px 1fr 320px;
  gap: 1px;
  flex: 1;
  overflow: hidden;
  background: var(--color-border);
}

/* Angles Panel */
.angles-panel {
  background: var(--color-surface);
  overflow-y: auto;
  padding: 20px;
  border-right: 1px solid var(--color-border);
}

.angles-panel h2 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: 15px;
  letter-spacing: 0.5px;
}

.angle-button {
  display: block;
  width: 100%;
  padding: 12px;
  margin-bottom: 8px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  font-size: 13px;
  text-align: left;
  transition: all 0.2s;
  border-left: 4px solid transparent;
}

.angle-button:hover {
  background: var(--color-hover);
}

.angle-button.active {
  background: var(--color-hover);
  font-weight: 600;
  border-left-color: currentColor;
}

.angle-button.funding_flows { --angle-color: var(--color-funding); }
.angle-button.intermediaries { --angle-color: var(--color-intermediaries); }
.angle-button.accountability { --angle-color: var(--color-accountability); }
.angle-button.effectiveness { --angle-color: var(--color-effectiveness); }
.angle-button.structural_issues { --angle-color: var(--color-structural); }
.angle-button.tax_shelter { --angle-color: var(--color-tax); }
.angle-button.education_pipeline { --angle-color: var(--color-education); }
.angle-button.ecosystem_overview { --angle-color: var(--color-ecosystem); }

.angle-button.active {
  border-left-color: var(--angle-color);
  color: var(--angle-color);
}

/* Sources Panel */
.sources-panel {
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--color-border);
  padding: 20px;
}

.sources-panel h2 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 15px;
}

.source-count {
  font-size: 12px;
  color: var(--color-text-secondary);
  font-weight: normal;
}

.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}

.filters input,
.filters select {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 12px;
  background: var(--color-bg);
  color: var(--color-text);
}

.filters input:focus,
.filters select:focus {
  outline: none;
  border-color: var(--color-accent-yellow);
}

.sources-list {
  flex: 1;
  overflow-y: auto;
}

.source-item {
  background: var(--color-surface);
  border-left: 4px solid var(--color-accent-yellow);
  padding: 1.5rem;
  margin-bottom: 8px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.source-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(250, 204, 21, 0.3); /* Light up with yellow glow */
}

.source-item.active {
  background: var(--color-hover);
  border-left-color: var(--color-accent-yellow);
}

.source-item-title {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
  line-height: 1.3;
}

.source-item-meta {
  font-size: 11px;
  color: var(--color-text-secondary);
}

.source-item-type {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--color-bg);
  margin-right: 6px;
}

/* Detail Panel */
.detail-panel {
  background: var(--color-surface);
  overflow-y: auto;
  padding: 20px;
}

.detail-content h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  margin-top: 15px;
}

.detail-content h3:first-child {
  margin-top: 0;
}

.detail-content p {
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 10px;
  color: var(--color-text-secondary);
  font-family: 'Georgia', serif; /* Serif for text content */
}

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 15px;
}

.detail-meta-item {
  font-size: 12px;
}

.detail-meta-label {
  font-weight: 600;
  color: var(--color-text);
}

.detail-meta-value {
  color: var(--color-text-secondary);
}

.detail-summary {
  font-size: 14px; /* Increased for better readability */
  line-height: 1.6;
  padding: 12px;
  background: var(--color-bg);
  border-radius: 4px;
  margin-bottom: 15px;
  font-family: 'Inter', sans-serif; /* Sans-serif for better readability */
}

.detail-angle-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 6px;
  margin-bottom: 6px;
  color: white;
}

.detail-angle-badge.funding_flows { background: var(--color-funding); }
.detail-angle-badge.intermediaries { background: var(--color-intermediaries); }
.detail-angle-badge.accountability { background: var(--color-accountability); }
.detail-angle-badge.effectiveness { background: var(--color-effectiveness); }
.detail-angle-badge.structural_issues { background: var(--color-structural); }
.detail-angle-badge.tax_shelter { background: var(--color-tax); }
.detail-angle-badge.education_pipeline { background: var(--color-education); }
.detail-angle-badge.ecosystem_overview { background: var(--color-ecosystem); }

.detail-link {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 12px;
  background: var(--color-accent-yellow);
  color: var(--color-bg);
  text-decoration: none;
  border-radius: 4px;
  font-size: 12px;
  transition: background 0.2s;
}

.detail-link:hover {
  background: #eab308;
}

.placeholder {
  text-align: center;
  color: var(--color-text-secondary);
  padding: 20px;
  font-size: 13px;
}

/* Claims List in Detail Panel */
.detail-claims {
  font-size: 14px; /* Increased for better readability */
  line-height: 1.6;
  padding: 12px;
  background: var(--color-bg);
  border-radius: 4px;
  margin-bottom: 15px;
  font-family: 'Inter', sans-serif; /* Sans-serif for better readability */
  list-style: none; /* Remove default bullets */
}

.detail-claims li {
  margin-bottom: 8px;
  padding-left: 10px; /* Space for bullet */
  position: relative;
}

.detail-claims li::before {
  content: '•'; /* Custom bullet */
  color: #000000; /* Black bullet */
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cccccc;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #999999;
}

/* Responsive */
@media (max-width: 1200px) {
  .main {
    grid-template-columns: 200px 1fr 280px;
  }
}

@media (max-width: 768px) {
  .main {
    grid-template-columns: 1fr;
  }
  
  .angles-panel,
  .detail-panel {
    display: none;
  }
  
  .header-filters {
    flex-direction: column;
  }
}
