/* HikmahMatrix v4.0 — Step 55 Divergence Monographs (M1–M9) & SVG Isnād Visualizer */
.hm-monographs-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hm-monograph-card {
  background: #ffffff;
  border: 1px solid #e7e2d8;
  border-radius: 12px;
  padding: 1.4rem;
}

.hm-monograph-title {
  margin: 0.45rem 0 0.25rem;
  font-size: 1.25rem;
  color: #1c1917;
}

.hm-monograph-sub {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: #57534e;
}

.hm-monograph-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.hm-table-wrap {
  overflow-x: auto;
  margin-bottom: 1rem;
}

.hm-mono-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.hm-mono-table th,
.hm-mono-table td {
  border: 1px solid #e7e2d8;
  padding: 0.6rem 0.75rem;
  text-align: start;
}

.hm-mono-table th {
  background: #f5f0e6;
  color: #1c1917;
  font-weight: 700;
}

.hm-mono-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e7e2d8;
}

.hm-firewall-note {
  margin: 0;
  font-size: 0.82rem;
  color: #44403c;
  max-width: 72ch;
}

/* Interactive SVG Isnād Stage */
.hm-isnad-stage {
  background: #ffffff;
  border: 1px solid #e7e2d8;
  border-radius: 12px;
  padding: 1.25rem;
}

.hm-svg-scroll {
  overflow-x: auto;
  background: #faf8f5;
  border: 1px solid #e7e2d8;
  border-radius: 10px;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.hm-isnad-svg {
  width: 100%;
  min-width: 780px;
  height: auto;
  display: block;
}

.hm-isnad-detail-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background: #f5f0e6;
  border: 1px solid #e7e2d8;
  border-radius: 8px;
  padding: 0.9rem 1rem;
}
