:root {
  --bg: #F8FAFC;
  --fg: #0B1220;
  --primary: #1e3a5f;
  --primary-fg: #FFFFFF;
  --muted: #64748B;
  --border: rgba(15, 23, 42, 0.12);
  --card: #FFFFFF;
}

body {
  background-color: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.bg-background { background-color: var(--bg); }
.bg-card { background-color: var(--card); }
.bg-primary { background-color: var(--primary); }
.text-foreground { color: var(--fg); }
.text-muted { color: var(--muted); }
.text-primary { color: var(--primary); }
.border-border { border-color: var(--border); }

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-fg);
  padding: 0.5rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: background-color 0.2s;
}
.btn-primary:hover {
  opacity: 0.9;
}

.input-field {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.5rem 0.875rem;
  background-color: var(--card);
}
.input-field:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--fg);
}

.badge {
  border-radius: 9999px;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.tab-active {
  border-bottom-color: var(--primary);
  color: var(--primary);
}
.tab-inactive {
  border-bottom-color: transparent;
  color: var(--muted);
}
.tab-inactive:hover {
  color: var(--fg);
}

/* Investor materials: modern tables, cards, badges */
.investor-page-header {
  background-color: var(--primary);
  color: var(--primary-fg);
  padding: 2rem 1.5rem;
  margin-top: 80px;
}
.investor-page-header-content {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.investor-back-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.2s;
}
.investor-back-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}
.investor-container {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}
.investor-memo-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem 2.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  margin-bottom: 2rem;
}
.investor-memo-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 0.5rem 0;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}
.investor-memo-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 2rem 0;
}
.investor h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--fg);
  margin: 2rem 0 1rem 0;
  padding-left: 1rem;
  border-left: 4px solid var(--primary);
}
.investor h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  margin: 1.5rem 0 0.75rem 0;
}
.investor p {
  color: var(--fg);
  line-height: 1.75;
  margin: 0 0 1rem 0;
}
.investor ul, .investor ol {
  color: var(--fg);
  line-height: 1.75;
  margin: 0 0 1rem 0;
}
.investor-highlight-box {
  background: color-mix(in srgb, var(--primary) 6%, transparent);
  border-left: 4px solid var(--primary);
  padding: 1.25rem 1.5rem;
  border-radius: 0.5rem;
  margin: 1.5rem 0;
}
.investor-highlight-box-warning {
  background: color-mix(in srgb, #f59e0b 8%, transparent);
  border-left-color: #f59e0b;
}
.investor-highlight-box-orange {
  background: color-mix(in srgb, #ea580c 6%, transparent);
  border-left-color: #ea580c;
}
.investor-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}
.investor-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1.25rem;
  border-radius: 0.5rem;
  text-align: center;
}
.investor-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--fg);
  margin: 0.25rem 0;
  font-variant-numeric: tabular-nums;
}
.investor-stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.investor-cta-box {
  background: var(--primary);
  color: var(--primary-fg);
  padding: 2rem;
  border-radius: 1rem;
  margin: 2rem 0;
  text-align: center;
}
.investor-cta-button {
  display: inline-block;
  background: white;
  color: var(--primary);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  margin-top: 1rem;
  transition: background 0.2s, transform 0.15s;
}
.investor-cta-button:hover {
  background: color-mix(in srgb, white 90%, var(--primary));
  transform: translateY(-1px);
}
.investor-cta-button-outline {
  background: transparent;
  color: white;
  border: 2px solid white;
}
.investor-cta-button-outline:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Modern table */
.investor-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--card);
}
.investor-table {
  width: 100%;
  min-width: 640px;
  border-collapse: separate;
  border-spacing: 0;
}
.investor-table th {
  background: color-mix(in srgb, var(--muted) 12%, transparent);
  color: var(--fg);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}
.investor-table th:first-child {
  border-top-left-radius: 0.75rem;
}
.investor-table th:last-child {
  border-top-right-radius: 0.75rem;
}
.investor-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.investor-table td:last-child,
.investor-table th:last-child {
  text-align: right;
}
.investor-table td:nth-child(3),
.investor-table td:nth-child(4),
.investor-table td:nth-child(5),
.investor-table td:nth-child(6),
.investor-table th:nth-child(3),
.investor-table th:nth-child(4),
.investor-table th:nth-child(5),
.investor-table th:nth-child(6) {
  text-align: right;
}
.investor-table tbody tr:hover {
  background: color-mix(in srgb, var(--primary) 4%, transparent);
}
.investor-table .investor-table-total {
  background: color-mix(in srgb, #059669 10%, transparent);
  font-weight: 600;
  border-top: 2px solid #059669;
}
.investor-table .investor-table-total td {
  border-bottom: none;
  padding: 0.875rem 1rem;
}
.investor-table .investor-table-total-phase2 {
  background: color-mix(in srgb, #ea580c 8%, transparent);
  border-top: 2px solid #ea580c;
}
.investor-table .investor-table-total-phase2 td {
  border-bottom: none;
}
.investor-table-num {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.investor-table-footer {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.75rem;
  padding: 0 0.25rem;
}
.investor-table-footer a {
  color: var(--primary);
  text-decoration: none;
}
.investor-table-footer a:hover {
  text-decoration: underline;
}

/* Badges */
.investor-badge {
  display: inline-block;
  border-radius: 9999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 500;
  margin-left: 0.5rem;
}
.investor-badge-pilot {
  background: #059669;
  color: white;
}
.investor-badge-phase1 {
  background: var(--primary);
  color: white;
}
.investor-badge-phase2 {
  background: #ea580c;
  color: white;
}

@media (max-width: 768px) {
  .investor-page-header { padding: 1.5rem 1rem; }
  .investor-container { padding: 0 1rem; }
  .investor-memo-card { padding: 1.5rem; }
  .investor-memo-title { font-size: 1.5rem; }
  .investor h2 { font-size: 1.25rem; }
  .investor-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .investor-stats-grid { grid-template-columns: 1fr; }
}
.risk-level {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-weight: 600;
  font-size: 0.85rem;
}
.risk-low {
  background: color-mix(in srgb, #059669 15%, transparent);
  color: #047857;
}
.risk-medium {
  background: color-mix(in srgb, #f59e0b 15%, transparent);
  color: #b45309;
}
.status-badge {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.35rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

@media print {
  .investor-back-btn { display: none; }
  .investor-memo-card { box-shadow: none; border: 1px solid #ddd; }
}
