/* ============================================================
   MODEL EXPLAINER PAGE
   ============================================================ */

/* ── Page wrapper ──────────────────────────────────────────── */
.me-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ── Hero ──────────────────────────────────────────────────── */
.me-hero {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 3rem;
}

.me-hero-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-color);
  margin: 0 0 0.5rem;
}

.me-hero-sub {
  color: var(--secondary-color);
  font-size: 1.05rem;
  margin: 0 0 1.75rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.me-hero-tabs {
  display: inline-flex;
  gap: 0.5rem;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 8px;
}

.me-hero-tab {
  padding: 0.45rem 1.25rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--secondary-color);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.me-hero-tab:hover,
.me-hero-tab.active {
  background: white;
  color: var(--primary-color);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  text-decoration: none;
}

/* ── Section ───────────────────────────────────────────────── */
.me-section {
  margin-bottom: 4rem;
}

.me-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  border-left: 4px solid var(--accent-color);
  padding-left: 0.75rem;
  margin-bottom: 1.5rem;
}

.me-section-divider {
  border: none;
  border-top: 2px dashed #e2e8f0;
  margin: 3.5rem 0;
}

/* ── Card ──────────────────────────────────────────────────── */
.me-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

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

.me-callout {
  background: #EFF6FF;
  border-left: 4px solid var(--primary-color);
  padding: 0.85rem 1rem;
  border-radius: 0 6px 6px 0;
  color: var(--font-color);
  margin: 1rem 0 0;
  font-size: 1.02rem;
}

/* ── Simple-version 3-step flow ────────────────────────────── */
.me-steps-simple {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 2rem;
}

.me-step-simple {
  flex: 1;
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  padding: 1.25rem 1.25rem 1.5rem;
  text-align: center;
  line-height: 1.6;
}

.me-step-simple h3 {
  margin: 0.6rem 0 0.5rem;
  font-size: 1rem;
  color: var(--primary-color);
}

.me-step-simple p {
  font-size: 0.92rem;
  color: #374151;
  margin: 0;
}

.me-step-num {
  width: 36px;
  height: 36px;
  background: var(--primary-color);
  color: white;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.25rem;
}

.me-step-connector {
  width: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 2.25rem;
  color: var(--secondary-color);
  font-size: 1.25rem;
}

.me-step-connector::after {
  content: '→';
}

/* ── Expected Points chart section ─────────────────────────── */
.me-chart-section {
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
}

.me-chart-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0 0 0.35rem;
}

.me-chart-desc {
  color: var(--secondary-color);
  font-size: 0.92rem;
  margin: 0 0 1rem;
}

#ep-chart { width: 100%; }

/* ── Adjustment cards ───────────────────────────────────────── */
.me-adj-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.me-adj-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  padding: 1.25rem 1.5rem;
  line-height: 1.6;
}

.me-adj-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0.25rem 0 0.4rem;
}

.me-adj-card p {
  font-size: 0.92rem;
  color: #374151;
  margin: 0;
}

.me-adj-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

/* ── Final note ────────────────────────────────────────────── */
.me-final-note {
  background: #F0FDF4;
  border-left: 4px solid #10B981;
}

/* ── Technical step cards ──────────────────────────────────── */
.me-steps-technical {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.me-tech-step {
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  padding: 1.5rem 1.75rem;
  line-height: 1.7;
}

.me-tech-step p { margin-top: 0.75rem; }
.me-tech-step p:last-child { margin-bottom: 0; }

.me-tech-step-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.me-tech-step-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--font-color);
  margin: 0;
}

.me-tech-step-badge {
  background: var(--primary-color);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Formula block ─────────────────────────────────────────── */
.me-formula {
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  padding: 0.85rem 1.2rem;
  margin: 0.85rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.me-formula-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--secondary-color);
}

.me-formula code {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.96rem;
  color: var(--primary-color);
  background: none;
  padding: 0;
}

code {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.92em;
  background: #F1F5F9;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  color: #1E3A8A;
}

/* ── Drive outcome grid ─────────────────────────────────────── */
.me-outcome-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0 0.5rem;
}

.me-outcome {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
}

.me-outcome span {
  font-weight: 700;
  font-size: 0.95rem;
}

.me-outcome.positive  { background: #D1FAE5; color: #065F46; }
.me-outcome.neutral   { background: #F1F5F9; color: #475569; }
.me-outcome.negative  { background: #FEE2E2; color: #991B1B; }
.me-outcome.very-negative { background: #7F1D1D; color: white; }

/* ── POE example ────────────────────────────────────────────── */
.me-poe-example {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 0.85rem 0 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.me-poe-box {
  background: white;
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}

.me-poe-box .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--secondary-color);
  margin-bottom: 0.2rem;
}

.me-poe-box .value {
  font-size: 1.1rem;
  font-weight: 700;
}

.me-poe-box .value.positive { color: #065F46; }
.me-poe-box .value.negative { color: #991B1B; }
.me-poe-box .value.neutral  { color: var(--secondary-color); }

.me-poe-op {
  font-size: 1.3rem;
  color: var(--secondary-color);
  font-weight: 300;
  text-align: center;
}

/* ── Elo weight chart section ───────────────────────────────── */
#elo-weight-chart { width: 100%; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 680px) {
  .me-steps-simple {
    flex-direction: column;
    gap: 1rem;
  }
  .me-step-connector { display: none; }
  .me-adj-grid { grid-template-columns: 1fr; }
  .me-poe-example {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .me-poe-op { display: none; }
}
