/* Local styles for Marginal Posteriors */

.diagnostics-overview {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.diagnostic-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.diagnostic-section h2 {
  margin-bottom: 1rem;
}

.diagnostic-section h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
}

/* Concept boxes - blue tint */
.concept-box {
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.concept-box h4 {
  margin: 0 0 0.5rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e40af;
}

.concept-box p {
  margin: 0;
  color: #334155;
  line-height: 1.6;
}

.concept-box ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.25rem;
  color: #334155;
}

.concept-box ul li {
  margin-bottom: 0.25rem;
  line-height: 1.5;
}

/* Note boxes - amber tint */
.note-box {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  color: #78350f;
}

.note-box strong {
  color: #92400e;
}

/* Math blocks */
.math-block {
  background: #f8fafc;
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1rem 0;
  text-align: center;
  overflow-x: auto;
}

.math-block p {
  margin: 0.5rem 0 0 0;
}

/* Code blocks */
.code-block {
  background: #1e293b;
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1rem 0;
  overflow-x: auto;
}

.code-block pre {
  margin: 0;
  padding: 0;
}

.code-block code {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #e2e8f0;
  white-space: pre;
}

/* Tick list */
.tick-list {
  list-style: none;
  padding-left: 0;
  margin: 1rem 0;
}

.tick-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.tick-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
}

/* Spec tables */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.spec-table th,
.spec-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.spec-table th {
  background: #f1f5f9;
  font-weight: 600;
  color: #334155;
}

.spec-table tr:hover {
  background: #f8fafc;
}

.spec-table code {
  background: #e2e8f0;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #0f172a;
}

/* Strategy Grid */
.strategy-grid {
  display: grid;
  gap: 1.25rem;
  margin: 1.5rem 0;
}

@media (min-width: 600px) {
  .strategy-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .strategy-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Integration grid with 3 cards */
.strategy-grid.int-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .strategy-grid.int-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .strategy-grid.int-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.strategy-card {
  background: var(--panel, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  padding: 1.25rem;
  transition: box-shadow 0.2s ease;
  overflow: hidden;
}

.strategy-card .math-block {
  font-size: 0.85rem;
  padding: 0.75rem;
  margin: 0.5rem 0;
  overflow-x: auto;
}

.strategy-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.strategy-card h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.05rem;
  color: var(--text, #1f2937);
}

.strategy-card p {
  margin: 0 0 0.75rem 0;
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.5;
}

.strategy-card ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.85rem;
  color: #6b7280;
}

.strategy-card ul li {
  margin-bottom: 0.25rem;
}

/* Strategy badges */
.strategy-speed, .strategy-accuracy, .strategy-balanced {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}

.strategy-speed {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  color: #166534;
}

.strategy-accuracy {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
}

.strategy-balanced {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
}

/* Math equation styling */
.math-equation {
  text-align: center;
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(99, 102, 241, 0.05);
  border-radius: 8px;
  overflow-x: auto;
}

/* Component grid for marginal types */
.component-grid {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

@media (min-width: 600px) {
  .component-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.component-card {
  background: var(--panel, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 1rem 1.25rem;
}

.component-card h4 {
  margin: 0 0 0.4rem 0;
  font-size: 1rem;
  color: var(--text, #1f2937);
}

.component-card p {
  margin: 0;
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .spec-table {
    font-size: 0.85rem;
  }

  .spec-table th,
  .spec-table td {
    padding: 0.5rem 0.75rem;
  }

  .code-block {
    padding: 1rem;
  }

  .code-block code {
    font-size: 0.8rem;
  }

  .strategy-grid {
    grid-template-columns: 1fr;
  }

  .strategy-card {
    padding: 1rem;
  }

  .component-grid {
    grid-template-columns: 1fr;
  }
}
