* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: #1b1f23;
  background: #f8f9fb;
}

/* ── Scroll fade-in / fade-out ─────────────── */
.fade-section {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-section {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

a {
  color: #1f6feb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.site-header {
  background: #0b1220;
  color: #ffffff;
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-title {
  font-weight: 700;
  font-size: 20px;
}

.brand-subtitle {
  font-size: 13px;
  opacity: 0.75;
}

.nav a {
  margin-left: 12px;
  font-size: 14px;
  color: #c9d4f2;
}

.hero {
  background: #0f172a;
  color: #e2e8f0;
  padding: 56px 0;
}

.hero .container {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(300px, 1.15fr) minmax(260px, 1fr);
  align-items: center;
}

.hero h1 {
  margin-top: 0;
  font-size: 32px;
}

.hero-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.button {
  background: #1f6feb;
  color: white;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
}

.hero-card {
  background: #111827;
  border: 1px solid #23304a;
  border-radius: 12px;
  padding: 20px;
}

.card-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.metric {
  margin-top: 14px;
}

.metric-value {
  font-size: 28px;
  font-weight: 700;
}

.metric-label {
  font-size: 13px;
  color: #cbd5f5;
}

.note {
  margin-top: 16px;
  font-size: 12px;
  color: #94a3b8;
}

.section {
  padding: 48px 0;
  background: #f8f9fb;
}

.section:nth-of-type(even) {
  background: #ffffff;
}

.methods-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.methods-figure {
  max-width: 820px;
  margin: 0 auto;
}

.methods-figure img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.results-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 20px 0 28px;
}

.results-summary-item {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  padding: 16px 20px;
  text-align: center;
}

.results-summary-value {
  font-size: 26px;
  font-weight: 700;
  color: #1e40af;
}

.results-summary-label {
  font-size: 12px;
  color: #4b5563;
  margin-top: 4px;
  line-height: 1.4;
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin: 18px 0 24px;
  align-items: start;
}

.panel {
  background: #ffffff;
  border: 1px solid #e8ebef;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.panel-subtitle {
  color: #4b5563;
  margin-top: 0;
}

.table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th,
.table td {
  border-bottom: 1px solid #e5e7eb;
  padding: 6px 8px;
  text-align: left;
}

.table th {
  font-weight: 600;
  background: #f3f4f6;
}

.replay-card-container {
  margin-top: 8px;
}

.replay-cards {
  display: grid;
  gap: 16px;
  margin-top: 12px;
}

.replay-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px;
  background: #f9fafb;
}

.replay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.replay-header-left {
  display: flex;
  align-items: center;
}

.replay-dataset-select {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  font-size: 14px;
  font-weight: 600;
  background: #fff;
  min-width: 100px;
}

.replay-dataset-label {
  font-weight: 600;
}

.replay-play-btn {
  background: #1f6feb;
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.replay-play-btn:hover:not(:disabled) {
  background: #1a5fd4;
}

.replay-play-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.replay-rows {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 12px;
}

.method-row {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
}

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

.method-row .method-title {
  font-weight: 600;
  font-size: 13px;
}

.method-row .method-meta {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 0;
}

.method-output {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  background: #f3f4f6;
  padding: 8px;
  border-radius: 6px;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-height: 140px;
  overflow-y: auto;
}

.method-progress-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 8px;
}

.method-progress-area {
  flex: 1;
  min-width: 80px;
}

.method-progress-bar {
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
  width: 100%;
}

.method-progress-fill {
  height: 100%;
  width: 0%;
  background: #1f6feb;
  border-radius: 3px;
}

.method-draft-segments {
  display: flex;
  width: 100%;
  margin-top: 4px;
  gap: 1px;
}

.method-draft-segments-hidden {
  display: none;
}

.replay-playing .method-draft-segments-hidden {
  display: flex;
}

.method-draft-segments .draft-seg {
  flex: 1;
  min-width: 2px;
  min-height: 8px;
  background: #e5e7eb;
  border-radius: 2px;
  position: relative;
  overflow: visible;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.method-draft-segments .draft-seg.draft-seg-visible {
  opacity: 1;
}

.method-draft-segments .draft-seg:hover::after {
  content: "Draft " attr(data-draft) ": " attr(data-accepted) " accepted";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: #374151;
  background: #fff;
  border: 1px solid #e5e7eb;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  margin-bottom: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  z-index: 1;
}

.method-progress-stats {
  font-size: 11px;
  color: #6b7280;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 155px;
  text-align: right;
}

.method-progress-stats .draft-counter {
  font-weight: 600;
  color: #1f6feb;
}

.replay-prompt {
  margin-bottom: 4px;
}

.method-title {
  font-weight: 600;
  font-size: 13px;
}

.method-meta {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 6px;
}

.chart-tooltip {
  position: fixed;
  font-size: 12px;
  padding: 6px 10px;
  background: #1f2937;
  color: #fff;
  border-radius: 6px;
  pointer-events: none;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  white-space: normal;
  max-width: 320px;
}

.chart-container {
  min-height: 280px;
  position: relative;
}

.chart-container-large {
  min-height: 420px;
}

.chart-container svg {
  max-width: 100%;
  height: auto;
  overflow: visible;
}

/* ── Chart Carousel ─────────────────────────── */
.chart-carousel {
  margin: 28px 0 24px;
}

.carousel-slides {
  position: relative;
}

.carousel-slide {
  display: none;
}

.carousel-slide.active {
  display: block;
  animation: carouselFadeIn 0.3s ease;
}

@keyframes carouselFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.carousel-panel {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 32px;
}

.carousel-panel h4 {
  font-size: 18px;
  margin: 0 0 12px;
  text-align: center;
}

.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.carousel-btn {
  background: #1f6feb;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.carousel-btn:hover:not(:disabled) {
  background: #1a5fd4;
}

.carousel-btn:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  opacity: 0.6;
}

.carousel-indicator {
  font-size: 14px;
  font-weight: 600;
  color: #4b5563;
  min-width: 48px;
  text-align: center;
}

/* ── Conclusion Charts Grid ────────────────── */
.conclusion-charts-grid {
  grid-template-columns: repeat(2, 1fr);
  margin: 16px 0 24px;
}

.conclusion-charts-grid .panel {
  padding: 20px;
  overflow: visible;
}

.conclusion-charts-grid .chart-container {
  overflow: visible;
}

.conclusion-charts-grid .chart-container svg {
  overflow: visible;
}

.conclusion-charts-grid .panel h4 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

@media (max-width: 720px) {
  .conclusion-charts-grid {
    grid-template-columns: 1fr;
  }
}

.chart-description {
  font-size: 14px;
  color: #4b5563;
  margin: 12px 0 0;
  line-height: 1.5;
}

.chart-view-more {
  margin: 0 0 0 4px;
  padding: 0;
  font-size: inherit;
  color: #6b7280;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  vertical-align: baseline;
}

.chart-view-more:hover {
  color: #4b5563;
}

.chart-details-content {
  margin-top: 8px;
  padding: 12px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: #4b5563;
  border-top: 1px solid #f1f5f9;
  max-height: 600px;
  overflow: hidden;
  transition: opacity 0.2s ease, max-height 0.3s ease, padding 0.2s ease, margin 0.2s ease, border 0.2s ease;
}

.chart-details-content ul {
  margin: 6px 0 8px 16px;
  padding: 0;
}

.chart-details-content li {
  margin: 0 0 4px;
}

.chart-details-content.chart-details-collapsed {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  margin-top: 0;
  border-top-width: 0;
}

.chart-details-content p {
  margin: 0 0 8px;
}

.chart-details-content p:last-child {
  margin-bottom: 0;
}

.replay-placeholder {
  color: #6b7280;
  font-style: italic;
  padding: 20px;
}

.error {
  color: #b91c1c;
  font-size: 13px;
  background: #fee2e2;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #fecaca;
}

.team-section h2 {
  margin-bottom: 24px;
}

.team-section-compact {
  padding: 20px 0 12px;
}

.team-section-compact .team-core {
  margin-bottom: 14px;
}

.team-section-compact .team-advisors {
  margin-bottom: 8px;
}

.team-section-compact .team-subheading {
  font-size: 11px;
  margin: 0 0 8px;
}

.team-section-compact .team-grid {
  gap: 10px;
  grid-template-columns: repeat(4, 1fr);
  max-width: 600px;
}

.team-section-compact .team-grid-advisors {
  grid-template-columns: repeat(2, 1fr);
  max-width: 300px;
}

.team-section-compact .team-card {
  padding: 12px 10px;
  border-radius: 10px;
}

.team-section-compact .team-initial {
  width: 32px;
  height: 32px;
  font-size: 13px;
  margin-bottom: 6px;
}

.team-section-compact .team-name {
  font-size: 13px;
}

.team-section-compact .team-role {
  font-size: 10px;
}

.team-subheading {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  margin: 0 0 12px;
}

.team-core {
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.team-advisors {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.team-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  width: 100%;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.team-grid-advisors {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.team-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.team-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
}

.team-initial {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #eef2ff;
  color: #3b82f6;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.team-card-mentor .team-initial {
  background: #fef3c7;
  color: #d97706;
}

.team-card-ta .team-initial {
  background: #d1fae5;
  color: #059669;
}

.team-name {
  font-weight: 600;
  font-size: 15px;
  color: #1f2937;
}

.team-role {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin-top: 4px;
}

.link-row {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.results-subsection {
  margin: 32px 0 0;
}

.results-subsection-title {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
}

.grid-2x2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 640px) {
  .grid-2x2 {
    grid-template-columns: 1fr;
  }
}

.panel h4 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

.dashboard-container {
  margin: 20px 0 28px;
  min-height: auto;
}

.dashboard-panel {
  background: #0d1117;
  border-radius: 14px;
  padding: 24px 28px;
  color: #c9d1d9;
}

.dashboard-title {
  font-size: 18px;
  font-weight: 700;
  color: #c9d1d9;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  margin-bottom: 20px;
  text-align: center;
}

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.dashboard-kpi {
  text-align: center;
  padding: 12px 8px;
  background: #161b22;
  border-radius: 10px;
  border: 1px solid #30363d;
}

.kpi-value {
  font-size: 32px;
  font-weight: 700;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  line-height: 1.2;
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: #c9d1d9;
  margin-top: 4px;
}

.kpi-sub {
  font-size: 10px;
  color: #8b949e;
  font-style: italic;
  margin-top: 2px;
}

.dashboard-chart {
  background: #161b22;
  border-radius: 10px;
  padding: 12px 8px;
  border: 1px solid #30363d;
}

.dashboard-chart svg {
  max-width: 100%;
  height: auto;
  overflow: visible;
}

.dashboard-chart .domain,
.dashboard-chart .tick line {
  stroke: #30363d;
}

.dashboard-chart .tick text {
  fill: #c9d1d9;
}

.site-footer {
  padding: 16px 0;
  background: #0b1220;
  color: #cbd5f5;
  text-align: center;
  font-size: 13px;
}
