/* ============================================================
   THEORY CSS — Styles for theory/content pages
   ============================================================ */

/* Page type indicator bar */
.page-type-theory {
  border-top: 4px solid var(--color-theory);
}

.page-type-theory h1 {
  border-bottom-color: var(--color-theory);
}

/* Content sections */
.theory-content section {
  margin-bottom: var(--spacing-2xl);
}

.theory-content section:last-child {
  margin-bottom: 0;
}

/* Step-by-step solutions */
.step-list {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

.step-list li {
  counter-increment: step;
  position: relative;
  padding-left: 3em;
  margin-bottom: var(--spacing-md);
  font-size: var(--font-size-md);
}

.step-list li::before {
  content: "Step " counter(step);
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  color: var(--color-primary);
  font-size: var(--font-size-sm);
  white-space: nowrap;
}

/* Worked example numbering */
.worked-example {
  counter-increment: example;
}

/* Key term highlighting */
.key-term {
  font-weight: 700;
  color: var(--color-primary);
  border-bottom: 2px dotted var(--color-primary-light);
}

/* Summary section */
.summary-section {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--spacing-lg);
  margin-top: var(--spacing-2xl);
}

.summary-section h2 {
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.summary-section ul li {
  margin-bottom: var(--spacing-sm);
  font-size: var(--font-size-sm);
}

/* Connections section */
.connections-section {
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.connections-section h3 {
  margin-top: 0;
}

/* References section */
.references-section {
  border-top: 2px solid var(--border-light);
  padding-top: var(--spacing-lg);
  margin-top: var(--spacing-2xl);
}

.references-section h2 {
  border-bottom: none;
  font-size: var(--font-size-lg);
}

.references-section ul {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

/* Inline formula in text */
.inline-math {
  font-family: var(--font-mono);
  font-size: 0.95em;
  white-space: nowrap;
}

/* GATE previous year tag */
.gate-tag {
  display: inline-block;
  background-color: var(--color-quiz-bg);
  color: var(--color-quiz);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: var(--font-size-xs);
  font-weight: 700;
  margin-left: var(--spacing-sm);
}

/* Complexity table */
.complexity-table {
  margin: var(--spacing-lg) 0;
}

.complexity-table td:first-child {
  font-weight: 600;
  white-space: nowrap;
}

/* Proof block */
.proof-block {
  border-left: 3px solid var(--theorem-border);
  padding-left: var(--spacing-lg);
  margin: var(--spacing-md) 0 var(--spacing-lg);
  color: var(--text-secondary);
}

.proof-block .proof-label {
  font-weight: 700;
  font-style: italic;
  color: var(--theorem-border);
}

.proof-block .qed {
  text-align: right;
  font-weight: 700;
}
