/* ==========================================================================
   AlloNajah - Équations avec fractions et produit en croix (Page 96 - 1AC)
   Strict Pure White Background (#ffffff) Policy
   Prefix: ref-
   ========================================================================== */

.ref-section {
  background: #ffffff !important;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.ref-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: #ffffff !important;
}

.ref-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.25rem;
}

.ref-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.75rem;
  background: #ffffff !important;
}

.ref-title i {
  color: #0284c7;
}

.ref-rule-banner {
  background: #ffffff !important;
  border: 2px solid #0284c7;
  border-radius: 0.65rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.ref-rule-banner h3 {
  font-weight: 700;
  color: #0369a1;
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.ref-rule-banner p {
  color: #334155;
  font-size: 0.925rem;
  line-height: 1.5;
  margin: 0;
}

.ref-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  background: #ffffff !important;
}

@media (min-width: 768px) {
  .ref-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.ref-method-box {
  background: #ffffff !important;
  border: 1px solid #cbd5e1;
  border-radius: 0.65rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ref-method-box.cross {
  border-top: 3px solid #0284c7;
}

.ref-method-box.denom {
  border-top: 3px solid #059669;
}

.ref-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  background: #ffffff !important;
  border: 1px solid #cbd5e1;
  width: fit-content;
}

.ref-badge.cross {
  color: #0369a1;
  border-color: #38bdf8;
}

.ref-badge.denom {
  color: #047857;
  border-color: #34d399;
}

.ref-calc-step {
  background: #ffffff !important;
  border: 1px dashed #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.65rem 0.85rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.925rem;
  line-height: 1.7;
}

.ref-chain-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff !important;
  padding: 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
}

.ref-step-tag {
  background: #ffffff !important;
  border: 1px solid #cbd5e1;
  padding: 0.25rem 0.6rem;
  border-radius: 0.375rem;
  font-size: 0.825rem;
  font-weight: 600;
  color: #334155;
}

.ref-ar-note {
  direction: rtl;
  text-align: right;
  font-size: 0.85rem;
  color: #475569;
  border-top: 1px solid #f1f5f9;
  padding-top: 0.5rem;
  margin-top: 0.5rem;
  background: #ffffff !important;
}
